/**
**  MAP FILTER
**/

#map_main .info-box {
    max-width: 80%;
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
    font-size: 12px;
}

/**
**  MAP CONTROLS
**/

.leaflet-control-layers-overlays span {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

#map_main .leaflet-control-zoom,
.leaflet-control-layers.leaflet-control,
.leaflet-control-geocoder.leaflet-bar.leaflet-control {
    border: 1px solid var(--e-global-color-primary);
    border-radius: 0;
}

#map_main .leaflet-bottom.leaflet-right {
    height: 15px;
}

#map_main .leaflet-bottom.leaflet-right a {
    font-size: 10px;
}

/**
**  MAP POPUP
**/
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background-color: var(--e-global-color-459e419);;
}

.leaflet-popup-content {
    display: flex;
    margin-left: 24px;
}

.leaflet-popup-content .popup-inner{
    display: flex;
    flex-direction: column;
}

#map_main .popup_content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#map_main .leaflet-popup-content h6 {
    text-align: center;
    color: #fff;
    margin: 10px 0;
}

#map_main .popup_content div {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

#map_main .popup_content div p:first-child {
    font-weight: 700;
}

#map_main .leaflet-popup-content a h4 {
    font-size: 26px;
    font-weight: 600;
    font-family: "Open Sans", Sans-serif;;
    letter-spacing: -1px;
    margin-bottom: 13px;
    margin-top: 0;
    color: #fff;
}

#map_main .leaflet-popup-close-button span {
    color: #fff;
}

#map_main .leaflet-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#map_main .leaflet-popup-content a:first-child {
    text-align: center;
}

#map_main .leaflet-popup-content img {
    background-color: #fff;
    border: 2px solid var(--e-global-color-accent);
    border-radius: 3px;
}

#map_main .leaflet-popup-content .bottone_dettagli {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 10px 0;
    padding-left: -10px;
}

#map_main .leaflet-popup-content div button {
    background-color: var(--e-global-color-accent);
    border: 1px solid var(--e-global-color-accent);
    padding: 11px 12px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    line-height: 14px;
    cursor: pointer;
}

#map_main .leaflet-popup-content div button:hover {
    background-color: #fff;
    border: 1px solid var(--e-global-color-accent);
    color: var(--e-global-color-accent);
}

#map_main .leaflet-popup-content-wrapper .leaflet-popup-content p {
    color: #fff;
    margin: 0;
    font-family: inherit;
}

@media screen and (max-width: 500px) {
    .leaflet-popup-content {
        width: 150px;
    }

    #map_main .leaflet-popup-content a h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    #map_main .popup_content {
        padding-top: 10px;
    }

    #map_main .popup_content:first-child {
        text-align: center;
    }

    #map_main .leaflet-popup-content img {
        border: 2px solid var(--e-global-color-accent);
        border-radius: 3px;
    }

    #map_main .leaflet-popup-content div button {
        padding: 8px 9px;
        font-size: 12px;
    }

    #map_main .popup_content div p:first-child {
        font-size: 12px;
    }
}

/* Scritta avvertimento touch mappa */
#map_main::after {
    font-size: 14px !important;
}

/* MARKERS */
.leaflet-marker-icon,
.leaflet-marker-shadow {
    -webkit-animation: fadein 1s;
    -moz-animation: fadein 1s;
    -ms-animation: fadein 1s;
    -o-animation: fadein 1s;
    animation: fadein 1s;
}

@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-moz-keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-webkit-keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-ms-keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-o-keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* LEGENDA */
.legenda {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #8cc378e0;
    border: 2px solid var(--e-global-color-secondary);
    padding: 15px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.legenda div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.legenda div img {
    width: 50px;
    height: 50px;
}

.legenda div h5 {
    font-size: 16px;
}

.legenda div h5 strong {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--e-global-color-secondary);
}
