/* Pannello strumenti in alto al centro sulla mappa */
.cmte-toolbar {
    position: absolute;
    top: 65px; /* Abbassato per staccarsi dai filtri */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 3px;
    display: flex;
    gap: 0;
    flex-direction: row;
    align-items: center;
    transition: border-radius 0.2s;
}

.cmte-toolbar-collapse {
    background: #f0f4ff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a73e8;
    font-size: 12px;
    flex-shrink: 0;
    margin: 0 2px;
    transition: background 0.15s;
}

.cmte-toolbar-collapse:hover {
    background: #d0e0ff;
}

.cmte-toolbar-content {
    display: flex;
    gap: 3px;
    flex-direction: row;
}

.cmte-toolbar.cmte-toolbar-collapsed {
    border-radius: 50%;
}

.cmte-toolbar.cmte-toolbar-collapsed .cmte-toolbar-content {
    display: none;
}

/* Compact mode: collapse button verticale */
.cmte-toolbar.cmte-compact .cmte-toolbar-collapse {
    margin: 0;
}

/* Mobile: collapse button verticale come gli altri */
@media (max-width: 768px) {
    .cmte-toolbar-collapse {
        width: 36px;
        height: 36px;
        font-size: 15px;
        margin: 0;
    }
    .cmte-toolbar.cmte-toolbar-collapsed {
        border-radius: 50%;
    }
}

/* Wrapper per bottone + menu a scomparsa */
.cmte-toolbar-item {
    position: relative;
}

/* === MENU STRUMENTI A SCOMPARSA (desktop) === */
.cmte-tools-group {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    padding: 5px;
    gap: 5px;
    flex-direction: row;
    z-index: 1001;
    white-space: nowrap;
}

.cmte-tools-group.cmte-tools-open {
    display: flex;
}

/* L'ultimo gruppo si allinea a destra per non uscire dallo schermo */
.cmte-toolbar-item:last-child .cmte-tools-group {
    left: auto;
    right: 0;
}

.cmte-tools-toggle {
    position: relative;
}

.cmte-tools-toggle.active {
    background: #e9ecef;
    border-radius: 25px;
}

.cmte-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #444;
    border-radius: 25px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.cmte-toolbar-btn:hover {
    background: #f0f2f5;
}

.cmte-toolbar-btn.active {
    background: #007bff;
    color: #fff;
    border-radius: 25px;
}

.cmte-toolbar-btn#cmte-btn-heat.active {
    background: #ff6b35;
    color: #fff;
    border-radius: 25px;
}

.cmte-toolbar-btn#cmte-btn-open-now.active {
    background: #28a745;
    color: #fff;
    border-radius: 25px;
}

.cmte-toolbar-btn#cmte-btn-radius.active {
    background: #007bff;
    color: #fff;
    border-radius: 25px;
}

.cmte-mapstyle-btn.active {
    background: #2d8a4e;
    color: #fff;
    border-radius: 25px;
}

/* === RICERCA NELLA TOOLBAR === */
.cmte-toolbar-search-wrap {
    display: flex;
    align-items: center;
}

.cmte-toolbar-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 34px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 25px;
    transition: all 0.2s;
}

.cmte-toolbar-search:hover,
.cmte-toolbar-search:focus-within {
    background: #fff;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.08);
}

.cmte-toolbar-search i {
    color: #68727d;
    font-size: 12px;
}

.cmte-toolbar-search input {
    min-width: 0;
    width: 160px;
    border: 0 !important;
    background: transparent !important;
    outline: none;
    font-size: 12px;
    color: #444;
    padding: 0;
    box-shadow: none;
}

.cmte-toolbar-search input::placeholder {
    color: #999;
}

.cmte-compact .cmte-toolbar-search input {
    width: 100px;
}

/* === ALLERTE METEO === */
#cmte-info-alert .fa-exclamation-triangle {
    color: #e67e22;
}

/* === PARCHEGGI === */
#cmte-info-parking .fa-parking {
    color: #2980b9;
}

/* === MEZZI PUBBLICI === */
#cmte-info-transit .fa-bus {
    color: #27ae60;
}

/* === FONTANE ACQUA === */
#cmte-info-water .fa-tint {
    color: #3498db;
}

/* === INDICE UV === */
#cmte-info-uv .fa-sun {
    color: #f39c12;
}

/* === FARMACIE === */
#cmte-info-pharmacy .fa-prescription-bottle-medical {
    color: #e74c3c;
}

/* === PARCHEGGI DISABILI === */
#cmte-info-disabled .fa-wheelchair {
    color: #8e44ad;
}

/* === SCUOLE / PARCO GIOCHI === */
#cmte-info-education .fa-graduation-cap {
    color: #2c3e50;
}

/* === FOTO WIKIMEDIA COMMONS === */
#cmte-info-commons .fa-images {
    color: #e67e22;
}

/* === MAPILLARY STREET VIEW === */
#cmte-info-mapillary .fa-street-view {
    color: #2980b9;
}

/* === EFFETTO LUCE SOLARE === */
.cmte-solar-overlay {
    pointer-events: none;
    z-index: 400;
    mix-blend-mode: overlay;
    opacity: 0.95;
}

/* Filtri sui tile della mappa per realisticità (molto leggeri) */
.cmte-solar-day .leaflet-tile,
.cmte-solar-day .leaflet-tile-pane img {
    filter: brightness(1.01) saturate(1.02);
}

.cmte-solar-sunrise .leaflet-tile,
.cmte-solar-sunrise .leaflet-tile-pane img {
    filter: sepia(0.04) saturate(1.04) contrast(0.99) brightness(0.99);
}

.cmte-solar-night .leaflet-tile,
.cmte-solar-night .leaflet-tile-pane img {
    filter: brightness(0.88) contrast(1.04) saturate(0.92) hue-rotate(-5deg);
}

/* === ETICHETTE INFO PANEL === */
.cmte-info-panel-row .cmte-info-label {
    font-weight: 600;
    color: #666;
    margin-right: 4px;
    font-size: 0.9em;
    white-space: nowrap;
}

/* === PANNELLO RAGGIO === */
.cmte-radius-panel {
    position: absolute;
    top: 110px;
    left: 60px;
    z-index: 1001;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    padding: 12px 14px;
    min-width: 180px;
}

.cmte-radius-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #1D3A33;
    margin-bottom: 10px;
}

.cmte-radius-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cmte-radius-opt {
    padding: 5px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.cmte-radius-opt:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.cmte-radius-opt.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.cmte-toolbar-btn i {
    font-size: 14px;
}

/* Etichetta distanza totale moderna */
.cmte-distance-label {
    background: #007bff;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid #fff;
    pointer-events: none;
}

/* Tooltip segmenti più piccolo e discreto */
.cmte-distance-tooltip-inner {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
}

/* Banner informativo */
.cmte-info-banner {
    position: absolute;
    top: 110px; /* Sotto la toolbar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1010; /* Sopra quasi tutto */
    background: rgba(29, 58, 51, 0.95); /* Uso il colore dell'hero #1D3A33 */
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    pointer-events: none;
    white-space: nowrap;
}

/* Duplicato per sicurezza in basso se l'utente preferisce (come fallback visivo) */
.cmte-info-banner-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1010;
    background: rgba(29, 58, 51, 0.95);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    pointer-events: none;
    white-space: nowrap;
}

.cmte-info-banner.visible,
.cmte-info-banner-bottom.visible {
    display: block;
    animation: cmte-fade-in 0.3s ease;
}

@keyframes cmte-fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Risultato area (Banner basso) */
.cmte-area-result {
    position: absolute;
    bottom: 20px; /* Allineato con l'altro banner basso */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1011; /* Sopra il banner informativo basso */
    background: #fff;
    color: #333;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: none;
    border: 2px solid #1D3A33; /* Richiama il colore principale */
}

.cmte-area-result.visible {
    display: block;
}

.cmte-area-result .cmte-count {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

/* Stili per il poligono disegnato */
.leaflet-editing-list .leaflet-editing-draw {
    background-color: rgba(0, 123, 255, 0.15);
    border-color: #007bff;
}

/* === POI VICINI === */
/* Bottoni POI nel popup */
.cmte-poi-wrap {
    margin-bottom: 8px;
}

.cmte-poi-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #495057;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-bottom: 4px;
}

.cmte-poi-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.cmte-poi-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.cmte-poi-btn i {
    font-size: 13px;
}

.cmte-poi-btn i.fa-spinner {
    margin-right: 4px;
}

/* Marker POI sulla mappa */
.cmte-poi-marker {
    pointer-events: auto;
}

/* Bottone flottante "Nascondi POI" */
.cmte-poi-clear-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 1000;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cmte-poi-clear-btn:hover {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
}

/* === CONFINI COMUNI E DISTRITTI === */
.cmte-boundaries-panel {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    padding: 12px 14px;
    min-width: 200px;
    animation: cmte-fade-in 0.2s ease;
}

.cmte-boundaries-title {
    font-size: 13px;
    font-weight: 600;
    color: #1D3A33;
    margin-bottom: 10px;
    text-align: center;
}

.cmte-boundaries-options {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.cmte-boundary-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.cmte-boundary-opt:hover {
    background: #f0f4ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.cmte-boundary-opt.active {
    background: #6c5ce7;
    border-color: #6c5ce7;
    color: #fff;
}

.cmte-boundary-opt.active[data-level="province"] {
    background: #0984e3;
    border-color: #0984e3;
}

/* Etichette confini sulla mappa */
.cmte-boundary-label {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px !important;
    color: #333 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
    white-space: nowrap !important;
}

/* Pannello confini su mobile */
@media (max-width: 768px) {
    .cmte-boundaries-panel {
        top: auto;
        bottom: 50%;
        left: 55px;
        transform: none;
        min-width: 160px;
    }
}

/* === STAMPA MAPPA === */
/* Non serve più CSS @media print complesso: html2canvas genera un'immagine */

/* === FILTRI CATEGORIE === */
/* Nascondi i controlli originali della mappa, pillole e service-areas */
.leaflet-control-layers,
.leaflet-control-layers-expanded,
.leaflet-control-layers-toggle,
.geodir-map-cat-filter-wrap,
.geodir-map-pill,
.geodir-map-pills,
.geodir-map-pill-wrap,
.geodir-map-pills-wrap,
.csa-cat-filter {
    display: none !important;
}

/* Pannello filtri personalizzato */
.cmte-filter-panel {
    position: absolute;
    top: 110px;
    right: 15px;
    z-index: 1001;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    width: 280px;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cmte-filter-in 0.2s ease-out;
}

@keyframes cmte-filter-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.cmte-filter-header {
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1D3A33;
    font-size: 14px;
}

.cmte-filter-header i {
    margin-right: 6px;
}

.cmte-filter-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.cmte-filter-close:hover {
    color: #333;
}

.cmte-filter-body {
    padding: 10px 12px;
    overflow-y: auto;
    flex: 1;
}

.cmte-map-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
}

.cmte-map-search-box > i {
    color: #68727d;
    font-size: 13px;
}

.cmte-map-search-input {
    min-width: 0;
    width: 100%;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px;
}

.cmte-tag-search-in-panel {
    margin: 0 0 10px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e5e7eb;
}

.cmte-tag-search-in-panel .cts-tag-input {
    width: 100%;
    box-sizing: border-box;
}

.cmte-cat-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 4px;
    background: #fdfdfd;
    border: 1px solid transparent;
}

.cmte-cat-item:hover {
    background: #f0f4ff;
    border-color: #d0d7ff;
}

.cmte-cat-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.cmte-cat-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.cmte-cat-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cmte-cat-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.cmte-cat-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.cmte-filter-footer {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    text-align: center;
}

/* === SEZIONE ZONE (senza sede fisica) === */
.cmte-zone-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px dashed #e0e0e0;
}

.cmte-zone-title {
    font-size: 13px;
    font-weight: 600;
    color: #1D3A33;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cmte-zone-title i {
    font-size: 14px;
}

.cmte-zone-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cmte-zone-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.cmte-zone-btn i {
    font-size: 8px;
    color: #94a3b8;
}

.cmte-zone-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.cmte-zone-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.cmte-zone-btn.active i {
    color: #fff;
}

#cmte-filter-reset {
    background: none;
    border: 1px solid #ccc;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

#cmte-filter-reset:hover {
    background: #e9ecef;
    color: #333;
    border-color: #aaa;
}

/* === MODALITÀ COMPACT (mappa piccola / scheda singola) === */
.cmte-toolbar.cmte-compact {
    top: 10px;
    left: 10px;
    right: auto;
    transform: none;
    flex-direction: column;
    align-items: center;
    padding: 3px;
    gap: 3px;
    border-radius: 12px;
}

.cmte-toolbar.cmte-compact .cmte-toolbar-content {
    flex-direction: column;
    gap: 3px;
    align-items: center;
}

.cmte-toolbar.cmte-compact .cmte-toolbar-btn {
    padding: 0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    justify-content: center;
}

.cmte-toolbar.cmte-compact .cmte-btn-label {
    display: none;
}

.cmte-toolbar.cmte-compact .cmte-toolbar-btn i {
    font-size: 14px;
}

/* Nasconde pulsanti non essenziali su mappa piccola */
.cmte-toolbar.cmte-compact #cmte-btn-filters,
.cmte-toolbar.cmte-compact #cmte-btn-cluster,
.cmte-toolbar.cmte-compact #cmte-btn-open-now,
.cmte-toolbar.cmte-compact #cmte-btn-radius,
.cmte-toolbar.cmte-compact #cmte-btn-area,
.cmte-toolbar.cmte-compact #cmte-btn-heat {
    display: none;
}

/* Tools group sempre visibile in verticale (come su mobile) */
.cmte-toolbar.cmte-compact .cmte-tools-toggle {
    display: none;
}

.cmte-toolbar.cmte-compact .cmte-tools-group {
    display: flex !important;
    position: static !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    flex-direction: column !important;
    gap: 3px !important;
}

/* Mobile */
@media (max-width: 768px) {
    /* Toolbar verticale a sinistra, sotto i controlli di zoom/fullscreen */
    .cmte-toolbar,
    .cmte-toolbar.cmte-compact {
        top: 170px;
        left: 10px;
        right: auto;
        transform: none;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow-y: auto;
        max-height: calc(100% - 190px);
        padding: 5px;
        gap: 6px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    .cmte-toolbar-content {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }
    .cmte-toolbar-btn {
        padding: 0;
        border-radius: 50%;
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        justify-content: center;
    }
    .cmte-toolbar-btn .cmte-btn-label {
        display: none;
    }
    .cmte-toolbar-btn i {
        font-size: 15px;
    }

    /* Scrollbar della toolbar su mobile */
    .cmte-toolbar::-webkit-scrollbar {
        width: 4px;
    }
    .cmte-toolbar::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 2px;
    }
    .cmte-toolbar::-webkit-scrollbar-track {
        background: transparent;
    }

    /* Su mobile: nascondi pulsante Strumenti, mostra sempre il gruppo */
    .cmte-tools-toggle {
        display: none !important;
    }
    .cmte-toolbar-item {
        display: flex;
        flex-direction: column;
    }
    .cmte-tools-group {
        display: flex !important;
        position: static !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    /* Su mobile mostra tutti i bottoni anche in compact mode */
    .cmte-toolbar.cmte-compact #cmte-btn-filters,
    .cmte-toolbar.cmte-compact #cmte-btn-cluster,
    .cmte-toolbar.cmte-compact #cmte-btn-open-now,
    .cmte-toolbar.cmte-compact #cmte-btn-radius,
    .cmte-toolbar.cmte-compact #cmte-btn-area,
    .cmte-toolbar.cmte-compact #cmte-btn-heat {
        display: flex !important;
    }

    /* Ricerca mobile separata dalla toolbar */
    .cmte-mobile-search {
        position: absolute;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1010;
        width: calc(100% - 90px);
        max-width: 260px;
    }
    .cmte-mobile-search .cmte-toolbar-search {
        width: 100%;
        height: 42px;
        padding: 0 14px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 25px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        gap: 10px;
    }
    .cmte-mobile-search .cmte-toolbar-search:focus-within {
        border-color: #007bff;
        box-shadow: 0 0 0 3px rgba(0,123,255,0.08);
    }
    .cmte-mobile-search .cmte-toolbar-search i {
        font-size: 14px;
    }
    .cmte-mobile-search .cmte-toolbar-search input {
        width: 100%;
        font-size: 14px;
        color: #444;
    }
    .cmte-mobile-search .cmte-toolbar-search input::placeholder {
        color: #999;
        font-size: 13px;
    }

    /* Pannello filtri */
    .cmte-filter-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        animation: cmte-filter-up 0.25s ease-out;
    }

    /* Pannello raggio su mobile */
    .cmte-radius-panel {
        top: auto;
        bottom: 50%;
        left: 55px;
        min-width: 160px;
    }

    @keyframes cmte-filter-up {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}

/* === CLUSTERING MARKER === */
.cmte-cluster-wrap {
    background: transparent !important;
    border: none !important;
}

.cmte-cluster-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    border: 3px solid #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.cmte-cluster-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.cmte-cluster-icon span {
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    line-height: 1;
}

.cmte-cluster-small {
    width: 34px;
    height: 34px;
    font-size: 12px;
}

.cmte-cluster-medium {
    width: 44px;
    height: 44px;
    font-size: 15px;
}

.cmte-cluster-large {
    width: 52px;
    height: 52px;
    font-size: 18px;
    border-width: 4px;
}

/* Animazione spiderfy */
.cmte-cluster-wrap .leaflet-marker-icon {
    transition: transform 0.3s ease;
}

/* Mobile: cluster più piccoli */
@media (max-width: 768px) {
    .cmte-cluster-icon {
        width: 34px;
        height: 34px;
        font-size: 12px;
        border-width: 2px;
    }
    .cmte-cluster-small {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    .cmte-cluster-medium {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
    .cmte-cluster-large {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }
}

/* === GEOLOCALIZZAZIONE UTENTE === */
.cmte-user-location-wrap {
    background: transparent !important;
    border: none !important;
}

.cmte-user-location {
    position: relative;
    width: 20px;
    height: 20px;
}

.cmte-user-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a9d6f;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 2;
}

.cmte-user-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a9d6f;
    opacity: 0.5;
    z-index: 1;
    animation: cmte-pulse 2s ease-out infinite;
}

/* Manual position marker — orange */
.cmte-manual-dot {
    background: #e67e22 !important;
}

.cmte-manual-pulse {
    background: #e67e22 !important;
}

@keyframes cmte-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(3.5);
        opacity: 0;
    }
}

/* === INFO HOVER PANEL (in alto a sinistra vicino allo zoom) === */
.cmte-info-panel {
    position: absolute;
    top: 15px;
    left: 60px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
    padding: 7px 12px;
    font-size: 12.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    min-width: 195px;
    backdrop-filter: blur(4px);
    padding-right: 26px;
}

.cmte-info-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.cmte-info-panel-row {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}

.cmte-info-panel-row i {
    color: #6c5ce7;
    font-size: 11px;
    width: 12px;
    text-align: center;
}

.cmte-info-label {
    color: #777;
    font-weight: 500;
}

.cmte-info-shortcuts-legend {
    padding: 8px 12px;
    border-top: 1px solid #eee;
    background: #fafafa;
    font-size: 10px;
    color: #888;
    text-align: center;
    border-radius: 0 0 10px 10px;
}

.cmte-info-shortcuts-legend .cmte-shortcut-key {
    display: inline-block;
    background: #e8e8e8;
    color: #666;
    font-size: 9px;
    font-weight: 700;
    border-radius: 3px;
    padding: 1px 5px;
    margin: 0 1px;
    border: 1px solid #d0d0d0;
}

.cmte-shortcut-badge {
    display: inline-block;
    background: #e8e8e8;
    color: #888;
    font-size: 9px;
    font-weight: 700;
    border-radius: 3px;
    padding: 1px 4px;
    margin-left: auto;
    line-height: 1.4;
    border: 1px solid #d0d0d0;
    pointer-events: none;
}

.cmte-info-value {
    color: #222;
    font-weight: 600;
}

#cmte-info-coords .cmte-info-value {
    font-family: 'Courier New', monospace;
    font-size: 11.5px;
    color: #555;
}

/* Comune clickable filter */
.cmte-comune-link {
    cursor: pointer;
    pointer-events: auto;
    border-bottom: 1px dashed #6c5ce7;
    color: #6c5ce7;
    transition: color 0.2s, border-color 0.2s;
}

.cmte-comune-link:hover {
    color: #4834d4;
    border-bottom-style: solid;
}

/* Filter confirmation popup */
.cmte-info-filter-popup {
    display: none;
    position: absolute;
    top: 28px;
    left: 4px;
    right: 4px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    font-size: 12px;
    z-index: 1001;
    pointer-events: auto;
    text-align: center;
}

.cmte-info-filter-popup.open {
    display: block;
}

.cmte-info-filter-msg {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.cmte-info-filter-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.cmte-info-filter-actions button {
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11.5px;
    cursor: pointer;
    transition: background 0.2s;
}

.cmte-info-filter-btn {
    background: #6c5ce7;
    color: #fff;
}

.cmte-info-filter-btn:hover {
    background: #4834d4;
}

.cmte-info-filter-cancel {
    background: #f1f2f6;
    color: #555;
}

.cmte-info-filter-cancel:hover {
    background: #dfe4ea;
}
.cmte-info-settings-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    cursor: pointer;
    color: #999;
    font-size: 11px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    pointer-events: auto;
}

.cmte-info-settings-btn:hover {
    color: #6c5ce7;
    background: rgba(108, 92, 231, 0.1);
}

/* Settings dropdown menu */
.cmte-info-settings-menu {
    display: none;
    position: absolute;
    top: 28px;
    right: 4px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    font-size: 12px;
    min-width: 140px;
    z-index: 1001;
    pointer-events: auto;
}

.cmte-info-settings-menu.open {
    display: block;
}

.cmte-info-settings-menu label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    cursor: pointer;
    white-space: nowrap;
    color: #444;
}

.cmte-info-settings-menu label:hover {
    color: #6c5ce7;
}

.cmte-info-settings-menu input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: #6c5ce7;
}

/* Weather row */
#cmte-info-weather .cmte-info-value {
    font-size: 13px;
    font-weight: 500;
}

/* Open now row */
#cmte-info-opennow .cmte-info-value {
    font-size: 13px;
    font-weight: 500;
}

/* AQI row */
#cmte-info-aqi .cmte-info-value {
    font-size: 13px;
    font-weight: 500;
}

/* Sun row */
#cmte-info-sun .cmte-info-value {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

/* Wiki row */
#cmte-info-wiki .cmte-info-value {
    font-size: 13px;
    font-weight: 500;
}

.cmte-wiki-link {
    display: inline-flex;
    align-items: center;
    color: #8e44ad;
    background: #f3e5f5;
    border: 1px solid #d7bde2;
    border-radius: 14px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.cmte-wiki-link:hover {
    background: #e1bee7;
    border-color: #8e44ad;
}

.cmte-wiki-open-icon {
    margin-left: 5px;
    font-size: 11px;
    color: #8e44ad;
}

/* Wikipedia popup */
.cmte-wiki-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
}

.cmte-wiki-popup.open {
    display: block;
}

.cmte-wiki-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.cmte-wiki-popup-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.cmte-wiki-popup-close:hover {
    color: #e74c3c;
}

.cmte-wiki-popup-content {
    padding: 12px 16px;
}

.cmte-wiki-item {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cmte-wiki-item:last-child {
    border-bottom: none;
}

.cmte-wiki-thumb {
    width: 50px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.cmte-wiki-thumb-empty {
    background: #f0f0f0;
    border: 1px dashed #ddd;
}

.cmte-wiki-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.cmte-wiki-info a {
    color: #8e44ad;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-word;
}

.cmte-wiki-info a:hover {
    text-decoration: underline;
}

.cmte-wiki-dist {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* Photos / Street View popup */
.cmte-photos-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
}

.cmte-photos-popup.open {
    display: block;
}

.cmte-photos-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.cmte-photos-popup-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.cmte-photos-popup-close:hover {
    color: #e74c3c;
}

.cmte-photos-popup-content {
    padding: 12px 16px;
}

.cmte-photos-popup-content a {
    display: flex !important;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.cmte-photos-popup-content a:hover {
    background: #f5f5f5;
}

.cmte-photos-popup-content img {
    width: 80px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-right: 10px !important;
}

.cmte-photos-popup-content i.fas {
    width: 80px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    background: #f8f8f8;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #999;
    font-size: 24px;
    margin-right: 10px;
}

/* === PERCORSO MULTI-TAPPA === */
.cmte-route-panel {
    position: absolute;
    top: 65px;
    right: 10px;
    width: 320px;
    max-height: 70%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cmte-route-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1a73e8;
    color: #fff;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
}

.cmte-route-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmte-route-expand-icon {
    font-size: 14px;
    opacity: 0.7;
    display: none;
}

.cmte-route-count {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 13px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.cmte-route-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmte-route-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.cmte-route-close:hover {
    opacity: 1;
}

.cmte-route-stops {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    max-height: 250px;
}

.cmte-route-empty {
    color: #888;
    font-size: 13px;
    text-align: center;
    padding: 20px 10px;
    font-style: italic;
}

.cmte-route-mode {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background: #f9fbff;
}

.cmte-route-mode-btn {
    flex: 1;
    padding: 8px 6px;
    background: #fff;
    border: 1px solid #d0e0ff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.cmte-route-mode-btn:hover {
    background: #eef4ff;
}

.cmte-route-mode-btn.active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}

.cmte-route-stop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-bottom: 1px solid #eee;
}

.cmte-route-stop-item:last-child {
    border-bottom: none;
}

.cmte-route-stop-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.cmte-route-stop-name {
    flex: 1;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmte-route-stop-controls {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.cmte-route-stop-controls button {
    background: #f0f4ff;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #1a73e8;
    transition: background 0.15s;
}

.cmte-route-stop-controls button:hover:not(:disabled) {
    background: #d0e0ff;
}

.cmte-route-stop-controls button:disabled {
    opacity: 0.3;
    cursor: default;
}

.cmte-route-stop-controls .cmte-route-remove {
    color: #dc3545;
}

/* === LENTE D'INGRANDIMENTO === */
.cmte-magnifier {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 3px rgba(255,255,255,0.9), 0 0 0 5px rgba(0,0,0,0.3);
    display: none;
}

.cmte-magnifier-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cmte-magnifier-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ddd;
}

.cmte-magnifier-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    box-sizing: border-box;
    pointer-events: none;
}

/* Crosshair al centro della lente */
.cmte-magnifier::before,
.cmte-magnifier::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: rgba(255,255,255,0.6);
    pointer-events: none;
    z-index: 2;
}
.cmte-magnifier::before {
    width: 16px;
    height: 1px;
    transform: translate(-50%, -50%);
}
.cmte-magnifier::after {
    width: 1px;
    height: 16px;
    transform: translate(-50%, -50%);
}

/* Pulsante lente attivo */
#cmte-btn-magnifier.active {
    background: #1a73e8;
    color: #fff;
}

/* Controlli zoom lente nella toolbar */
#cmte-toolbar-magnifier-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(26,115,232,0.1);
    border-radius: 20px;
    padding: 2px 4px;
}

.cmte-magnifier-zoom-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #1a73e8;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-align: center;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmte-magnifier-zoom-btn:hover {
    background: #e8f0fe;
}

.cmte-magnifier-zoom-label {
    min-width: 22px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #1a73e8;
    padding: 0 2px;
}

/* Su mobile, lente più piccola */
@media (max-width: 768px) {
    .cmte-magnifier {
        width: 170px;
        height: 170px;
    }
}

.cmte-route-stop-controls .cmte-route-remove:hover {
    background: #ffe0e0;
}

.cmte-route-actions {
    padding: 8px 12px;
    border-top: 1px solid #eee;
}

.cmte-route-calc-btn {
    width: 100%;
    padding: 10px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s;
}

.cmte-route-calc-btn:hover {
    background: #1557b0;
}

.cmte-route-result {
    padding: 0 12px;
}

.cmte-route-loading {
    text-align: center;
    padding: 12px;
    color: #1a73e8;
    font-size: 13px;
}

.cmte-route-error {
    text-align: center;
    padding: 12px;
    color: #dc3545;
    font-size: 13px;
}

.cmte-route-summary {
    display: flex;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid #eee;
}

.cmte-route-dist, .cmte-route-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.cmte-route-steps {
    padding: 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
}

.cmte-route-steps-title {
    font-weight: 600;
    font-size: 13px;
    color: #1a73e8;
    padding: 8px 0 4px;
    border-top: 1px solid #eee;
}

.cmte-route-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cmte-route-step:last-child {
    border-bottom: none;
}

.cmte-route-step-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1.4;
}

.cmte-route-step-text {
    flex: 1;
    font-size: 12px;
    color: #444;
}

.cmte-route-step-dist {
    color: #888;
    font-size: 11px;
}

/* Responsive */
@media (max-width: 768px) {
    .cmte-route-panel {
        top: 115px;
        bottom: auto;
        right: 10px;
        left: 10px;
        width: calc(100% - 20px);
        max-height: 45vh;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    }
    .cmte-route-header {
        border-radius: 12px 12px 0 0;
    }
    .cmte-route-expand-icon {
        display: inline-block;
    }
    .cmte-route-stops,
    .cmte-route-steps {
        max-height: 120px;
    }
    /* Mini-bar collapsed state */
    .cmte-route-panel.cmte-route-collapsed {
        max-height: none;
    }
    .cmte-route-panel.cmte-route-collapsed .cmte-route-stops,
    .cmte-route-panel.cmte-route-collapsed .cmte-route-mode,
    .cmte-route-panel.cmte-route-collapsed .cmte-route-actions,
    .cmte-route-panel.cmte-route-collapsed .cmte-route-result,
    .cmte-route-panel.cmte-route-collapsed .cmte-route-steps {
        display: none;
    }

    /* Info panel compatto su mobile */
    .cmte-info-panel {
        top: 115px;
        left: 70px;
        right: 15px;
        min-width: 0;
        width: auto;
        max-width: 260px;
        margin: 0 auto;
        max-height: 160px;
        overflow-y: auto;
        padding: 5px 8px;
        font-size: 11px;
        z-index: 1002;
        pointer-events: auto;
    }

    .cmte-info-panel .cmte-info-panel-row {
        line-height: 1.4;
        gap: 4px;
    }

    .cmte-info-panel .cmte-info-row i {
        font-size: 10px;
        width: 10px;
    }
}

/* Menu mobile WordPress sopra la toolbar CMT */
.wp-block-navigation__responsive-container.is-menu-open {
    z-index: 100000 !important;
}

/* Nascondi toolbar CMT quando il menu mobile è aperto */
body:has(.wp-block-navigation__responsive-container.is-menu-open) .cmte-toolbar,
body:has(.wp-block-navigation__responsive-container.is-menu-open) .cmte-mobile-search {
    display: none !important;
}

/* Mirino centro mappa per info panel mobile */
.cmte-info-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1000;
}

/* Tooltip temporaneo bottoni toolbar su mobile */
.cmte-btn-tooltip {
    position: fixed;
    transform: translateY(-50%);
    background: rgba(33, 33, 33, 0.92);
    color: #fff;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: normal;
    line-height: 1.35;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 100001;
    max-width: min(220px, calc(100vw - 80px));
    box-sizing: border-box;
    overflow-wrap: break-word;
    text-align: left;
}

.cmte-btn-tooltip.visible {
    opacity: 1;
}

.cmte-btn-tooltip::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: rgba(33, 33, 33, 0.92);
}

.cmte-info-crosshair::before,
.cmte-info-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(108, 92, 231, 0.7);
    border-radius: 1px;
}

.cmte-info-crosshair::before {
    top: 11px;
    left: 0;
    width: 24px;
    height: 2px;
}

.cmte-info-crosshair::after {
    top: 0;
    left: 11px;
    width: 2px;
    height: 24px;
}
