/* ADA Compliance - WCAG 2.1 AA Standards */

/* Focus Indicators */
*:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

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

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text: #000000;
        --background: #ffffff;
        --primary: #0000ff;
    }
}

/* Reduced motion support */
@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;
    }
}

/* Screen reader only text */
.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;
}

/* Ensure sufficient color contrast */
a {
    color: #0066cc;
}

a:visited {
    color: #551a8b;
}

/* Error states */
.error,
.alert-danger {
    border-left: 4px solid #dc3545;
    padding-left: 1rem;
}

.error:focus {
    outline-color: #dc3545;
}

/* Form labels always visible */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Required field indicators */
label[aria-required="true"]::after,
.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Button states */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Table accessibility */
table {
    border-collapse: collapse;
}

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

/* Ensure all interactive elements are keyboard accessible */
button,
a,
input,
select,
textarea {
    min-height: 44px; /* Touch target size */
    min-width: 44px;
}

/* Link indicators */
a[target="_blank"]::after {
    content: " (opens in new window)";
    .sr-only;
}

