/**
 * Accessibility Styles
 * High contrast, readable text, and link emphasis
 */

body {
    text-size-adjust: 100%;
}

body.readable-font .content {
    line-height: 1.75;
}

/* ===== High Contrast Mode ===== */
body.high-contrast {
    --color-primary: #ffff00;
    --color-primary-dark: #ffff00;
    --color-secondary: #00ff00;
    --color-text: #ffffff;
    --color-text-light: #ffffff;
    --color-bg: #000000;
    --color-bg-alt: #1a1a1a;
    --color-bg-dark: #2a2a2a;
    --color-link: #ffff00;
    --color-link-hover: #ffff00;
    --color-link-visited: #ffff00;
    --color-focus: #00ffff;
    --color-border: #ffffff;
    background-color: #000;
    color: #fff;
}

body.high-contrast .header {
    background: #000;
    border-bottom: 2px solid #fff;
}

body.high-contrast .footer {
    background: #000;
    border-top: 2px solid #fff;
}

body.high-contrast .accessibility-bar {
    background: #1a1a1a;
}

body.high-contrast .menu-title {
    color: #ffff00;
    border-bottom-color: #ffff00;
}

body.high-contrast .menu-item a:hover,
body.high-contrast .menu-item.active a {
    background: #2a2a2a;
    border-left-color: #ffff00;
    color: #ffff00;
}

body.high-contrast .content {
    background: #000;
}

body.high-contrast .breadcrumb {
    background: #1a1a1a;
}

body.high-contrast th {
    background: #2a2a2a;
}

body.high-contrast tr:nth-child(even) {
    background: #1a1a1a;
}

body.high-contrast .file-link {
    background: #1a1a1a;
    border: 1px solid #fff;
}

body.high-contrast .file-link:hover {
    background: #ffff00;
    color: #000;
}

body.high-contrast .accessibility-btn {
    background: #1a1a1a;
    border-color: #fff;
    color: #fff;
}

body.high-contrast .accessibility-btn:hover,
body.high-contrast .accessibility-btn:focus {
    background: #ffff00;
    border-color: #ffff00;
    color: #000;
}

body.high-contrast :focus-visible {
    box-shadow: 0 0 0 2px #000;
}

/* ===== Readable Font Mode ===== */
body.readable-font {
    --font-base: Arial, Helvetica, sans-serif;
    --line-height-base: 1.8;
    --letter-spacing: 0.02em;
    letter-spacing: var(--letter-spacing);
    word-spacing: 0.1em;
}

body.readable-font h1,
body.readable-font h2,
body.readable-font h3,
body.readable-font h4 {
    font-weight: 700;
}

body.readable-font p {
    line-height: 2;
    margin-bottom: 1.5em;
}

body.underline-links a:not(.accessibility-btn):not(.school-link) {
    text-decoration-line: underline !important;
    text-decoration-style: solid;
    text-decoration-thickness: 3px !important;
    text-underline-offset: 4px;
}

body.underline-links .menu-item a,
body.underline-links .menu-subitem a,
body.underline-links .breadcrumb a,
body.underline-links .footer a,
body.underline-links .file-link {
    text-decoration-line: underline !important;
    text-decoration-style: solid;
    text-decoration-thickness: 3px !important;
    text-underline-offset: 4px;
}

/* ===== Enhanced Focus ===== */
body.enhanced-focus *:focus {
    outline-width: 4px;
    outline-style: double;
}

/* ===== Reduced Motion ===== */
@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;
    }
}

/* ===== Print Accessibility ===== */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
    
    img {
        max-width: 100%;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    p, li, blockquote {
        orphans: 3;
        widows: 3;
    }
}
