/* ==================================================================
   1. ESTILO DO PAINEL E BOTÃO (UI - AGORA NA ESQUERDA)
   ================================================================== */
#cge-btn-acessibilidade {
    position: fixed;
    top: 50%; /* Centraliza Verticalmente */
    transform: translateY(-50%); /* Ajuste fino do centro */
    left: 0; /* Cola na esquerda */
    right: auto; /* Reseta a direita */
    z-index: 2147483647 !important;
    
    background: #002352;
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    
    /* Borda arredondada apenas no lado direito (o lado livre) */
    border-radius: 0 5px 5px 0;
    
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cge-painel-acessibilidade {
    position: fixed;
    top: 0;
    left: -320px; /* Escondido para a esquerda */
    right: auto; /* Reseta a direita */
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 2147483647 !important;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    transition: left 0.3s ease; /* Animação na propriedade left */
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
    text-align: left;
}

#cge-painel-acessibilidade.aberto {
    left: 0; /* Desliza para dentro */
}

.cge-painel-header {
    background: #002352;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cge-painel-header h3 { margin: 0; font-size: 18px; color: #fff; }
#cge-btn-fechar { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }

.cge-painel-content { padding: 15px; overflow-y: auto; flex: 1; }
.cge-secao { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.cge-secao h4 { font-size: 14px; text-transform: uppercase; color: #666; margin-bottom: 10px; }

.cge-acess-btn {
    display: block; width: 100%; padding: 10px; margin-bottom: 5px;
    background: #f5f5f5; border: 1px solid #ddd; text-align: left;
    cursor: pointer; border-radius: 4px; font-size: 14px; color: #333; transition: all 0.2s;
}
.cge-acess-btn:hover { background: #e9e9e9; }
.cge-acess-btn.ativo { background: #002352; color: #fff; border-color: #002352; font-weight: bold; }
.cge-acess-btn.ativo::after { content: ' ✓'; float: right; }
.btn-reset { background: #ffebee; color: #c62828; border-color: #ef9a9a; text-align: center; }


/* ==================================================================
   2. REGRAS DE ACESSIBILIDADE
   ================================================================== */

/* --- I. Contraste Escuro (FIX HEADER/MENU) --- */
html.acc-contraste-escuro { filter: invert(1) hue-rotate(180deg); }

html.acc-contraste-escuro img, 
html.acc-contraste-escuro video, 
html.acc-contraste-escuro iframe,
html.acc-contraste-escuro .divPaiHeader, 
html.acc-contraste-escuro footer, 
html.acc-contraste-escuro .footer-container,
html.acc-contraste-escuro #cge-painel-acessibilidade, 
html.acc-contraste-escuro #cge-btn-acessibilidade { 
    filter: invert(1) hue-rotate(180deg); 
}

html.acc-contraste-escuro .divPaiHeader img, 
html.acc-contraste-escuro footer img, 
html.acc-contraste-escuro .footer-container img {
    filter: none !important;
}

html.acc-contraste-escuro .divPaiHeader {
    filter: invert(1) hue-rotate(180deg);
    position: relative;
    z-index: 999999 !important;
}


/* --- II. Contraste Claro --- */
html.acc-contraste-claro body { background: #fff !important; color: #000 !important; }
html.acc-contraste-claro *:not(#cge-painel-acessibilidade):not(#cge-painel-acessibilidade *):not(#cge-btn-acessibilidade):not(#cge-btn-acessibilidade *) { 
    background-color: #fff !important; color: #000 !important; 
    box-shadow: none !important; text-shadow: none !important; 
    background-image: none !important; border-color: #000 !important;
}
html.acc-contraste-claro .sub-menu, 
html.acc-contraste-claro .mega-sub-menu,
html.acc-contraste-claro ul.children {
    border: 2px solid #000 !important; background-color: #fff !important; z-index: 99999 !important;
}

/* Restaura Painel (Agora na Esquerda) */
html.acc-contraste-claro #cge-painel-acessibilidade { 
    background-color: #fff !important; 
    border-right: 2px solid #000; /* Borda na direita agora */
}
html.acc-contraste-claro .cge-painel-header { background-color: #000 !important; color: #fff !important; }
html.acc-contraste-claro .cge-acess-btn { border: 1px solid #000 !important; }
html.acc-contraste-claro .cge-acess-btn.ativo { background-color: #000 !important; color: #fff !important; }
html.acc-contraste-claro #cge-btn-acessibilidade { background-color: #002352 !important; color: #fff !important; }
html.acc-contraste-claro a { color: #0000EE !important; text-decoration: underline !important; font-weight: bold; }


/* --- Outros --- */
html.acc-contraste-invertido { filter: invert(1); }
html.acc-contraste-pb { filter: grayscale(100%); }
html.acc-links-destaque a { background: yellow !important; color: black !important; border: 2px solid black !important; text-decoration: underline !important; }

@font-face { font-family: 'OpenDyslexic'; src: url('../fonts/OpenDyslexic-Regular.woff') format('woff'); font-weight: normal; font-style: normal; }
html.acc-fonte-legivel *:not(.fa):not(.fas):not(.far):not(.fab):not(.dashicons):not(.bx):not(.bxl-instagram):not(.bxl-facebook):not(.bxl-linkedin):not(.bxl-youtube):not([class*="icon"]) {
    font-family: 'OpenDyslexic', sans-serif !important;
}

html.acc-espacamento-extra * { line-height: 1.8 !important; word-spacing: 0.1em !important; letter-spacing: 0.05em !important; }

html.acc-pausar-animacoes *, html.acc-pausar-animacoes *::before, html.acc-pausar-animacoes *::after {
    animation-play-state: paused !important; transition: none !important; 
}

/* --- Auxiliares --- */
#cge-guia-leitura-elemento { position: fixed; left: 0; width: 100%; height: 5px; background: rgba(255, 0, 0, 0.7); z-index: 2147483647 !important; pointer-events: none; transform: translateY(-50%); }
#cge-mascara-leitura-elemento { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2147483647 !important; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85); }