/* Botão e painel de acessibilidade do portal (includes/acessibilidade.php) */
.a11y { position:fixed; left:16px; bottom:16px; z-index:9990; font-family:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.a11y__botao {
  display:flex; align-items:center; gap:8px; padding:10px 14px; border:0; border-radius:999px; cursor:pointer;
  background:#1D4ED8; color:#fff; font-size:14px; font-weight:600; box-shadow:0 4px 14px rgba(0,0,0,.25); min-height:44px;
}
.a11y__botao:hover { background:#1E40AF; }
.a11y__botao:focus-visible, .a11y__painel button:focus-visible { outline:3px solid #F59E0B !important; outline-offset:2px; }
.a11y__painel {
  position:absolute; left:0; bottom:56px; width:230px; padding:14px; border-radius:12px;
  background:#fff; color:#111827; border:1px solid #D1D5DB; box-shadow:0 10px 30px rgba(0,0,0,.2);
}
.a11y__titulo { margin:0 0 10px; font-weight:700; font-size:15px; color:#111827; }
.a11y__linha { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:8px; }
.a11y__painel button {
  min-height:44px; border:1px solid #9CA3AF; border-radius:8px; background:#F9FAFB; color:#111827; font-size:15px; font-weight:600; cursor:pointer;
}
.a11y__painel button[aria-pressed="true"] { background:#111827; color:#fff; border-color:#111827; }
.a11y__contraste { width:100%; }
.a11y__dica { margin:10px 0 0; font-size:12.5px; line-height:1.45; color:#374151; }
.a11y__dica kbd { border:1px solid #6B7280; border-radius:4px; padding:0 5px; font-size:12px; font-family:inherit; background:#F3F4F6; color:#111827 !important; box-shadow:none; }
@media (max-width:600px) { .a11y__rotulo { display:none; } .a11y__botao { padding:11px; } }

/* tamanho do texto: zoom no conteúdo do portal (o tema usa px fixos) */
html[data-texto="maior"] .page-wrapper, html[data-texto="maior"] .entrar__caixa { zoom:1.15; }
html[data-texto="muito"] .page-wrapper, html[data-texto="muito"] .entrar__caixa { zoom:1.3; }
html[data-texto="menor"] .page-wrapper, html[data-texto="menor"] .entrar__caixa { zoom:.92; }

/* alto contraste: fundo preto, texto branco, links e foco amarelos */
html.alto-contraste body, html.alto-contraste .page-wrapper, html.alto-contraste .page-wrapper *:not(svg):not(path):not(circle):not(img),
html.alto-contraste .entrar, html.alto-contraste .entrar *:not(svg):not(path):not(circle):not(img) {
  background-color:#000 !important; background-image:none !important; color:#fff !important; border-color:#fff !important;
  box-shadow:none !important; text-shadow:none !important;
}
html.alto-contraste a, html.alto-contraste a * { color:#FFE600 !important; text-decoration:underline !important; }
html.alto-contraste button, html.alto-contraste .theme-btn, html.alto-contraste .btn { border:2px solid #FFE600 !important; color:#FFE600 !important; }
html.alto-contraste input, html.alto-contraste select, html.alto-contraste textarea { border:2px solid #fff !important; }
html.alto-contraste ::placeholder { color:#d1d5db !important; }
html.alto-contraste img { filter:grayscale(1) contrast(1.2); }
html.alto-contraste :focus-visible { outline:3px solid #FFE600 !important; }

/* o próprio painel de acessibilidade no alto contraste */
html.alto-contraste .a11y__painel { background:#000 !important; color:#fff !important; border:2px solid #fff !important; }
html.alto-contraste .a11y__titulo, html.alto-contraste .a11y__dica { color:#fff !important; }
html.alto-contraste .a11y__painel button { background:#000 !important; color:#FFE600 !important; border:2px solid #FFE600 !important; }
html.alto-contraste .a11y__painel button[aria-pressed="true"] { background:#FFE600 !important; color:#000 !important; }
html.alto-contraste .a11y__botao { background:#000 !important; color:#FFE600 !important; border:2px solid #FFE600 !important; }
html.alto-contraste .entrar__arte { background:#000 !important; }

/* Celular: o VLibras sai do meio da tela (cobria o conteúdo) e vai para o canto de baixo,
   espelhando o botão de acessibilidade; os dois sobem quando há barra fixa embaixo
   e somem enquanto uma folha (menu/filtros) está aberta. */
@media (max-width: 991px) {
  div[vw].enabled { top:auto !important; bottom:16px !important; transform:none !important; margin:0 !important; }
  body:has(.barra-inferior) div[vw].enabled { bottom:88px !important; }
  body:has(.barra-inferior) .a11y { bottom:88px; }
  body.sem-rolagem .a11y, body.sem-rolagem div[vw].enabled { display:none !important; }
}
/* O botão do VLibras fica num shadow DOM com top:50%. Com o hospedeiro fixo, de altura zero e
   com transform (vira o "bloco de contenção"), 50% de zero = o botão desce para o canto de baixo. */
@media (max-width: 991px) {
  /* o VLibras calcula top = metade da tela - 20px; o hospedeiro sobe isso para o botão ficar a 16px do rodapé */
  #vlibras-access-wrapper { position:fixed; left:0; right:0; top:calc(50vh - 38px); height:0; transform:translateZ(0); z-index:9989; }
  body:has(.barra-inferior) #vlibras-access-wrapper { top:calc(50vh - 110px); }
  body.sem-rolagem #vlibras-access-wrapper { display:none; }
}
@media (max-width: 991px) {
  /* assistente: o rodapé (sugestões + campo) é mais alto */
  body:has(.ast-rodape) .a11y { bottom:136px; }
  body:has(.ast-rodape) #vlibras-access-wrapper { top:calc(50vh - 158px); }
}
