/* RESET */
body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    overflow: hidden;
/*
    overflow-x: hidden;
    overflow-y: auto;
*/
}

/* 🗺️ MAPA FUNDO */
#mapa-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

#mapa-bg iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: brightness(0.6) saturate(1.2);
}

/* 🧠 UI SOBREPOSTA */
#ui {
	pointer-events: none; /* 🔥 deixa o clique passar pro mapa */
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    height: 100vh;
    padding: 40px;
    box-sizing: border-box;
    padding: 0;
}

/* 🔹 LEFT PANEL */
#left-panel {
	pointer-events: auto; /* 🔥 esses continuam interativos */
/*
    width: 27%;
*/
    width: 500px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: linear-gradient(90deg, 
        rgba(1, 31, 54, 1) 0%, 
        rgba(13, 69, 112, 0) 100% 
    );
}


.logo {
    font-size: 18px;
    font-weight: 700;
    opacity: 0.9;
}

#left-panel h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    padding-left: 40px;
    padding-top: 30px;
    margin-bottom: 0px;
    text-shadow: 1px 1px 2px black;
}

.subtitle {
    font-size: 18px;
    opacity: 0.8;
    padding-left: 41px;
    display: flex;
    align-items: center;
}

#left-panel hr {
    border: none;
    height: 2px;
    background-color: #64ff64;
    box-shadow: 0 0 8px #64ff64,
                0 0 15px rgba(100, 255, 100, 0.1);
    opacity: 0.8;
    width: 30px;
    margin-top: 0px;
    margin-left: 40px;
}

.description {
    font-size: 14px;
    opacity: 0.7;
    max-width: 400px;
    padding-left: 40px;
}

#inset-map {
    position: absolute;
    bottom: 35px;
    left: 35px;
    width: 18%;
/*
    width: 360px;
*/
    height: auto;
    z-index: 20;
    opacity: 0.9;
    pointer-events: none; /* 🔥 não bloqueia o mapa */
    filter: drop-shadow(5px 10px 4px #000000);
}


#seta {
    position: absolute;
    bottom: 25px;
    left: 25px;
    width: 100px;   /* ajusta conforme quiser */
    height: auto;
    z-index: 21;
    opacity: 0.7;
    pointer-events: none; /* 🔥 não bloqueia o mapa */
}



/* 🔹 LEGENDA */
.legend {
    display: flex;
    font-size: 13px;
    opacity: 0.8;
    margin-left: 50px;
    height: auto;
    overflow: hidden;
    margin-bottom: 0px;
/*
    border: 1px solid black;
*/
    margin-top: 15px;
    z-index: 21;
}

.leg {
/*
    display: flex;
*/
/*
    width: 220px;
*/
/*
    gap: 10px;
*/
    width: auto;
}

.leg > div {
/*
    display: grid;
*/
    display: inline-block;
/*
    gap: 10px;
*/
    padding: 0 20px 10px 0;
    text-shadow: 1px 1px 2px black;
}

.dot {
    height: 20px;
    width: 20px;
    border-radius: 15%;
    display: block;
    display: inline-block;
    vertical-align: -4px; /* ajuste fino por fonte */
    margin-right: 5px;
}

.dot2 {
    height: 2px;
    width: 20px;
    display: block;
    margin-right: 8px;
    display: inline-block;
    vertical-align: 2px; /* ajuste fino por fonte */
    margin-right: 8px;
}

.cerrado_uf { background: #FAC500; border: 1px solid #FAC500 }
.uc { background: #FE3B00; border: 1px solid #FFFF00 }
.buff5 { background: #325D45; border: 1px solid #117517 }
.buff10 { background: #673B8A; border: 1px solid #331DC4 }
.buff20 { background: #D07715; border: 1px solid #B44622 }
.divisas { background: #DE1A00; }


.cerrado { background: #188d45; }
.pastagens { background: #d4c575; }
.agricultura { background: #ffddbb; }
.urbano { background: #99089d; }
.rios { background: #0c18cb; }
.sem_vegetacao { background: #7dc975; }



/* 🔹 RIGHT PANEL */
#right-panel {
    pointer-events: auto; /* 🔥 esses continuam interativos */
    width: 385px;
    height: 100vh;
    display: flex;
/*
    display: none;
*/
}



/* SIDEBAR GERAL */
#info {
    width: 100%;
    height: 100%;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    padding: 0;
/*
    overflow-y: auto;
*/
    overflow: hidden; /* 🔥 importante */
    box-sizing: border-box;
    position: relative;
    
    display: flex;
    flex-direction: column;
}

/* CONTAINER INTERNO */
/*
#content {
    padding: 18px;
    height: 100%;
    overflow-y: auto;
    flex: 1;
}
*/

#content {
/*
    padding: 18px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
*/
    padding: 18px;

    flex: 1;

    overflow-y: auto;

    min-height: 0;
}

/*  HEADER (Título e ícone) */
.header-section {
    display: flex;
    gap: 12px;
    padding-top: 5px;
    margin-bottom: 15px;
    align-items: flex-start; /* 👈 ADICIONE ISSO */
}

.header-icon {
    width: 48px;
    height: 48px;
/*
    background-color: #f0fdf4;
*/
    background-color: #98FB98;
    color: #15803d;
    border-radius: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    /* Opcional: alinhar o ícone no topo também */
    margin-top: 2px; 
}

.header-text {
    display: flex;           /* 👈 ADICIONE ISSO */
    flex-direction: column;  /* 👈 ADICIONE ISSO */
    align-items: flex-start; /* 👈 ADICIONE ISSO */
    margin-top: 2px; 
}

.header-text h1 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 0 0;
    line-height: 1.2;
}

.header-text .subtitle {
    font-size: 12px;
    color: #64748b;
    display: block;
    /* Garante que não tenha margem estranha */
    margin: 0;
    padding: 0;
}


.header-text .subtitle .tipologia {
    color: orangered;
    font-weight: 600;
}


/*
.badge-pressao {
    color: #15803d;
    font-weight: 600;
}
*/

/* 🔹 SEÇÕES DE DADOS (Área, Municípios, etc) */

.area-section {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-top: 1px solid #E5E5E5;
    line-height: 1;
    padding: 12px 0 8px;
/*
    margin-bottom: 14px;
*/
}

.area-icon {
    width: 36px;
    height: 36px;
    background-color: #f0f0f0;
    color: #15803d;
    border-radius: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    /* Opcional: alinhar o ícone no topo também */
    margin-top: 2px; 
}

.data-block {
    margin-bottom: 14px;
}

.data-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #515F7A;
    margin-bottom: 4px;
    display: block;
}

.data-value {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.data-text {
    font-size: 12px;
    color: #334155;
    line-height: 1.5;
    font-weight: 400;
}

/* 🔹 CARD DE ÍNDICE DE PRESSÃO */
.pressure-card {
    background-color: #f8fafc; /* Cinza muito claro */
    border-radius: 12px;
    padding: 8px 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.pressure-value {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
}

.pressure-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 10px 3px 10px;
    border-radius: 7px;
    background-color: #e2e8f0;
    color: #475569;
}

/* Cores dinâmicas do badge */
.pressure-badge.muito_baixo { background-color: #1E3A8A; color: white; }
.pressure-badge.baixo { background-color: #3B82F6; color: white; }
.pressure-badge.moderado { background-color: #2E8B57; color: white; }
.pressure-badge.alto { background-color: #F97316; color: white; }
.pressure-badge.muito_alto { background-color: #DC2626; color: white; }


/* 🔹 LISTAS DE USO DO SOLO (Tabela limpa) */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    border-bottom: 1px solid #E5E5E5;
    line-height: 1;
    margin-bottom: 5px;
}

.data-row .name {
    color: #475569;
    font-weight: 500;
}

.data-row .value {
    font-weight: 700;
    color: #0f172a;
}

/* 🔹 ESTADO VAZIO */
#empty-state {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f8fafc;
    
    flex: 1;
}

.empty-content {
    opacity: 0.7;
    max-width: 260px;
}

.empty-content .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.empty-content h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1e293b;
}

.empty-content p {
    font-size: 13px;
    color: #64748b;
}



/* CONTROL-SCALE */

/* 🔥 move SOMENTE a escala */
.leaflet-control-scale {
    transform: translateX(-405px);
    margin-bottom: 20px;
    z-index: 1000;
}

/* opcional: melhora visual */
.leaflet-control-scale-line {
    background: rgba(255,255,255,0.9);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    border: none;
}



/* 🔻 footer fixo */
#sidebar-footer {
    padding: 12px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #E5E5E5;
    background: #ffffff;
    color: #334155;
    flex-shrink: 0;
}

#sidebar-footer a {
    font-weight: bold;
    color: orangered;
    text-decoration: none;
}




.social-icons {
    display: flex;
    gap: 10px;
    padding: 0px;
    padding-left: 10px;
}

.social-icons a {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: orangered;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.social-icons a:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    color: #764ba2;
}






/* Abas Segmented Control */
.uc-filter {
    display: flex;
    gap: 6px;
    margin: 10px 40px 15px 40px;
}

.uc-filter button {
    flex: 1;
    padding: 8px 8px 5px 8px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.uc-filter button:hover {
    background: rgba(255,255,255,0.2);
}

.uc-filter button.active {
    background: #64ff64;
    color: black;
    font-weight: 600;
}






/* ===== MODAL DE INFORMAÇÕES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-conteudo {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fechar {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.fechar:hover {
    color: #e74c3c;
}

.modal-conteudo h2 {
    font-family: helvetica;
    font-size: 2.4rem;
    font-weight: 600;
    color: #2c3e50;
    padding: 30px 40px 10px 40px;
    margin: 0;
}

.modal-subtitulo {
    font-size: 1.8rem;
    color: #666;
    padding: 0 40px 20px 40px;
    margin: 0;
    border-bottom: 2px solid #f0f0f0;
}

/* Abas */
.abas {
    display: flex;
    padding: 0 40px 0 40px;
    border: none;
    background: #DEE3E8;
    margin-top: 20px;
}

.aba-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    font-family: helvetica;
}

.aba-btn:hover {
    background: #e9ecef;
}

.aba-btn.ativa {
    color: white;
    border: none;
    background: #27ae60;
}

/* Conteúdo das abas */
.aba-conteudo {
    display: none;
    padding: 0 40px;
    animation: fadeIn 0.3s ease;
    max-height: calc(100vh - 300px); 
    overflow-y: auto; 
}

.aba-conteudo.ativa {
    display: block;
    font-size: 1.0rem;
}


.aba-conteudo-img {
    max-width: 100%;
    height: auto;
    border: 2px solid lightgray;
    border-radius: 8px;
    display: flex;
    margin: 20px 0;    
}

.aba-conteudo img {
    max-width: 100%;
    height: auto;
}


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

.aba-conteudo h3 {
    font-family: helvetica;
    font-size: 1.6rem;
    color: #2c3e50;
/*
    margin-top: 25px;
*/
    margin-bottom: 15px;
    padding-bottom: 8px;
}

.aba-conteudo h3:first-child {
    margin-top: 0;
}

.aba-conteudo p {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}




/* Melhor controle do modal */
.modal-conteudo {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh; 
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #2c3e50;
}

/* Área que pode rolar */
.abas + .aba-conteudo {
    padding: 0 20PX 0 20px;
    overflow-y: auto;
    flex: 1;
}

/* Melhor controle do container de conteúdo */
.abas {
    flex-shrink: 0; 
}

.aba-conteudo h2 {
    color: #27ae60;
    margin-top: 35px;
    font-size: 1.6em;
    border-left: 5px solid #27ae60;
    padding-left: 15px;
}

.aba-conteudo p {
    margin: 10px 0;
    color: #2c3e50;
}

.aba-conteudo .highlight {
    background-color: #e8f8f0;
    border-radius: 4px;
    font-weight: bold;
    color: #1e3a2e;
}

.aba-conteudo li {
    font-size: 1.3em;
    padding-bottom: 10px;
}



/* Grid de tecnologias */
.intro-tec {
    background: #E8F8F0;
    padding: 20px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 25px;
    color: #2c3e50;
/*
    color: #27ae60;
*/
/*
    color: darkgrey;
*/
    font-size: 1.4em;
    border-left: 5px solid #27ae60;
    margin-top: 35px;
}

.grid-tecnologias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}


.card-tec {
    background: #E8F8F0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.card-tec:hover {
    border-color: #27ae60;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.card-tec img {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.card-tec h4 {
    font-family: helvetica;
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.card-tec p {
    font-size: 1.0rem;
    color: #666;
    text-align: center;
    margin: 0;
}

/* Responsivo */
@media (max-width: 820px) {

    #right-panel {

        height: 83dvh;
    }

    #info {

        height: calc(83dvh - 90px);
    }
    
    .modal-conteudo {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-conteudo h2 {
        font-size: 1.4rem;
        padding: 20px 20px 10px 20px;
    }
    
    .modal-subtitulo {
        padding: 0 20px 15px 20px;
        font-size: 0.9rem;
    }
    
    .abas {
        flex-wrap: wrap;
        padding: 15px 20px 0 20px;
    }
    
    .aba-btn {
        flex: 1 1 45%;
        padding: 10px 15px;
        font-size: 1.2rem;
    }
    
    .aba-conteudo {
        padding: 0 20px 0 20px;
    }
    
    .aba-conteudo h2 {
        margin: 0;
    }
    
    .intro-tec {
        margin: 0;
    }
    
    .grid-cobertura {
        grid-template-columns: 1fr;
    }
    
    .grid-tecnologias {
        grid-template-columns: 1fr;
    }
}



.sobre {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #2c3e50;
    margin: 0 auto;
    padding: 0 20PX 0 20px;
}
.sobre h1 {
    color: #1e3a2e;
    text-align: center;
    border-bottom: 3px solid #27ae60;
    padding-bottom: 15px;
    font-size: 2.2em;
    margin-bottom: 30px;
}
.sobre h2 {
    color: #27ae60;
    margin-top: 35px;
    font-size: 1.6em;
    border-left: 5px solid #27ae60;
    padding-left: 15px;
}
.sobre h3 {
    color: #27ae60;    
    margin-top: 25px;
    font-size: 1.4em;
    font-weight: bold;
}
.sobre  .highlight {
    background-color: #e8f8f0;
    border-radius: 4px;
    font-weight: bold;
    color: #1e3a2e;
}
.sobre .important-data {
    background-color: #e8f8f0;
    padding: 15px;
    border-left: 5px solid #27ae60;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}
.sobre .important-data p {
    margin: 10px 0;
}
.sobre table {
    width: 100%;
    font-size: 14px;
    border-radius: 10px;
    border-collapse: collapse;
/*
    margin: auto;
*/
    border: 1px solid lightgrey;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.sobre th, td {
    border: 1px solid lightgrey;
    padding: 7px;
    text-align: left;
}
.sobre th {
    background-color: #27ae60;
    color: white;
    font-weight: bold;
    border: 1px solid lightgrey;
}
.sobre td {
    border: 1px solid lightgrey;
}
.sobre tr:nth-child(even) {
    background-color: #f2f9f5;
    border: 1px solid lightgrey;
}
.sobre tr:hover {
    background-color: #e8f8f0;
    border: 1px solid lightgrey;
}
.sobre p {
    margin: 15px 0;
    text-align: justify;
}
.sobre hr {
    border: none;
    height: 2px;
    background: #27ae60;
    margin: 30px 0;
}
.sobre .interpretation {
    background-color: #f0f8ff;
    font-size: 12px;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-style: italic;
}






@media (min-width: 1200px) {
	.sheet-arrow {
	    display: none;
	}	
}







/* =========================================
   📱 RESPONSIVIDADE - MAPA CENTRALIZADO
   ========================================= */

.mobile-toggle-btn {
    display: none;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1200px) {

    #left-panel {
        width: 380px;
    }

    #right-panel {
        width: 320px;
    }

    #left-panel h1 {
        font-size: 32px;
    }

    .description {
        font-size: 13px;
        max-width: 320px;
    }

    #inset-map,
    #seta {
        display: none;
    }

    .legend {
        font-size: 11px;
    }
}


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

@media (max-width: 820px) {

    body {
/*
        overflow: hidden;
*/
        overflow: auto;
    }

    #ui {
        flex-direction: column;
        justify-content: flex-start;
        height: 100vh;
    }

    /* HEADER SUPERIOR */
    #left-panel {

        width: 100%;
        height: auto;

        background: linear-gradient(
            180deg,
            rgba(1,31,54,0.95) 0%,
            rgba(1,31,54,0.75) 70%,
            rgba(1,31,54,0) 100%
        );

        padding-bottom: 15px;

        position: absolute;
        top: 0;
        left: 0;

        z-index: 1000;
    }

    #left-panel h1 {
        font-size: 24px;
        padding-left: 20px;
        padding-top: 20px;
    }

    .subtitle {
        padding-left: 20px;
        font-size: 14px;
        flex-wrap: wrap;
    }

    .description {
        padding-left: 20px;
        font-size: 12px;
        max-width: 90%;
    }

    .legend {
        margin-left: 20px;
        font-size: 11px;
        flex-wrap: wrap;
    }

    .leg {
        width: auto;
    }

    .uc-filter {
        margin: 10px 20px;
    }

    .uc-filter button {
        font-size: 11px;
        padding: 10px 6px;
    }

    #inset-map,
    #seta {
        display: none;
    }

    /* SIDEBAR MOBILE */

    

    

    #info {
/*
        border-radius: 20px 20px 0 0;
*/
        box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
    }

    /* botão mobile */

    .mobile-toggle-btn {

        display: flex;

        align-items: center;
        justify-content: center;
        gap: 8px;

        position: fixed;

        bottom: 20px;
        right: 20px;

        z-index: 3000;

        border: none;
        border-radius: 999px;

        background: #27ae60;
        color: white;

        padding: 14px 18px;

        font-size: 14px;
        font-weight: bold;

        box-shadow: 0 5px 20px rgba(0,0,0,0.3);

        cursor: pointer;
    }

    /* footer */

    #sidebar-footer {
        font-size: 12px;
    }

    /* MODAL */

    .modal-conteudo {

        width: 100%;
        height: 100%;

        max-width: 100%;
        max-height: 100%;

        margin: 0;
        border-radius: 0;
    }

    .modal-conteudo h2 {
        font-size: 1.7rem;
        padding: 20px;
    }

    .modal-subtitulo {
        font-size: 1.2rem;
        padding: 0 20px 20px;
    }

    .abas {
        padding: 0;
        overflow-x: auto;
    }

    .aba-btn {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .aba-conteudo {
        padding: 20px;
    }

    .sobre h1 {
        font-size: 1.8rem;
    }

    .sobre h2 {
        font-size: 1.6rem;
    }

    .sobre h3 {
        font-size: 1.4rem;
    }

    .sobre table {
        width: 100%;
/*
        margin: auto;
*/
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }

    .grid-tecnologias {
        grid-template-columns: 1fr;
    }

    /* Leaflet controls */

/*
    .leaflet-control-scale {
        transform: none;
        margin-left: 10px;
        margin-bottom: 10px;
    }
*/

}





/* =========================================================
   📱 RESPONSIVIDADE
========================================================= */

.mobile-toggle-btn {
    display: none;
/*
    width: 80%;
*/
    width: 100%;
    margin: auto;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1200px) {

    #left-panel {
        width: 380px;
    }

    #right-panel {
        width: 320px;
    }

    #left-panel h1 {
        font-size: 32px;
    }

    .description {
        font-size: 13px;
        max-width: 320px;
    }

    #inset-map,
    #seta {
        display: none;
    }

    .legend {
        font-size: 11px;
    }
}


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

@media (max-width: 840px) {

    body {
/*
        overflow: hidden;
*/
        overflow-x: hidden;
        overflow-y: auto;
    }

    #ui {
        flex-direction: column;
        justify-content: flex-start;
/*
        height: 100vh;
*/
        height: 100dvh;
    }
    
    #mapa-bg {
/*
        width: 90%;
*/
        width: 100%;
        margin: auto;    
    }

    /* HEADER SUPERIOR */
    #left-panel {

        width: 100%;
        height: auto;

        background: linear-gradient(
            180deg,
            rgba(1,31,54,0.95) 0%,
            rgba(1,31,54,0.75) 70%,
            rgba(1,31,54,0) 100%
        );

        padding-bottom: 15px;

        position: absolute;
        top: 0;
        left: 0;

        z-index: 1000;
    }

    #left-panel h1 {
        font-size: 24px;
        padding-left: 20px;
        padding-top: 20px;
    }

    .subtitle {
        padding-left: 20px;
        font-size: 14px;
        flex-wrap: wrap;
    }

    .description {
        padding-left: 20px;
        font-size: 12px;
        max-width: 90%;
    }

    .legend {
        margin-left: 20px;
        font-size: 11px;
        flex-wrap: wrap;
    }

    .leg {
        width: auto;
    }

    .uc-filter {
        margin: 10px 20px;
    }

    .uc-filter button {
        font-size: 11px;
        padding: 10px 6px;
    }

    #inset-map,
    #seta {
        display: none;
    }

    /* SIDEBAR MOBILE */
    

    #right-panel {

        position: fixed;

        bottom: 0;
        left: 0;

        width: 100%;

        height: 83vh;

        background: white;

        transform: translateY(calc(100% - 90px));

        transition: transform 0.35s ease;

        z-index: 2000;

        box-shadow: 0 -10px 30px rgba(0,0,0,0.25);

        overflow: hidden;
                
    }

    #right-panel.open {
        transform: translateY(0);
    }
    
    #right-panel.open .sheet-arrow {
        transform: rotate(180deg);
    }
    
    #empty-state {
        align-items: start;
        text-align: center;
    }

    #info {

        height: 100%;

        display: flex;
        flex-direction: column;

        overflow: hidden;
    }


    /* footer */
    #sidebar-footer {
        font-size: 12px;
    }

    /* MODAL */
    .modal-conteudo {

        width: 100%;
        height: 100%;

        max-width: 100%;
        max-height: 100%;

        margin: 0;
        border-radius: 0;
    }

    .modal-conteudo h2 {
        font-size: 1.8rem;
        padding: 30px 0 0 20px;
    }

    .modal-subtitulo {
        font-size: 1.2rem;
/*
        padding: 0 20px 20px;
*/
    }

    .abas {
        padding: 0;
        overflow-x: auto;
    }

    .aba-btn {
        font-size: 1.5rem;
        white-space: nowrap;
    }

    .aba-conteudo {
        padding: 40px;
    }
    
    .sobre h1 {
        font-size: 1.8rem;
    }

    .sobre h2 {
        font-size: 1.6rem;
    }

    .sobre h3 {
        font-size: 1.4rem;
    }

    .sobre table {
        width: 100%;
/*
        margin: auto;
*/
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }

    .grid-tecnologias {
        grid-template-columns: 1fr;
    }

    /* Leaflet controls */

    .leaflet-control-scale {
        transform: none;
        margin-left: 60px;
        margin-bottom: 90px;
    }
    
    .leaflet-top.leaflet-right {
        transform: none;
    }
    
    
    
    
    
    /* HANDLE */

    #sheet-handle {

        height: 100px;

        display: flex;

        flex-direction: column;

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

        gap: 8px;

        cursor: pointer;

        background: white;

        border-bottom: 1px solid #E5E5E5;
    }

    .sheet-bar {

        width: 35px;
        height: 6px;

        border-radius: 999px;

        background: #cbd5e1;
    }

    .sheet-arrow {

        font-size: 18px;

        color: #64748b;

        transition: transform 0.3s ease;
    }

}

.leaflet-container {
    touch-action: pan-x pan-y;
}


#sidebar-footer {

    flex-shrink: 0;

    margin-top: auto;
}



/* ================================
   DESKTOP
================================ */

@media (min-width: 1201px) {

    .leaflet-top.leaflet-right {

        right: 405px !important;
        top: 20px !important;
    }
}

/* ================================
   TABLET + MOBILE
================================ */

@media (max-width: 1200px) {

    .leaflet-top.leaflet-right {

        right: 10px !important;
        top: 10px !important;
    }
}

/* aparência */

.leaflet-control-layers {

    box-shadow: 0 4px 12px rgba(0,0,0,0.3);

    border-radius: 8px;
}





/* .buffer-label { */
/*  */
/*     background: rgba(255,255,255,0.85); */
/*  */
/*     border: none; */
/*  */
/*     box-shadow: none; */
/*  */
/*     color: black; */
/*  */
/*     font-size: 11px; */
/*  */
/*     font-weight: bold; */
/*  */
/*     padding: 2px 5px; */
/*  */
/*     border-radius: 4px; */
/*  */
/*     pointer-events: none; */
/* } */
