/* Acessibilidade e melhorias de usabilidade */

/* Screen reader only - oculta visualmente mas mantém acessível para leitores de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible - melhora a visibilidade do foco do teclado */
*:focus-visible {
  outline: 2px solid #1DA1F2;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove outline padrão apenas quando não está em foco por teclado */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Skip link - torna visível quando focado */
a[href="#main-content"]:focus {
  position: fixed !important;
  top: 1rem !important;
  left: 1rem !important;
  z-index: 9999 !important;
  padding: 1rem !important;
  background-color: #1DA1F2 !important;
  color: white !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
  text-decoration: none !important;
  font-weight: bold !important;
}

/* Melhora o contraste de texto */
.text-gray-400 {
  color: #9ca3af;
}

.text-gray-500 {
  color: #6b7280;
}

/* Garante que links sempre tenham indicador de foco */
a:focus-visible {
  outline: 2px solid #1DA1F2;
  outline-offset: 4px;
}

/* Melhora a acessibilidade de botões */
button:focus-visible {
  outline: 2px solid #1DA1F2;
  outline-offset: 2px;
}

/* Animações respeitam preferência de movimento reduzido */
@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;
  }
}

/* Melhora legibilidade com alto contraste quando solicitado */
@media (prefers-contrast: high) {
  .text-gradient {
    background: white !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: white !important;
  }
  
  .text-text-body {
    color: #e5e7eb !important;
  }
}

/* Touch targets mínimos para dispositivos móveis */
@media (pointer: coarse) {
  a, button, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
  }
}
