/* ===================================
   WCAG 2.1 AA Accessibility Styles
   =================================== */

/* Color Contrast Improvements */
:root {
    --bs-secondary: #5a6268;
}

.text-muted {
    color: #5a6268 !important;
}

::placeholder {
    color: #5a5a5a !important;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #5a5a5a !important;
}

::-ms-input-placeholder {
    color: #5a5a5a !important;
}

/* Focus Indicators for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
    transition: outline 0.2s ease;
}

/* Ensure focus is always visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
}

/* Skip to Main Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: var(--bs-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: -3px;
}

/* 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;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .nav-link.active {
        border-left-width: 4px;
    }

    .btn {
        border-width: 2px;
    }
}

/* Screen Reader Only Content */
.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;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}
