.mappa-maestri-block {
  font-family: inherit;
}

/* Barra di ricerca */
#mm-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
#mm-search-input-wrap {
  position: relative;
  flex: 1 1 240px;
}
#mm-search-bar input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
#mm-search-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 1100;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 280px;
  overflow-y: auto;
}
#mm-search-suggestions[hidden] {
  display: none;
}
#mm-search-suggestions li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}
#mm-search-suggestions li .mm-suggestion-sub {
  color: #888;
  font-size: 12px;
  margin-left: 6px;
}
#mm-search-suggestions li:hover,
#mm-search-suggestions li.mm-active {
  background: #f5f0e0;
}
#mm-search-bar button {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  cursor: pointer;
}
#mm-geo-status {
  font-size: 12px;
  color: #666;
  align-self: center;
}

/* Mappa + pannello laterale */
/* ponytail: breakout full-bleed dal contenitore centrato del tema
   (max-width fisso, sconosciuto qui); su scrollbar non-overlay può
   aggiungere qualche px di margine a destra, accettabile. */
#mm-map-wrap {
  position: relative;
  margin-bottom: 8px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
#mm-schede-app {
  position: relative;
}
#map {
  height: 600px;
}
#mm-geo-attribution {
  margin: 4px 0 8px;
  font-size: 11px;
  color: #888;
  text-align: right;
}
.mm-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  width: 260px;
  max-width: calc(100% - 24px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  font-size: 14px;
}
.mm-panel[hidden] {
  display: none;
}
.mm-panel img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.mm-panel-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.mm-panel-body {
  padding: 10px 12px;
}
.mm-panel-address {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
}
.mm-panel-address svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}
.mm-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}
.mm-panel-body .mm-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.mm-panel-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  text-decoration: none;
  font-size: 13px;
}
.mm-panel-link:hover {
  text-decoration: underline;
}
.mm-panel-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #666;
}
.mm-panel-body .mm-book {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #c9a227;
  color: #111;
  text-decoration: none;
  font-weight: 600;
}
.mm-panel-body .mm-book svg {
  width: 14px;
  height: 14px;
}

/* Filtri */
#mm-filters {
  position: relative;
  z-index: 900;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  margin-bottom: 16px;
}
.mm-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 160px;
  min-width: 150px;
}
.mm-filter-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: #555;
}
#mm-filters select {
  padding: 9px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13.5px;
  background: #fff;
  color: #111;
}
#mm-filtra-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#mm-filtra-btn:hover {
  background: #000;
}
#mm-filtra-btn svg {
  width: 15px;
  height: 15px;
}

/* Card deck */
#mm-results-count {
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
}
#mm-card-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}
.mm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.mm-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.mm-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.mm-card .mm-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mm-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 14px 14px;
}
.mm-card-body h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
}
.mm-card-body .mm-school {
  color: #666;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.mm-card-body .mm-location {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
  font-size: 12.5px;
  margin-bottom: 8px;
}
.mm-card-body .mm-location svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.mm-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #444;
  font-size: 11px;
  margin: 2px 4px 2px 0;
}
.mm-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}
.mm-icon-links {
  display: flex;
  gap: 6px;
}
.mm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f2f2f2;
  color: #333;
  transition: background 0.15s ease;
}
.mm-icon-btn:hover {
  background: #e5e5e5;
}
.mm-icon-btn svg {
  width: 15px;
  height: 15px;
}
.mm-details-btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.mm-details-btn:hover {
  background: #000;
}

#mm-load-more {
  display: block;
  margin: 0 auto;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid #c9a227;
  background: #fff;
  color: #111;
  cursor: pointer;
}
#mm-load-more[hidden] {
  display: none;
}
