/* Pagina /mappa: solo stili della mappa, caricati unicamente li'. */
.mappa-pagina h1 { margin: 0.4rem 0 0.8rem; }
.mappa-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.mappa-barra .chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--chip-attivo-testo); }
.mappa-tipo { min-height: 2.25rem; padding: 0.25rem 0.6rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; }
.mappa-conteggio { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 4; padding: 0.2rem 0.7rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 0.82rem; box-shadow: var(--shadow-sm); }
.mappa-conteggio:empty { display: none; }
.mappa-tipo { flex: 1 1 9rem; min-width: 0; }

.mappa-wrap { position: relative; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-alt); }
#mappa { width: 100%; height: calc(100vh - 17rem); height: calc(100dvh - 17rem); min-height: 22rem; z-index: 0; }

.mappa-messaggio { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 1rem; text-align: center; background: var(--surface); z-index: 5; }
.mappa-messaggio[hidden] { display: none; }

/* cerchi con il numero di eventi */
.mk { display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; font-size: 0.85rem; line-height: 1;
  background: var(--primary); border: 2px solid #fff; box-shadow: 0 1px 6px rgba(20, 21, 41, 0.4); cursor: pointer; }
.mk-m { background: #b45309; }
.mk-l { background: #b91c1c; }
.mk-luogo { background: #0f766e; }
.leaflet-div-icon.mk-icona { background: transparent; border: 0; }
.mk-io { width: 14px; height: 14px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35); }

/* elenco degli eventi del luogo toccato: sotto la mappa sul telefono, a sinistra sul computer */
.mappa-scheda { position: absolute; left: 0; right: 0; bottom: 0; max-height: 60%; display: flex; flex-direction: column; background: var(--surface); color: var(--text);
  border-top: 1px solid var(--border); border-radius: var(--radius-md) var(--radius-md) 0 0; box-shadow: var(--shadow-lg); z-index: 10; }
.mappa-scheda[hidden] { display: none; }
.mappa-scheda-testa { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); }
.mappa-chiudi { min-width: 2.25rem; min-height: 2.25rem; border: 0; border-radius: 50%; background: var(--surface-alt); color: var(--text); font-size: 1rem; cursor: pointer; }
.mappa-scheda-corpo { overflow-y: auto; padding: 0.4rem 0.6rem 0.8rem; -webkit-overflow-scrolling: touch; }
.ms-item { display: flex; gap: 0.7rem; align-items: center; padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.ms-item img { width: 72px; height: 54px; flex: none; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-alt); }
.ms-item strong { display: block; font-size: 0.95rem; line-height: 1.25; }
.ms-item span { display: block; color: var(--text-muted); font-size: 0.82rem; margin-top: 0.15rem; }
.ms-vuoto, .ms-altri { margin: 0.6rem 0.2rem; color: var(--text-muted); font-size: 0.9rem; }
.mappa-nota { margin: 0.75rem 0 0; color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 640px) {
  .mappa-pagina .breadcrumb { display: none; }
  .mappa-pagina h1 { font-size: 1.35rem; margin: 0.6rem 0 0.6rem; }
  .mappa-barra { gap: 0.4rem; }
  .mappa-barra .chip { min-height: 2rem; padding: 0.15rem 0.65rem; font-size: 0.85rem; }
  .mappa-barra .btn-pill { padding: 0.25rem 0.7rem; }
  .mappa-tipo { min-height: 2rem; font-size: 0.85rem; }
  #mappa { height: calc(100vh - 14rem); height: calc(100dvh - 14rem); min-height: 20rem; }
}

@media (min-width: 900px) {
  #mappa { height: calc(100vh - 15rem); height: calc(100dvh - 15rem); min-height: 30rem; }
  .mappa-scheda { top: 0; right: auto; width: 380px; max-height: none; border-top: 0; border-right: 1px solid var(--border); border-radius: 0; }
}
