/**
 * Melhorias de Acessibilidade WCAG 2.1 AA
 * Twins Sports - E-commerce
 */

/* Navegação por Teclado */
*:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #dc2626;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
}

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

/* Contraste de Cores */
.text-low-contrast {
    color: #666;
}

/* Melhorar contraste */
a {
    color: #dc2626;
    text-decoration: underline;
}

a:hover {
    color: #ef4444;
}

/* Labels Obrigatórios */
label.required::after {
    content: ' *';
    color: #dc2626;
}

/* Mensagens de Erro Acessíveis */
.error-message {
    color: #dc2626;
    font-weight: 600;
    display: block;
    margin-top: 5px;
}

.error-message::before {
    content: '⚠️ ';
}

/* ARIA Live Regions */
.aria-live {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Indicadores Visuais */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Melhorar Foco em Formulários */
input:invalid {
    border-color: #dc2626;
}

input:valid {
    border-color: #10b981;
}

/* Indicadores de Estado */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.active {
    background: #10b981;
}

.status-indicator.inactive {
    background: #dc2626;
}

/* Melhorar Leitura de Tabelas */
table {
    border-collapse: collapse;
}

th {
    font-weight: 700;
    text-align: left;
}

/* Alt Text para Imagens Decorativas */
img[alt=""] {
    border: 0;
}

/* Melhorar Contraste em Botões */
.btn-primary,
.btn-secondary {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
}

/* Responsividade para Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Alto Contraste */
@media (prefers-contrast: high) {
    * {
        border-color: currentColor !important;
    }
    
    .btn-primary {
        border: 2px solid currentColor;
    }
}

