/* Estilos de Acessibilidade (WCAG 2.1) */

/* Alto Contraste */
.high-contrast {
  --ant-primary-color: #000000;
  --ant-text-color: #000000;
  --ant-text-color-secondary: #333333;
  --ant-border-color-base: #000000;
  --ant-background-color-base: #ffffff;
}

.high-contrast * {
  background-color: var(--ant-background-color-base) !important;
  color: var(--ant-text-color) !important;
  border-color: var(--ant-border-color-base) !important;
}

.high-contrast a {
  text-decoration: underline;
}

.high-contrast button,
.high-contrast [role="button"] {
  border: 2px solid var(--ant-border-color-base) !important;
}

/* Tamanhos de Fonte
 * Escala no <html> via rem. NÃO usar `* { font-size: inherit }` — isso sobrescreve
 * o font-size dos componentes Ant Design (botões, inputs) calculado no tema e deixa
 * o texto com padding vertical assimétrico (pt aparente < pb) dentro da controlHeight fixa.
 * A tipografia Ant acompanha a escala via token.fontSize no AntdProvider.
 */
[data-font-size="small"] {
  font-size: 0.875rem;
}

[data-font-size="medium"] {
  font-size: 1rem;
}

[data-font-size="large"] {
  font-size: 1.125rem;
}

[data-font-size="xlarge"] {
  font-size: 1.25rem;
}

/* Redução de Movimento */
.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* Screen Reader Only */
.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 (Keyboard Navigation) */
*:focus-visible {
  outline: 2px solid var(--ant-primary-color, #1890ff);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ant-primary-color, #1890ff);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Ícones «Opções» em linhas de tabela — área mínima ~44px (Sprint 6, viewports < lg) */
@media (max-width: 991px) {
  .wg-table-row-actions-btn.ant-btn {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .mobile-view {
    padding: 8px;
  }

  .mobile-view button,
  .mobile-view [role="button"] {
    min-height: 44px; /* Tamanho mínimo para touch */
    min-width: 44px;
  }

  .mobile-view input,
  .mobile-view textarea,
  .mobile-view select {
    font-size: 16px; /* Previne zoom no iOS */
  }
}

