/* Botão e painel de acessibilidade */

.a11y { position: fixed; z-index: 45; }
.a11y-inferior-esquerda { left: 24px; bottom: 24px; }
.a11y-inferior-direita { right: 24px; bottom: 24px; }
.a11y-acima-wa { bottom: 98px; }
.a11y-meio-esquerda, .a11y-meio-direita { top: calc(50% - 25px); }
.a11y-meio-esquerda { left: 0; }
.a11y-meio-direita { right: 0; }
.a11y-meio-esquerda .a11y-toggle { border-left: 0; border-radius: 0 14px 14px 0; }
.a11y-meio-direita .a11y-toggle { border-right: 0; border-radius: 14px 0 0 14px; }
/* Com o painel de acessibilidade, o VLibras abre por ele: um botão a menos na tela. */
#vlibras-access-wrapper { display: none !important; }
.a11y-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--ink, #0b1f3a);
  box-shadow: 0 0 0 1px rgba(4, 21, 47, .28), 0 10px 24px -8px rgba(4, 21, 47, .55);
  cursor: pointer;
  transition: transform .2s, background-color .2s;
}
.a11y-toggle .icon { width: 28px; height: 28px; stroke-width: 2.1; }
.a11y-toggle:hover { transform: translateY(-2px); background: #000; }
.a11y-toggle:focus-visible { outline: 3px solid #ffbf00; outline-offset: 3px; }
.a11y.is-active .a11y-toggle::after { content: ""; position: absolute; top: 1px; right: 1px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: #22c55e; }

.a11y-panel {
  position: absolute;
  bottom: 62px;
  width: 344px;
  max-width: calc(100vw - 32px);
  padding: 16px;
  border: 1px solid #dbe3ec;
  border-radius: 16px;
  color: #0b1f3a;
  background: #fff;
  box-shadow: 0 24px 60px -12px rgba(4, 21, 47, .4);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  max-height: calc(100vh - 110px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.a11y-panel * { box-sizing: border-box; }
.a11y-panel[hidden] { display: none; }
.a11y-esquerda .a11y-panel { left: 0; }
.a11y-direita .a11y-panel { right: 0; }
.a11y-meio-esquerda .a11y-panel, .a11y-meio-direita .a11y-panel { bottom: auto; top: 50%; transform: translateY(-50%); max-height: calc(100vh - 32px); }
.a11y-meio-esquerda .a11y-panel { left: 62px; }
.a11y-meio-direita .a11y-panel { right: 62px; left: auto; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.a11y-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: 0; }
.a11y-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; color: #5b6b80; background: none; cursor: pointer; }
.a11y-close:hover { color: #0b1f3a; background: #f1f5f9; }
.a11y-close .icon { width: 18px; height: 18px; }

.a11y-size { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding: 10px 12px; border: 1px solid #e3e8ef; border-radius: 12px; }
.a11y-size > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.a11y-size > span .icon { flex: none; width: 18px; height: 18px; color: #5b6b80; }
.a11y-steps { display: inline-flex; flex: none; align-items: center; gap: 4px; margin-left: auto; }
.a11y-steps button { min-width: 36px; height: 34px; padding: 0 6px; border: 1px solid #d5dde7; border-radius: 8px; color: #0b1f3a; background: #fff; font: 700 14px/1 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; cursor: pointer; }
.a11y-steps button:hover:not(:disabled) { border-color: var(--ink, #0b1f3a); }
.a11y-steps button:disabled { opacity: .4; cursor: default; }
.a11y-steps output { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }

.a11y-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.a11y-option { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; min-height: 76px; overflow-wrap: anywhere; padding: 12px; border: 1px solid #e3e8ef; border-radius: 12px; color: #0b1f3a; background: #fff; font: 600 13.5px/1.25 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.a11y-option .icon { width: 20px; height: 20px; color: #5b6b80; }
.a11y-option:hover { border-color: #b8c7da; }
.a11y-option[aria-pressed="true"] { border-color: var(--ink, #0b1f3a); color: #fff; background: var(--ink, #0b1f3a); }
.a11y-option[aria-pressed="true"] .icon { color: #fff; }
.a11y-panel button:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }
.a11y-option.a11y-libras { border-color: #c7d7f5; background: #f2f6fe; }
.a11y-option.a11y-libras .icon { color: #1351b4; }
.a11y-keys { margin: 12px 0 0; color: #5b6b80; font-size: 12.5px; line-height: 1.6; }
.a11y-keys kbd { display: inline-block; min-width: 18px; padding: 0 5px; border: 1px solid #d5dde7; border-bottom-width: 2px; border-radius: 5px; color: #0b1f3a; background: #f8fafc; font: 600 11.5px/1.5 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; text-align: center; }
.a11y-reset { display: block; margin: 12px auto 0; padding: 4px; border: 0; color: #5b6b80; background: none; font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.a11y-reset:hover { color: #0b1f3a; }

@media (max-width: 760px) {
  /* Botão redondo */
  .a11y-m-botao { top: auto; bottom: 16px; }
  .a11y-m-botao.a11y-esquerda { left: 16px; }
  .a11y-m-botao.a11y-direita { right: 16px; }
  .a11y-m-botao.a11y-acima-wa { bottom: 84px; }
  .a11y-m-botao .a11y-toggle { width: 48px; height: 48px; border: 2px solid #fff; border-radius: 50%; }
  /* Aba lateral: pequena, colada na borda, abaixo do meio da tela */
  .a11y-m-aba { top: 62%; bottom: auto; }
  .a11y-m-aba.a11y-esquerda { left: 0; }
  .a11y-m-aba.a11y-direita { right: 0; }
  .a11y-m-aba .a11y-toggle { width: 38px; height: 44px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(4, 21, 47, .25), 0 6px 16px -6px rgba(4, 21, 47, .6); }
  .a11y-m-aba.a11y-esquerda .a11y-toggle { border-left: 0; border-radius: 0 10px 10px 0; }
  .a11y-m-aba.a11y-direita .a11y-toggle { border-right: 0; border-radius: 10px 0 0 10px; }
  .a11y-m-aba .a11y-toggle .icon { width: 22px; height: 22px; }
  .a11y-m-aba .a11y-toggle:hover { transform: none; }
  .a11y-m-aba.is-active .a11y-toggle::after { top: 3px; right: 3px; width: 9px; height: 9px; }
  /* Só no rodapé */
  .a11y-m-rodape .a11y-toggle { display: none; }
  /* Painel como folha na parte de baixo da tela, com fundo escurecido */
  .a11y.is-open::before { content: ""; position: fixed; inset: 0; background: rgba(4, 12, 24, .5); }
  .a11y .a11y-panel { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; max-height: 82vh; transform: none; border-radius: 18px 18px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .a11y-keys { display: none; }
}
@media (hover: none) and (pointer: coarse) {
  .a11y-option[data-a11y-opcao="cursor"] { display: none; }
}

/* Tamanho do texto: amplia a página, como o zoom do navegador. Os botões flutuantes não mudam de tamanho. */
html[data-a11y-fonte] body > :not(.a11y, .whatsapp-float, .cookie-banner, .a11y-faixa, #vlibras-access-wrapper, [vw], script) { zoom: var(--a11y-zoom); }
html[data-a11y-fonte="-1"] { --a11y-zoom: .9; }
html[data-a11y-fonte="1"] { --a11y-zoom: 1.1; }
html[data-a11y-fonte="2"] { --a11y-zoom: 1.2; }
html[data-a11y-fonte="3"] { --a11y-zoom: 1.3; }
html[data-a11y-fonte="4"] { --a11y-zoom: 1.4; }

/* Destacar links */
html.a11y-links body a:not(.btn):not(.whatsapp-float) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important; }
html.a11y-links body a:focus-visible, html.a11y-links body button:focus-visible { outline: 3px solid #ffbf00 !important; outline-offset: 2px !important; }
html.a11y-links body .btn { outline: 2px solid currentColor; outline-offset: 2px; }

/* Fonte mais legível, com mais espaço entre linhas e letras */
html.a11y-legivel body, html.a11y-legivel body :is(h1, h2, h3, h4, h5, h6, p, li, a, span, strong, small, label, input, select, textarea, button, dt, dd, td, th, em, b):not(.a11y *) { font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important; letter-spacing: .02em !important; }
html.a11y-legivel body :is(p, li, dd, label, small):not(.a11y *) { line-height: 1.75 !important; word-spacing: .08em; }

/* Pausar animações */
html.a11y-movimento *, html.a11y-movimento *::before, html.a11y-movimento *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-movimento [data-reveal] { opacity: 1 !important; transform: none !important; }

/* Alto contraste: fundo preto, texto branco e links amarelos */
html.a11y-contraste body, html.a11y-contraste body *:not(svg, svg *, iframe) { background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important; text-shadow: none !important; }
html.a11y-contraste body *::before, html.a11y-contraste body *::after { background-image: none !important; box-shadow: none !important; border-color: #fff !important; }
html.a11y-contraste body a, html.a11y-contraste body a *:not(svg, svg *) { color: #ffe600 !important; }
html.a11y-contraste body :is(button, .btn, input, select, textarea) { border: 2px solid #fff !important; }
html.a11y-contraste body :is(a, button, input, select, textarea):focus-visible { outline: 3px solid #ffe600 !important; outline-offset: 2px !important; }
html.a11y-contraste body svg { color: inherit !important; }
html.a11y-contraste body .a11y-reset { border: 0 !important; }
html.a11y-contraste body img { filter: grayscale(1) contrast(1.15); }
html.a11y-contraste body .a11y-option[aria-pressed="true"], html.a11y-contraste body .a11y-option[aria-pressed="true"] * { color: #000 !important; background-color: #ffe600 !important; }
html.a11y-contraste body ::placeholder { color: #cfcfcf !important; }

/* Espaçar o texto (WCAG 1.4.12): entrelinha, parágrafos, letras e palavras */
html.a11y-espaco body :is(p, li, dd, dt, label, small, td, th, blockquote, figcaption):not(.a11y-panel *) { line-height: 1.8 !important; letter-spacing: .12em !important; word-spacing: .16em !important; }
html.a11y-espaco body :is(h1, h2, h3, h4):not(.a11y-panel *) { line-height: 1.35 !important; letter-spacing: .04em !important; word-spacing: .1em !important; }
html.a11y-espaco body p:not(.a11y-panel *) { margin-bottom: 1.4em !important; }

/* Guia de leitura: faixa de três linhas que acompanha o ponteiro */
.a11y-faixa { position: fixed; top: 0; left: 0; right: 0; z-index: 44; height: 64px; border-block: 3px solid #ffbf00; pointer-events: none; box-shadow: 0 0 0 100vmax rgba(4, 12, 24, .45); }
html.a11y-contraste body .a11y-faixa { background: transparent !important; border-color: #ffe600 !important; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .6) !important; }

/* Cursor ampliado */
html.a11y-cursor, html.a11y-cursor body, html.a11y-cursor body * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 8.2-6.6 1.8L9.6 19z' fill='%23000' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 7 4, auto !important; }
html.a11y-cursor body :is(a, button, [role="button"], label, summary, select, input[type="checkbox"], input[type="radio"]), html.a11y-cursor body :is(a, button) * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 8.2-6.6 1.8L9.6 19z' fill='%23ffbf00' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 7 4, pointer !important; }
html.a11y-cursor body :is(input:not([type="checkbox"]):not([type="radio"]), textarea) { cursor: text !important; }