/* ============================================================
   CONTENITORE MAPPE
   ============================================================ */

.cfd-maps-container {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 25px 0;
    padding: 20px;
}


/* ============================================================
   CONTENITORE SINGOLA MAPPA
   ============================================================ */

.cfd-map-box {
    width: 100%;
    text-align:center;
}


.cfd-map-box h2 {
    color: #ffd21f;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin: 0 0 18px 0;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    background: linear-gradient(
    to right,
    rgb(0, 180, 216) 0%,
    rgb(0, 119, 182) 25%,
    rgb(47, 94, 161) 85%
);
    padding: 6px 20px;
    border-radius: 6px;
    font-family: "Jersey 25", sans-serif;
}


/* ============================================================
   MAPPA
   ============================================================ */

.cfd-map {
    width: 100%;
    height: 520px;

    border-radius: 6px;

    overflow: hidden;

    border: 1px solid #ccc;
}


/* ============================================================
   MARKER CON VALORE
   ============================================================ */

.cfd-marker-wrapper {
    background: transparent !important;

    border: none !important;
}


.cfd-value-marker {

    width: 30px;
    height: 30px;

    border-radius: 35%;

    border: 2px solid #ffffff;

    box-shadow:
        0 1px 4px rgba(
            0,
            0,
            0,
            0.45
        );

    display: flex;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;
}


.cfd-marker-value {

    color: #ffffff;

    font-size: 9px;

    font-weight: 700;

    line-height: 1;

    white-space: nowrap;

    text-shadow:
        0 1px 2px rgba(
            0,
            0,
            0,
            0.65
        );
}


/* ============================================================
   TEMPERATURA
   ============================================================ */

.cfd-temperature-marker {

    border-color: #ffffff;

}


/* ============================================================
   PRECIPITAZIONI
   ============================================================ */

.cfd-rain-marker {

    border-color: #ffffff;

}


/* ============================================================
   POPUP
   ============================================================ */

.cfd-map-popup {

    font-size: 14px;

    line-height: 1.5;

    min-width: 150px;

}


.cfd-map-popup-name {

    font-weight: 700;

    font-size: 15px;

    margin-bottom: 4px;

}


.cfd-map-popup-value {

    font-size: 18px;

    font-weight: 700;

}


.cfd-map-popup-time {

    font-size: 12px;

    color: #666;

    margin-top: 2px;

}


/* ============================================================
   LEGENDA
   ============================================================ */

.cfd-map-legend,
.cfd-map-legend.leaflet-control {

    background: rgba(4, 21, 34, 0.6);
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    font-size: 0.78rem;
    line-height: 1.4;
    backdrop-filter: blur(4px);

}


.cfd-legend-title {
    color: #ffd21f;
    font-family: "Jersey 25", sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 210, 31, 0.25);
}


.cfd-legend-row {
    display: inline-flex;
    align-items: center;
    font-size: 0.55rem;
    margin-right: 10px;
    margin-bottom: 2px;
    white-space: nowrap;
    gap: 1px;
    min-height: 18px;
}


.cfd-legend-color {
    display: inline-block;
    width: 5px;
    height: 10px;
    margin-right: 4px;
    border-radius: 2px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.cfd-map-legend .cfd-legend-row span:last-child {
    color: #e8eef2;
    white-space: nowrap;
    margin-right: 0;
}


/* ============================================================
   LEAFLET
   ============================================================ */

.cfd-map .leaflet-control-attribution {

    font-size: 7px;

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 900px) {

    .cfd-maps-container {
        grid-template-columns: 1fr;
    }

    .cfd-map {
        height: 450px;
    }
    
}


@media (max-width: 600px) {

    .cfd-map {
        height: 400px;
    }


    .cfd-value-marker {
        width: 30px;
        height: 30px;
    }

    .cfd-marker-value {
        font-size: 8px;
    }
    
    .cfd-map-legend {
        padding: 8px 9px;
        font-size: 0.7rem;
    }

    .cfd-legend-title {
        font-size: 0.82rem;
    }

    .cfd-legend-color {
        width: 12px;
        height: 12px;
    }

}