/*
 * Acessibilidade — skip link, foco visível, reduced motion.
 * Carregado em todas as páginas.
 */

/* Skip link: invisível até receber foco via teclado. */
.rvb-skip-link.visually-hidden-focusable {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rvb-skip-link.visually-hidden-focusable:focus,
.rvb-skip-link.visually-hidden-focusable:focus-visible {
  position: fixed !important;
  top: 1rem;
  left: 1rem;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: #0e30cc;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.25rem;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #0e30cc;
  outline: none;
}

/* Âncora target do skip link não deve receber foco visual persistente. */
#rvb-main-content {
  outline: none;
}

/* Utilitário para texto só-leitor (usado em links de redes sociais). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Foco visível consistente em elementos interativos (fallback global). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0e30cc;
  outline-offset: 2px;
}

/* Respeita preferência do usuário por menos movimento. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
