/* public/assets/css/wcag-accessibility.css — WCAG 2.1 AA/AAA Accessibility Stylesheet */

/* Floating Accessibility Button & Modal Toolbar */
.wcag-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    background-color: #2563eb;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease-in-out;
}

.wcag-toggle-btn:hover, .wcag-toggle-btn:focus {
    background-color: #1d4ed8;
    transform: scale(1.05);
    outline: 3px solid #facc15;
}

.wcag-panel {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 80vh;
    overflow-y: auto;
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    display: none;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #0f172a;
}

.wcag-panel.active {
    display: block;
    animation: wcagSlideUp 0.2s ease-out;
}

@keyframes wcagSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.wcag-panel-header {
    background-color: #070e1b;
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.wcag-panel-body {
    padding: 16px;
}

.wcag-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-top: 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
}

.wcag-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.wcag-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.wcag-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.wcag-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
}

/* WCAG Mode Overrides */
/* 1. High Contrast Dark Mode (WCAG AAA) */
body.wcag-high-contrast-dark {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.wcag-high-contrast-dark *,
body.wcag-high-contrast-dark .card,
body.wcag-high-contrast-dark .table,
body.wcag-high-contrast-dark nav,
body.wcag-high-contrast-dark aside,
body.wcag-high-contrast-dark header {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* 2. Yellow on Black Gold Mode (WCAG AAA) */
body.wcag-yellow-black {
    background-color: #000000 !important;
    color: #ffff00 !important;
}

body.wcag-yellow-black *,
body.wcag-yellow-black .card,
body.wcag-yellow-black .table,
body.wcag-yellow-black nav,
body.wcag-yellow-black aside,
body.wcag-yellow-black header,
body.wcag-yellow-black a {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

/* 3. Monochrome / Grayscale */
body.wcag-grayscale {
    filter: grayscale(100%) !important;
}

/* 4. Invert Colors */
body.wcag-invert {
    filter: invert(100%) hue-rotate(180deg) !important;
}

/* 5. Highlight Links & Interactive Elements */
body.wcag-highlight-links a,
body.wcag-highlight-links button,
body.wcag-highlight-links input,
body.wcag-highlight-links select {
    outline: 2px dashed #f59e0b !important;
    text-decoration: underline !important;
}

/* 6. High Visibility Focus Outlines */
body.wcag-focus-outlines *:focus {
    outline: 4px solid #f59e0b !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px #000000 !important;
}

/* 7. Reading Ruler Line */
#wcag-reading-ruler {
    position: fixed;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(245, 158, 11, 0.45);
    border-top: 2px solid #d97706;
    border-bottom: 2px solid #d97706;
    pointer-events: none;
    z-index: 999999;
    display: none;
}

body.wcag-ruler-active #wcag-reading-ruler {
    display: block;
}

/* 8. Dyslexic Friendly Font */
body.wcag-dyslexic, body.wcag-dyslexic * {
    font-family: 'OpenDyslexic', 'Comic Sans MS', sans-serif !important;
    letter-spacing: 0.3px !important;
}

/* 9. Font Sizing Classes */
body.wcag-text-lg { font-size: 1.05rem !important; }
body.wcag-text-xl { font-size: 1.2rem !important; }
body.wcag-text-xxl { font-size: 1.35rem !important; }

body.wcag-spacing-wide * { letter-spacing: 1px !important; }
body.wcag-line-height-lg * { line-height: 1.8 !important; }
