/* Sezione "Attività e servizi": marker, gruppi, anteprime sulla mappa e filtri. */

.leaflet-container { font-family: inherit; }

/* Marker a goccia con l'icona della categoria (il colore arriva da --c). */
.att-pin-wrap { background: none; border: 0; }
.att-pin {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--c, #1b4332);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease;
}
.att-pin i { transform: rotate(45deg); color: #fff; font-size: 14px; }
.att-pin-wrap:hover .att-pin,
.att-pin-wrap.is-active .att-pin { transform: rotate(-45deg) scale(1.18); }
.att-pin-wrap.is-active { z-index: 1000 !important; }
.att-pin--top .att-pin { border-color: #facc15; border-width: 3px; }
.att-pin-wrap:focus { outline: none; }
.att-pin-wrap:focus-visible .att-pin { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #facc15; }

/* Gruppi di attività vicine */
.att-cluster-wrap { background: none; border: 0; }
.att-cluster {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 9999px;
    background: #1b4332; color: #fff; font-weight: 700; font-size: 14px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 5px rgba(27, 67, 50, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.att-cluster-wrap:focus-visible .att-cluster { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #facc15; }

/* Anteprima (popup) */
.att-popup .leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 1rem; }
.att-popup .leaflet-popup-content { margin: 0; line-height: 1.4; }
.att-popup a.leaflet-popup-close-button { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); top: 4px; right: 4px; font-size: 22px; }
.att-popup .att-popup-img { display: block; width: 100%; height: 120px; object-fit: cover; }
.att-popup div.att-popup-img { display: flex; }

/* Filtri per categoria */
.att-chip {
    display: inline-flex; align-items: center; gap: 0.4rem; flex-shrink: 0;
    padding: 0.5rem 0.9rem; border-radius: 9999px;
    border: 1px solid #e5e7eb; background: #fff; color: #374151;
    font-size: 0.875rem; font-weight: 600; white-space: nowrap;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.att-chip i { color: var(--c, #2d6a4f); }
.att-chip:hover { border-color: var(--c, #2d6a4f); }
.att-chip[aria-pressed="true"] { background: var(--c, #1b4332); border-color: var(--c, #1b4332); color: #fff; }
.att-chip[aria-pressed="true"] i { color: #fff; }
.att-chip-n { font-size: 0.7rem; font-weight: 700; padding: 0 0.4rem; border-radius: 9999px; background: rgba(0, 0, 0, 0.06); }
.att-chip[aria-pressed="true"] .att-chip-n { background: rgba(255, 255, 255, 0.25); }
.att-chip:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }

/* Scheda evidenziata quando si seleziona il marker corrispondente */
.att-item.is-active { box-shadow: 0 0 0 2px #2d6a4f, 0 10px 25px -5px rgba(0, 0, 0, 0.1); }

.att-elenco { scrollbar-width: thin; }

@media (prefers-reduced-motion: reduce) {
    .att-pin, .att-chip { transition: none; }
}
