body { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}
  
.statusbar-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 24px);
    background-color: #222;
    z-index: 999;
  }
    
.navigation-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-bottom, 24px);
    background-color: #222;
    z-index: 999;
  }

body.light-mode {
    background: linear-gradient(90DEG,#adb7be, #f1e9c4);
    color: #000000;
}

body.dark-mode {
    background-color: #121212;
    color: #dddddd;
}

body.dark-mode #versao-info,
body.dark-mode section details summary,
body.dark-mode section a,
body.dark-mode section h1 {
    color: #adb7be !important;
}

#sectionsContainer {
    padding: 7px !important;
}

nav.menu-responsivo {
    background-color: #adb7be;
    box-shadow: 1px 2px 3px #f1e9c4;
    color: white;
    padding: 1rem;
    position: relative;
    z-index: 1000;
}

nav.menu-responsivo h1 {
    margin: 0;
    font-size: 1.2rem;
}

#btn-toggle {
    margin-left: auto;
    background: #656a6d;
    border-radius: 5px 0 5px 0;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

ul#menu-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #232526;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 1;
}

ul#menu-list li {
    border-top: 1px solid #555;
}

ul#menu-list li button a {
    padding: 0;
}

ul#menu-list li button,
ul#menu-list li a {
    display: block;
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    color: white;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}

#btn-toggle:hover,
ul#menu-list li button:hover,
ul#menu-list li a:hover {
    background-color: #555;
}

.hidden {
    display: none;
}

.section { 
    padding: 7px 0; margin-bottom: 7px; 
}

/* Details */
details:not(details.externo) summary {
    color: blue !important;
}

.externo { 
    font-size: 20px; 
}

summary.titulos-conteudos { 
    text-transform: capitalize; 
}

h1 {
    color: #232526;
    margin-right: 21px;
}

h1.titulos-conteudos { 
    text-transform: uppercase; 
}

strong, h2, h3, h4 { 
    opacity: 0.8; 
}

#btnAbrirTodos {
    margin-bottom: 14px;
}

/* Barra deprogresso */
#headerTop {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: grid;
    place-items: start;
    background: transparent;
}

div.progresso {
    width: 100%;
    height: 5px;
    margin-top: 0px;
    background: transparent;
}

div.progressoScroll {
    width: 0%;
    height: 5px;
    background: rgb(2, 0, 36);
    background: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(0, 212, 255, 1) 100%);
}

/* Tooltip*/
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    outline: none;
    /* Remove o contorno ao focar */
    color: red;
}

/* Estilo básico do tooltip */
.tooltip .tooltip-content {
    width: 150px;
    height: auto;
    display: none;
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 16px;
    line-height: 1.2;
    white-space: wrap;
    z-index: 100;
    transform: translateY(-10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Exibição do tooltip */
.tooltip.active .tooltip-content,
.tooltip:hover .tooltip-content {
    display: block;
    transform: translateY(0);
}

/* Ajuste para evitar corte fora da tela */
.tooltip .tooltip-content[data-position="left"] {
    left: auto;
    right: 100%;
    top: 50%;
    transform: translate(-10px, -50%);
}

.tooltip .tooltip-content[data-position="right"] {
    left: 100%;
    top: 50%;
    transform: translate(10px, -50%);
}

.tooltip .tooltip-content[data-position="top"] {
    bottom: 100%;
}

.tooltip .tooltip-content[data-position="bottom"] {
    top: 100%;
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .tooltip .tooltip-content {
            font-size: 15px;
            padding: 6px 10px;
    }

    h1.titulos-conteudos { 
        font-size: 25px;
    }
    
    strong, h2, h3, h4 { 
        font-size: 21px;
    }
}

/* Tabela */
table {
    width: 100%;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ddd;
}

/* Botão voltar ao topo */  
#back-to-top {
    position: fixed;
    right: 10px;
    background-color: #918888;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 25px;
    display: none; /* Começa escondido */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    bottom: calc(env(safe-area-inset-bottom) + 16px); /* Evita sobrepor botões do sistema */
    transform: translateX(-50%);
    z-index: 100;
}

#back-to-top:hover {
    background-color: #f1ebeb;
    border: solid 1px #000;
    color: #918888;
}

/* Exibição do botão apenas quando a página é rolada */
#back-to-top.show {
    display: flex;
}  
/* fim botão voltar ao topo */

/* Container filtro */
#filter-container {
    margin-bottom: 7px;
}

#filter-input {
    width: 98%;
    padding: 5px 0;
    font-size: 1rem;
    background-color: #d2d8d7;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Paginação */
.pagination-btn {
    /* background-color: #656a6d; */
    background-color: #cbd5e0;
    /* color: white; */
    color: #656a6d;
    border: none;
    padding: 5px 10px;
    margin: 0 4px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}
.pagination-btn:disabled {
    /* background-color: #cbd5e0; */
    background-color: #555;
    cursor: default;
    /* color: #656a6d; */
    color: #cbd5e0;
}
.pagination-btn:hover:not(:disabled),
.pagination-btn:focus:not(:disabled) {
    background-color: #555;
    outline: none;
    color: #cbd5e0;
}
.page-number-btn {
    background-color: #e2e8f0;
    border: 1px solid #cbd5e0;
    color: #2d3748;
    padding: 5px 10px;
    margin: 0 2px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    transition: background-color 0.3s ease;
}
.page-number-btn:hover,
.page-number-btn:focus {
    background-color: #555;
    outline: none;
    color: white;
}
.page-number-btn.active {
    background-color: #656a6d;
    color: white;
    border-color: #232526;
    cursor: default;
}

/* Esconde scrollbar no Firefox */
#page-buttons {
    scrollbar-width: none;
}
/* Esconde scrollbar no Chrome, Safari e Edge */
#page-buttons::-webkit-scrollbar {
    display: none;
}

/* Animação suave para as seções */
section.section {
    opacity: 1;
    /* max-height: 2000px; valor grande para permitir expansão */
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

section.section.hidden {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

@media (max-width:400px) {
    #page-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 0;
        gap: 4px;
    }
}

/* Version */
hr.versao-info {
    border: solid 1px #949292;
    box-shadow: 1px 1px #ddd;
}
#versao-info {
    text-align:center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #333;
}