@keyframes pulsate {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

.leaflet-control-scale-line {
    position: absolute;
    bottom: 80px !important;

}
.leaflet-control-geocoder .leaflet-control-geocoder-icon:hover {
       background-color: rgb(194, 194, 194);
}
div[id^="responses-container-"] {
    max-height: 190px;
    overflow-y: auto;
    margin-top: 0px;
    padding: 0px 5px;
    background-color: #ebebeb;
}
#loader {
    display: block !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10000 !important;
    /* background-color: rgba(255, 255, 255, 0.9) !important; */
    padding: 30px 40px !important;
    border-radius: 12px !important;
    font-size: 1.2em !important;
    text-align: center !important;
    color: #333 !important;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 5px solid rgba(0, 0, 0, 0.2);
    border-top: 5px solid #333; /* Colore del cerchio rotante */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px; /* Centra lo spinner e aggiunge spazio sotto */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.blinking-marker {
    position: relative;
}

.blinking-marker::after {
    content: '';
    position: absolute;
    top: 0px;
    left: -1px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: transparent;
    animation: pulsate 1.5s infinite;
}
/* .leaflet-bar {
    display: none;
} */

.leaflet-control-zoom {
    display: none;
}

/* Stile di default del pulsante "Mi piace" */
.like-button {
    cursor: pointer;
    color: gray;
    /* Colore iniziale del pulsante quando non è cliccato */
    transition: color 0.3s ease;
    /* Aggiunge una transizione fluida per il cambio di colore */
}

/* Stile del pulsante "Mi piace" quando è stato cliccato */
.like-button.liked {
    color:#27AC9A;
    /* Colore quando è "piaciuto" (puoi cambiare in azzurro) */
}

.osgr-filter-btn.active {
    background-color: #27AC9A;
    color: white;
    border-color: #27AC9A;
}

.osgr-filter-btns {
    display: flex;
    position: absolute;
    bottom: 27px;
    left: 48%;
    z-index: 973;
    flex-wrap: wrap;
    gap: 5px;

    /* background-color: #f9f9f9; */
}

.osgr-filter-btn {
    padding: 3px 5px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 12px;
    color: #333;
}

.osgr-buttons-container {
    display: flex;
    flex-wrap: wrap;
    /* Permette ai pulsanti di andare a capo se lo spazio è insufficiente */
    gap: 2px;
}

.osgr-map-button {
    padding: 10px 10px;
    background-color: #999;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Migliora la transizione su colore */
    font-size: 14px;
    /* Font più leggibile */
    color: #fff;
    /* Colore di testo bianco per migliorare contrasto */
}

#osgr-fullscreen-button {
    background-color: transparent;
    color: #0073aa;
    margin-left: auto;
    /* Spinge il pulsante fullscreen a destra */
}

#osgr-fullscreen-button:hover {
    color: #005177;
}

.osgr-map-button.active {
    background-color: #27AC9A;
    color: #fff;
}

.osgr-map-button:hover {
    background-color: #db1616;
    color: #fff;
}

@media (max-width: 768px) {
    .osgr-map-button {
        padding: 5px 5px;
        font-size: 10px;
        /* Font leggermente più piccolo */
    }

    .osgr-filter-btns {
        bottom: 78px;
        left: 6px;

    }
        .leaflet-control-scale-line {
            position: absolute;
            bottom: 70px !important;
    
        }

    .osgr-filter-btn {

        font-size: 10px;
    }
        div[id^="responses-container-"] {
            max-height: 90px;
    
        }
}












.osgr-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
    justify-content: flex-start;
    /* flex-direction: row-reverse; */
    color: black;
    font-size: 12px;
}

.osgr-legend {
    display: none;
    padding: 0 10px;
    position: absolute;
    top: 95px;
    right: 6px;
    z-index: 5000;
    background-color: #d1d1d1e8;
    border-radius: 5px;
}

/* CSS per mostrare la leggenda quando attiva */
.osgr-legend.visible {
    display: block;
}

button#toggle-legend {
    position: absolute;
    top: 50px;
    right: 15px;
    z-index: 500;
    background-color: #474747;
    border-radius: 5px;
    padding: 8px 10px;
}

.toggle-legend-btn {
    display: block;
}

.response-form textarea {
    width: 100%;
    height: 60px;
    margin-top: 5px;
    border-radius: 5px;
    padding: 8px;
    font-size: 14px;
}

.response-form button {
    margin-top: 0px;
    padding: 5px 10px;
    width: 25%;
    background-color: #27AC9A;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.response-form button:hover {
    background-color: #005177;
}

.response-list {
    max-height: 210px;
    /* overflow-y: auto; */
    /* margin-bottom: 10px; */
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.32);
}

/* .response-item {
    padding: 10px;
    margin-bottom: 5px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
} */
.response-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.response-item img {
    margin-left: 10px;
    max-height: 45px;
    max-width: 45px;
}

.response-item p {
    flex-grow: 1;
    margin: 0;
}

.response-item:last-child {
    margin-bottom: 0;
}

.response-item strong {
    display: block;
    font-weight: 600;
    color: #333;
}

.response-item em {
    font-size: 0.9em;
    color: #777;
    display: block;
    margin-bottom: 5px;
}

.leaflet-container a {
    color: #a3a3a3 !important;
}


.leaflet-popup-content p {
    margin: 0px 0 !important;
}



.leaflet-popup-content {

    width: 500px !important;
}


.leaflet-top,
.leaflet-bottom {
    z-index: 500 !important;
}

#raccomandazioni-privacy {
    position: relative;
    /* bottom: -20px; */
    z-index: 101;
    font-size: 10px;
    background-color: darkgray;
    /* width: 100%; */
    color: white;
    text-align: right;
    padding: 5px 20px 5px 5px;
    line-height: 10px;
}

#tue-segnalazioni {
    padding: 10px;
    position: absolute;
    bottom: 35px;
    right: 0px;
    z-index: 700;
    font-size: 14px;
    /* effetto illuminazione posteriore del testo in grigio */
    text-shadow: 0 0 5px #464646;
}

#tue-segnalazioni a {
    color: white;
}

#osgr-map {
    width: 100%;
    height: 70vh;
}

/* Modalità fullscreen */
#osgr-map:fullscreen {
    height: 100vh;
    width: 100%;
}

/* Compatibilità per WebKit (Chrome, Safari) */
#osgr-map:-webkit-full-screen {
    height: 100vh;
    width: 100%;
}

/* Compatibilità per Mozilla Firefox */
#osgr-map:-moz-full-screen {
    height: 100vh;
    width: 100%;
}

/* Compatibilità per Microsoft Edge */
#osgr-map:-ms-fullscreen {
    height: 100vh;
    width: 100%;
}


textarea[id^="response_"],
textarea#description {
    min-height: 1em;
    width: 100%;
}

.custom-svg-marker.hidden {
    opacity: 0.5;
}

.osgr-filter-checkbox {
    margin-left: 5px !important;
}

.share-buttons-popup {
    text-align: right;
}


.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-container .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 600;
    bottom: 100%;
    left: -50px;
    margin-left: -30px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

#rispostaimmagine {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #a1a1a1;
    margin-top: 3px;
    padding-top: 3px;
    flex-direction: row;
}

#rispostaimmaginesegna {
    display: flex;
    justify-content: space-between;
    /* align-items: center; */
    border-top: 1px solid #a1a1a1;
    margin-top: 3px;
    flex-direction: row;
    padding-bottom: 10px;
    padding-top: 3px;

}





@media only screen and (min-width: 768px) and (max-width: 1024px) {
        .osgr-legend {
        padding: 3px;
    }
.leaflet-control-scale-line {
    position: absolute;
    bottom: 50px !important;

}
    .osgr-legend-item {
        font-size: 10px;
        margin-bottom: 0px;
    }

    span.osgr-legend-color {
        padding: 0px;
        margin: -2px !important;
    }

    #raccomandazioni-privacy {
        font-size: 8px;
        line-height: 8px;
        padding: 5px 5px;
    }

    #osgr-map {
        height: 75vh;
    }

    .leaflet-popup-content {

        width: 301px !important;
    }



 
}


@media only screen and (max-width: 768px) {

    button#toggle-legend {
        top: 34px;

    }
   .leaflet-popup-content {

       width: 300px !important;
   }

}





/* Stili per l'icona */
#info-icon {
    cursor: pointer;
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #27AC9A;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
}

/* Stili per il popup */
#instructions-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    border-radius: 8px;
}

/* Stili per il popup su dispositivi mobili */
@media (max-width: 768px) {

    #instructions-popup {
        width: 100%;
        height: 100%;
        max-width: 90%;
        max-height: 100%;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }

    #close-popup {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

/* Overlay scuro */
#instructions-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Stile per il pulsante di chiusura */
#close-popup {
    cursor: pointer;
    background-color: red;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    float: right;
}

/* Stili per i titoli espandibili */
.expandable {
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
}

.expandable::after {
    content: ' ▼';
    font-weight: normal;
}

.expandable.expanded::after {
    content: ' ▲';
    font-weight: normal;
}

.content {
    display: none;
    margin-left: 15px;
}

.expanded+.content {
    display: block;
}












.dot {
    display: inline-block;
    margin-left: 2px;
    animation: dot-blink 1.2s infinite step-start;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-blink {

    0%,
    20% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.loader {
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
}

.loader span {
    display: inline-block;
    animation: dot-blink 1.2s infinite step-start;
}

.loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-blink {

    0%,
    20% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}



















#geojson-layer-controls {
    display: none;
    /* Nascondi il div fuori dallo schermo */
    transition: left 0.4s ease;
}

#geojson-layer-controls.open {
    display: block;
    /* Quando aperto, porta il div all'interno della visuale */
}

#toggle-geojson-controls {
    cursor: pointer;
    color: white;
    padding: 10px;
}

#toggle-geojson-controls:hover {
    color: #27AC9A
}