/* ACESSIBILIDADE DEFINITIVO */

/* 1. CONFIGURAÇÃO DO BOTÃO PRINCIPAL */
html body div.accessibility-tools,
html body .accessibility-tools[role="toolbar"] {
    position: fixed !important;
    top: 58% !important; /* Abaixo do VLibras */
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    
    /* Dimensões do Widget */
    width: 40px !important;
    height: 40px !important;
    background-color: #0056b3 !important; /* Azul */
    border-radius: 6px 6px 6px 6px !important; /* Cantos esquerdos arredondados */
    box-shadow: -2px 0px 10px rgba(0, 0, 0, 0.25) !important;
    z-index: 99999998 !important; /* Prioridade máxima na tela */
    
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important; 
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* 2. ÍCONE DO BONECO CORRIGIDO */
html body div.accessibility-tools::before,
html body .accessibility-tools[role="toolbar"]::before {
    content: "\267F" !important; /* CÓDIGO CORRETO: Boneco Internacional de Acessibilidade */
    font-size: 22px !important; /* Tamanho do ícone */
    color: #ffffff !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 99999999 !important;
    pointer-events: none !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    line-height: 1 !important;
    display: inline-block !important;
    transition: left 0.2s ease, transform 0.2s ease !important;
}

/* Remove marcadores e seletores antigos de testes */
html body div.accessibility-tools::after,
html body .accessibility-tools[role="toolbar"]::after {
    display: none !important;
    content: none !important;
}

/* 3. ESTADO PADRÃO: OCULTA OS BOTÕES INTERNOS DO PLUGIN */
html body div.accessibility-tools > button, 
html body div.accessibility-tools > a {
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
    margin: 0 !important;
}

/* 4. EXPANSÃO (HOVER): O MENU ABRE SUAVE PARA A ESQUERDA */
html body div.accessibility-tools:hover,
html body .accessibility-tools[role="toolbar"]:hover {
    width: auto !important;
    min-width: 260px !important; /* Aumentado levemente para dar mais respiro */
    height: 42px !important; 
    border-radius: 6px 0 0 6px !important;
    background-color: #004085 !important;
    justify-content: flex-start !important;
    padding: 0 12px 0 45px !important; /* Ajuste sutil na margem interna */
    cursor: pointer !important;
}

/* Move o boneco para a esquerda durante a expansão */
html body div.accessibility-tools:hover::before,
html body .accessibility-tools[role="toolbar"]:hover::before {
    left: 22px !important;
    transform: translateY(-50%) !important;
}

/* 5. REVELA E ESTILIZA OS BOTÕES INTERNOS COMPACTOS LADO A LADO */
html body div.accessibility-tools:hover > button, 
html body div.accessibility-tools:hover > a {
    position: relative !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    
    /* Design retangular dos botões internos */
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    font-size: 10px !important; 
    font-family: Arial, sans-serif !important;
    font-weight: bold !important;
    padding: 5px 8px !important; 
    margin: 0 3px !important; /* Espaçamento padrão entre botões */
    white-space: nowrap !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

/* Empurra especificamente o primeiro botão */
html body div.accessibility-tools:hover > button:first-of-type,
html body div.accessibility-tools:hover > a:first-of-type {
    margin-left: 12px !important; /* Cria um espaço confortável entre o boneco e o 1º botão */
}

/* Efeito Hover Individual nos sub-botões internos */
html body div.accessibility-tools:hover > button:hover, 
html body div.accessibility-tools:hover > a:hover {
    background-color: #ffffff !important;
    color: #004085 !important;
    border-color: #ffffff !important;
}

/* ==========================================================================
   AJUSTES COMPLEMENTARES SOLICITADOS (RODAPÉ E INDEXADORES)
   ========================================================================== */

/* FORÇA O AUMENTO DO LOGOTIPO DA REVISTA NO CANTO SUPERIOR ESQUERDO */
html body .navbar-brand img,
html body header .navbar-brand img,
html body .pkp_structure_head .navbar-brand img {
    height: auto !important;
    max-height: 55px !important; /* Aumenta a altura limite da imagem (padrão é ~30px) */
    width: auto !important;
    display: block !important;
    transform: translateY(-5px) !important; /* Ajuste milimétrico para centralizar verticalmente na barra */
}

/* Alinha o container do link caso o tema esmague a área da marca */
html body .navbar-brand {
    height: auto !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* CORREÇÃO DO ENTORNO DOS INDEXADORES: Força o fundo branco na faixa acima do rodapé */
html body .pkp_structure_main + .container,
html body #main-wrapper + .container,
html body .page_index_journal + .container,
html body div:has(> img[src*="road"]) {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* AJUSTE DO FILTRO CROMÁTICO PARA ALCANÇAR O AZUL CIANO OFICIAL DO CADE */
html body footer img, 
html body .footer img, 
html body .pkp_structure_footer img,
html body [id*="footer"] img,
html body [class*="footer"] img {
    display: inline-block !important;
    opacity: 1.0 !important;
    visibility: visible !important;
    
    /* Filtro recalibrado para tons de Azul Ciano/Claro Corporativo */
    filter: invert(33%) sepia(35%) saturate(3665%) hue-rotate(179deg) brightness(92%) contrast(101%) !important;
    -webkit-filter: invert(33%) sepia(35%) saturate(3665%) hue-rotate(179deg) brightness(92%) contrast(101%) !important;
}

/* OCULTA APENAS A MARCA DE TEXTO/IMAGEM DO OJS EM PRETO (MANTIDO DO SEU REQUISITO) */
html body .pkp_brand_footer,
html body a.pkp_brand_footer,
html body img[src*="pkp_brand.png"],
html body img[src*="ojs_brand.png"],
html body footer .col-md-2 a[href*="pkp.sfu.ca"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
