/* Modal mappa: regole indipendenti dal layout delle immagini. */
.service-map-modal {
    width: min(1120px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 20px;
    color: var(--ink, #173c2d);
    background: var(--paper, #f7f7ef);
    box-shadow: 0 35px 100px rgba(10,30,22,.35);
    overflow: auto;
}
.service-map-modal::backdrop {
    background: rgba(9,29,21,.65);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.service-map-modal [hidden] { display: none !important; }
.service-map-modal .service-map-header {
    position: relative;
    top: auto;
    z-index: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(22px, 3vw, 36px);
    border: 0;
    border-bottom: 1px solid var(--line, #dce2d8);
    background: linear-gradient(120deg, #edf2df, #f7f7ef);
}
.service-map-header .eyebrow { margin-bottom: 12px; }
.service-map-header h2 {
    font-size: clamp(1.65rem, 1.2rem + 1.5vw, 2.4rem);
    margin-bottom: 10px;
}
.service-map-header p { margin: 0; max-width: 580px; }
.service-map-close {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #cbd6c3;
    border-radius: 50%;
    background: #fffefa;
    color: #163b2d;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}
.service-map-close:hover { background: #d1ed73; }
.service-map-content { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
.service-map-visual { position: relative; min-width: 0; background: #e8eddf; }
.service-area-map { height: 550px; width: 100%; background: #e8eddf; }
.service-map-status {
    position: relative;
    margin: 0;
    padding: 10px 18px;
    font-size: .875rem;
    background: #edf2df;
}
.service-map-retry, .service-map-reset {
    border: 1px solid #cbd6c3;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 12px;
    background: #fffefa;
    color: #163b2d;
    font-size: .875rem;
    cursor: pointer;
}
.service-map-reset { position: absolute; z-index: 600; top: 0; right: 0; box-shadow: 0 4px 14px #163b2d18; }
.service-map-info { padding: clamp(22px, 2.5vw, 30px); background: #f7f7ef; }
.service-map-info > .eyebrow { margin-bottom: 14px; }
.service-map-towns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.service-map-towns button {
    min-height: 40px;
    border: 1px solid #d0dac8;
    border-radius: 999px;
    padding: 8px 12px;
    color: #163b2d;
    background: #fffefa;
    font-size: .875rem;
    cursor: pointer;
}
.service-map-towns button:hover, .service-map-towns button[aria-pressed="true"] { background: #d1ed73; border-color: #9ab346; }
.service-map-towns span { font-size: .75rem; margin-left: 5px; font-weight: 700; }
.service-map-info .service-map-note { font-size: .8125rem; line-height: 1.6; }
.service-map-address { padding: 22px 0; margin-top: 20px; border-top: 1px solid #dce2d8; }
.service-map-address .eyebrow { margin-bottom: 10px; }
.service-map-address address { font-size: 1rem; font-weight: 600; font-style: normal; margin-bottom: 12px; }
.service-map-address p { font-size: .875rem; margin-bottom: 12px; }
.service-map-directions { font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.service-map-info > .button { width: 100%; text-align: center; }
.service-map-pin { background: none; border: 0; }
.service-map-pin span {
    display: block;
    width: 44px;
    height: 44px;
    background: #163b2d;
    border: 4px solid #f7f7ef;
    border-radius: 50%;
    box-shadow: 0 2px 12px #102d2366;
}
.service-map-pin-base span { width: 30px; height: 30px; background: #d1ed73; border-color: #163b2d; }
.service-map-modal .leaflet-tooltip { color: #163b2d; font-family: 'DM Sans', Arial, sans-serif; font-weight: 700; border-radius: 6px; }
.service-map-modal .leaflet-popup-content { color: #163b2d; font-family: 'DM Sans', Arial, sans-serif; font-size: .875rem; line-height: 1.5; }
.service-map-modal .leaflet-container { font-family: 'DM Sans', Arial, sans-serif; }
.service-map-modal .leaflet-control-attribution { font-size: 11px; line-height: 1.5; }
@media (max-width: 760px) {
    .service-map-modal { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 14px; }
    .service-map-content { grid-template-columns: 1fr; }
    .service-map-modal .service-map-header { padding: 22px; }
    .service-map-header .eyebrow { font-size: .65rem; }
    .service-area-map { height: 340px; min-height: 0; }
    .service-map-info { padding: 22px; }
}


.service-map-interact {
    position: absolute;
    z-index: 600;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 24px);
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #cbd6c3;
    border-radius: 999px;
    color: #163b2d;
    background: #fffefa;
    box-shadow: 0 4px 18px #163b2d22;
    font-size: .875rem;
    cursor: pointer;
}
.service-area-map.service-map-scroll-safe { touch-action: pan-y pinch-zoom; }
@media (max-width: 760px) {
    .service-area-map { height: clamp(240px, 45svh, 340px); }
    .service-map-reset { min-height: 44px; }
}
.service-map-popup p {
    margin: 8px 0;
}

.service-map-popup-links {
    margin: 12px 0 0;
    padding-left: 18px;
}

    .service-map-popup-links li {
        margin: 6px 0;
    }

    .service-map-popup-links a {
        display: inline-block;
        padding: 4px 0;
        color: #163b2d;
        font-weight: 700;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

        .service-map-popup-links a:hover {
            text-decoration-thickness: 2px;
        }