body.no-scroll { overflow: hidden; }

html, body, .location-buttons-wrapper, .content-sheet, .desktop-location-buttons-wrapper, .lixeiras-wrapper .location-buttons, .sugestao-modal-content {
    scrollbar-width: thin;
    scrollbar-color: #adb5bd transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #6c757d;
}

.banner-estatico, 
.desktop-map-info-text {
    display: none; 
}

.map-page-container {
    position: relative; 
    height: calc(100vh - var(--header-height-mobile)); 
    overflow: hidden; 
    background-color: var(--cor-fundo-cinza);
}

#map {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; 
    border: none; 
    background-color: var(--cor-fundo-cinza); 
}

.marcador-hover {
    filter: drop-shadow(0 0 5px var(--cor-primaria)); 
    z-index: 1000 !important;
}

.map-info-box {
    position: absolute; top: 15px; left: 15px; right: 15px; z-index: 10; 
    background-color: var(--cor-fundo-pagina); 
    padding: 12px 15px; text-align: center;
    border-radius: 8px; 
    border: 1px solid var(--cor-borda); 
    box-shadow: var(--sombra-suave);
    display: none; 
}
.map-info-box p { font-size: 14px; color: var(--cor-texto-principal); font-weight: 500; margin: 0; }

.search-container {
    position: absolute; 
    top: 15px; left: 15px; right: 15px; 
    z-index: 30; 
    display: flex; align-items: center; 
    background-color: var(--cor-fundo-pagina);
    border: 1px solid var(--cor-borda); 
    border-radius: 8px; 
    box-shadow: var(--sombra-suave);
}

.search-container #search-box {
    flex-grow: 2; border: none; outline: none; 
    height: 48px; font-size: 16px; 
    background: none; padding-left: 15px; 
    font-family: var(--fonte-principal); 
    color: var(--cor-texto-principal);
}
.search-container #search-box::placeholder { color: var(--cor-texto-secundario); }
.search-container i { color: var(--cor-texto-secundario); padding: 0 15px; font-size: 18px; }

.content-sheet { 
    position: absolute; bottom: 0; left: 0; width: 100%; z-index: 20; 
    background-color: var(--cor-fundo-pagina);
    border-top-left-radius: 16px; 
    border-top-right-radius: 16px; 
    padding: 20px; 
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1); 
    max-height: 40vh; 
    transition: max-height 0.3s ease-in-out;
    overflow-y: auto; 
}

.desktop-locations-panel { display: none; }

.content-sheet .handle { 
    width: 40px; height: 5px; background-color: var(--cor-borda); 
    margin: 0 auto 15px auto; border-radius: 5px; display: block;
} 

.content-sheet h3 { 
    font-family: var(--fonte-principal);
    font-size: 1.2rem; font-weight: 700;
    margin-bottom: 15px; color: var(--cor-primaria); 
}

#overview-btn { 
    display: inline-block; 
    padding: 8px 16px; border: none; 
    background-color: var(--cor-texto-secundario);
    color: #fff; border-radius: 8px; 
    cursor: pointer; font-size: 0.9rem; font-weight: 600;
    transition: background-color 0.2s; margin-bottom: 20px;
}
#overview-btn:hover { background-color: var(--cor-texto-principal); } 

.location-buttons-wrapper { 
    max-height: calc(40vh - 80px); 
    overflow-y: auto;
}

.location-list { list-style: none; padding: 0; margin: 0; }

.location-card {
    display: flex; align-items: center; 
    padding: 12px; margin-bottom: 10px;
    background-color: var(--cor-fundo-pagina); 
    border: 1px solid var(--cor-borda); 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    cursor: pointer; transition: all 0.2s ease;
}

.location-card:hover {
    box-shadow: var(--sombra-suave);
    border-color: var(--cor-primaria-clara);
    transform: translateY(-2px);
}

.location-card img {
    width: 48px; height: 48px; 
    border-radius: 8px; margin-right: 12px; 
    object-fit: cover; flex-shrink: 0;
}

.location-info { flex-grow: 1; }
.location-info h4 {
    font-size: 1rem; font-weight: 600;
    color: var(--cor-texto-principal); margin-bottom: 2px;
}
.location-info p {
    font-size: 0.85rem; color: var(--cor-texto-secundario); line-height: 1.3;
}

.lixeiras-wrapper .back-button { 
    display: flex; align-items: center; width: 100%;
    background-color: var(--cor-fundo-suave); 
    color: var(--cor-primaria); 
    padding: 12px; margin-bottom: 15px; 
    font-weight: 600; border: 1px solid var(--cor-primaria); 
    border-radius: 8px; cursor: pointer;
    font-family: var(--fonte-principal); font-size: 0.9rem; text-transform: uppercase;
    transition: all 0.2s ease;
}
.lixeiras-wrapper .back-button:hover { background-color: var(--cor-primaria); color: #fff; } 
.lixeiras-wrapper .back-button .fas { margin-right: 10px; }

.lixeiras-wrapper h3 { 
    font-size: 1.1rem; font-weight: 700; 
    margin-bottom: 15px; color: var(--cor-texto-principal);
}

.lixeiras-wrapper .location-buttons { display: flex; flex-direction: column; gap: 8px; }

.lixeiras-wrapper .location-buttons button { 
    width: 100%; padding: 12px; 
    font-family: var(--fonte-principal); 
    font-size: 0.9rem; font-weight: 600; 
    color: var(--cor-texto-secundario); 
    background-color: var(--cor-fundo-cinza); 
    border: 1px solid var(--cor-borda); 
    border-radius: 8px; 
    cursor: pointer; text-align: left; 
    transition: all 0.2s ease;
}
.lixeiras-wrapper .location-buttons button:hover { 
    background-color: #fff; border-color: var(--cor-primaria); color: var(--cor-primaria);
}

.lixeiras-wrapper .suggestion-button {
    background-color: var(--cor-primaria) !important; 
    color: #fff !important; 
    padding: 12px; border: none; border-radius: 8px; 
    font-size: 1rem; font-weight: 700; margin-top: 15px; width: 100%; 
    transition: background-color 0.3s ease; text-align: center;
}
.lixeiras-wrapper .suggestion-button:hover { background-color: var(--cor-primaria-hover) !important; }

.lixeira-tipo-titulo {
    font-size: 0.95rem; font-weight: 700;
    color: var(--cor-primaria-hover);
    margin: 15px 0 5px 0; text-transform: uppercase;
    border-bottom: 1px solid var(--cor-borda); padding-bottom: 5px;
}

.modal-overlay {
    display: flex; position: fixed; z-index: 2001; left: 0; top: 0; width: 100vw; height: 100vh;
    -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); background: rgba(0, 0, 0, 0.5);
    align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease-in-out; 
}
.modal-overlay.ativo { opacity: 1; visibility: visible; }

.modal-content {
    background-color: var(--cor-fundo-pagina); 
    border-radius: 16px; width: 90vw; max-width: 600px; 
    max-height: 90vh; padding: 30px; 
    position: relative; display: flex; flex-direction: column; 
    align-items: center; justify-content: center;
    box-shadow: var(--sombra-card);
    transform: translateY(20px); transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
.modal-overlay.ativo .modal-content { transform: translateY(0); opacity: 1; }

.modal-content .close-modal-btn { 
    position: absolute; top: 15px; right: 20px; 
    font-size: 1.5rem; color: var(--cor-texto-secundario); 
    cursor: pointer; background: none; border: none;
}
.modal-content .close-modal-btn:hover { color: var(--cor-primaria); }

.sugestao-modal-content { text-align: left; max-width: 500px; overflow-y: auto; }
.sugestao-modal-content h2 { color: var(--cor-primaria); margin-bottom: 10px; text-align: center; }
.sugestao-modal-content p { text-align: center; color: var(--cor-texto-secundario); margin-bottom: 20px; }

#sugestao-form input[type="text"], #sugestao-form textarea {
    width: 100%; padding: 10px; font-family: var(--fonte-principal);
    border: 1px solid var(--cor-borda); border-radius: 8px;
    background-color: var(--cor-fundo-cinza); margin-bottom: 15px;
}
#sugestao-form label { font-weight: 600; color: var(--cor-texto-principal); margin-bottom: 5px; display: block; }
.sugestao-submit-btn { width: 100%; padding: 12px; margin-top: 10px; font-size: 1rem; }

/* --- BOTÃO DE GEOLOCALIZAÇÃO --- */
.leaflet-control-custom {
    background-color: #fff;
    width: auto;
    height: 45px;
    padding: 0 18px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
    color: #4b5563;
    font-family: 'Saira', sans-serif;
    z-index: 800;
}
.leaflet-control-custom i {
    font-size: 1.1rem;
    margin-right: 8px;
}
.leaflet-control-custom span {
    font-weight: 600;
    font-size: 0.95rem;
}

.leaflet-control-custom:hover {
    background-color: var(--cor-primaria);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(22, 163, 74, 0.3);
    border-color: var(--cor-primaria);
}

.leaflet-control-custom:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.leaflet-bottom .leaflet-control {
    margin-bottom: 20px;
    margin-right: 20px;
}

/* --- AJUSTES MOBILE --- */
@media (max-width: 768px) {
    .leaflet-control-zoom { display: none !important; }
    
    .leaflet-control-custom {
        position: absolute !important;
        /* Coloca o botão acima do painel deslizante (que tem max 40vh) */
        bottom: 42vh !important; 
        right: 15px !important;
        top: auto !important;
        left: auto !important;
        margin: 0 !important;
        z-index: 1000 !important;
    }
}

@media(max-width:992px) {
    .content-sheet { max-height: 40vh; padding: 15px; }
    .location-card, .lixeiras-wrapper .location-buttons button, .lixeiras-wrapper .back-button {
        padding: 14px 15px; font-size: 15px;
    }
}

@media (min-width: 992px) {

    .banner-estatico {
        display: flex !important;
        position: relative; width: 100%; height: 550px;
        background-size: cover; background-position: center; 
        align-items: center; padding: 0 80px;
        color: #fff; margin-bottom: 40px;
    }
    
    .banner-estatico::before {
        content: ''; position: absolute; top: 0; left: 0; 
        width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.1); z-index: 1; border-radius: inherit;
    }
    
    .banner-content { position: relative; z-index: 2; max-width: 800px; }
    .banner-estatico h1 { font-size: 3rem; font-weight: 700; line-height: 1.2; margin: 0; }

    .map-page-container {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 60px 550px; 
        gap: 30px;
        
        max-width: 1200px;
        height: auto; 
        margin: 20px auto 60px auto !important; 
        padding: 30px;
        
        background-color: var(--cor-fundo-pagina);
        border-radius: 16px;
        box-shadow: var(--sombra-card);
        overflow: visible; 
    }

    .map-page-container { margin-top: 20px !important; }

    .search-container {
        position: relative; top: auto; left: auto; right: auto;
        grid-column: 1 / 2; grid-row: 1 / 2;
        height: 100%;
        box-shadow: none; border: 1px solid var(--cor-borda);
    }

    #map {
        position: relative; 
        grid-column: 1 / 2; grid-row: 2 / 3;
        height: 100%; width: 100%;
        border-radius: 12px;
        border: 1px solid var(--cor-borda);
    }

    .desktop-map-info-text {
        display: block !important;
        text-align: center; max-width: 800px; margin: 0 auto 30px auto;
        color: var(--cor-texto-secundario);
    }
    .desktop-map-info-text strong { color: var(--cor-primaria); }

    .desktop-layout-container {
        grid-column: 2 / 3; grid-row: 1 / 3;
        height: 100%;
        overflow: hidden;
    }

    .desktop-locations-panel {
        display: flex; flex-direction: column;
        height: 100%;
        max-height: 100%;
    }

    .desktop-locations-title {
        font-size: 1.5rem; color: var(--cor-primaria);
        margin-bottom: 15px; font-weight: 700; flex-shrink: 0;
    }

    .desktop-location-buttons-wrapper {
        flex-grow: 1;
        overflow-y: auto;
        padding-right: 10px;
    }

    .lixeiras-wrapper {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
    }

    .lixeiras-wrapper h3 { flex-shrink: 0; }
    .lixeiras-wrapper .back-button { flex-shrink: 0; }

    .lixeiras-wrapper .location-buttons {
        flex-grow: 1;
        overflow-y: auto;
        padding-right: 5px;
    }

    #overview-btn-desktop, 
    .desktop-locations-panel #overview-btn {
        display: inline-block; width: fit-content;
        margin-bottom: 20px; padding: 8px 20px;
        background-color: transparent;
        color: var(--cor-primaria); 
        border: 1px solid var(--cor-primaria);
        border-radius: 6px;
        font-family: var(--fonte-principal); font-size: 13px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.5px;
        cursor: pointer; transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .desktop-locations-panel #overview-btn:hover {
        background-color: var(--cor-primaria);
        color: #fff; 
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
    }

    .content-sheet, .map-info-box { display: none !important; }

    .sugestao-modal-content {
        width: 100%; max-width: 600px; 
        max-height: 85vh; padding: 40px;
        overflow-y: auto;
    }

    .sugestao-modal-content h2 { font-size: 24px; margin-bottom: 15px; }

    #sugestao-form .checkbox-group {
        display: grid; grid-template-columns: 1fr 1fr;
        gap: 12px; margin-top: 10px;
        background-color: var(--cor-fundo-cinza);
        padding: 15px; border-radius: 8px;
    }

    #sugestao-form input[type="text"],
    #sugestao-form textarea {
        background-color: #fff; 
        border: 1px solid #d1d5db;
        transition: border-color 0.2s;
    }

    #sugestao-form input[type="text"]:focus,
    #sugestao-form textarea:focus {
        border-color: var(--cor-primaria);
        outline: none;
        box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
    }

    .sugestao-submit-btn {
        width: 100%; padding: 15px; font-size: 16px; margin-top: 25px;
    }
}