﻿/* ADA Accessibility Styles - UPDATED VERSION */
/* Date: January 24, 2026 */
/* Includes corrected skip-link positioning */

/* Skip to main content link - CORRECTED VERSION */
.skip-link {
    position: fixed; /* Changed from absolute to fixed */
    top: -100px; /* Hide it completely off screen */
    left: 50%; /* Center it horizontally */
    transform: translateX(-50%); /* Center adjustment */
    background: #ffc107; /* Bright yellow/gold - highly visible */
    color: #000; /* Black text for maximum contrast */
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    z-index: 99999; /* Above everything */
    font-weight: bold;
    font-size: 16px;
    border: 3px solid #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: top 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

    .skip-link:focus {
        top: 20px; /* Plenty of space from top when focused */
        outline: 3px solid #000;
        outline-offset: 3px;
    }

    .skip-link:hover {
        background: #ffcd38;
        color: #000;
        text-decoration: underline;
    }

/* Accessibility Widget */
.accessibility-widget {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9999;
}

.ada-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--redemption-primary);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

    .ada-button:hover {
        background: #a01829;
        transform: scale(1.1);
    }

    .ada-button:focus {
        outline: 3px solid var(--redemption-accent);
        outline-offset: 2px;
    }

.ada-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--redemption-secondary);
    border: 2px solid var(--redemption-primary);
    border-radius: 10px;
    padding: 20px;
    min-width: 250px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

    .ada-menu h5 {
        color: var(--redemption-primary);
        margin-bottom: 15px;
        font-size: 1.2em;
    }

.ada-control {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.95em;
}

    .ada-control:hover {
        background: rgba(196, 30, 58, 0.2);
        border-color: var(--redemption-primary);
    }

    .ada-control:focus {
        outline: 2px solid var(--redemption-accent);
        outline-offset: 2px;
    }

    .ada-control i {
        margin-right: 10px;
        width: 20px;
        display: inline-block;
    }

/* High Contrast Mode */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

    body.high-contrast * {
        background-color: inherit !important;
        color: inherit !important;
    }

    body.high-contrast a {
        color: #ffff00 !important;
        text-decoration: underline !important;
    }

    body.high-contrast .btn-main,
    body.high-contrast button {
        background: #fff !important;
        color: #000 !important;
        border: 2px solid #fff !important;
    }

    body.high-contrast .form-control,
    body.high-contrast input,
    body.high-contrast textarea,
    body.high-contrast select {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }

    body.high-contrast img {
        filter: contrast(1.2) brightness(1.1);
    }

/* Keyboard Navigation */
body.keyboard-nav *:focus {
    outline: 3px solid var(--redemption-accent) !important;
    outline-offset: 2px !important;
}

/* Focus visible for buttons and links */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--redemption-accent);
    outline-offset: 2px;
}

/* Make main content focusable and show outline when focused via skip link */
main:focus {
    outline: 4px dashed #ffc107;
    outline-offset: 8px;
    scroll-margin-top: 100px;
}

/* 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-width: 0;
}

/* Improved contrast for text */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure sufficient color contrast */
.text-muted {
    color: #aaa !important;
}

/* Smooth scroll behavior for skip link and all anchor links */
html {
    scroll-behavior: smooth;
}

/* Ensure main content has proper spacing and scroll behavior */
main {
    min-height: 400px;
    scroll-margin-top: 100px;
}

/* Larger click targets for mobile */
@media (max-width: 767px) {
    button, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Reduce motion for users who prefer it */
@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;
    }
}

/* Responsive accessibility widget */
@media (max-width: 767px) {
    .accessibility-widget {
        bottom: 80px;
        right: 10px;
    }

    .ada-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .ada-menu {
        right: -10px;
        min-width: 220px;
    }
}
