/* PART XLV — WCAG preference classes applied on <body> */

/* Override Bootstrap kbd (light-on-dark) for readable key chips on light UI */
kbd.gawa-kbd,
.gawa-kbd {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.4;
    color: #111827 !important;
    background-color: #F3F4F6 !important;
    border: 1px solid #9CA3AF;
    border-radius: 0.375rem;
    box-shadow: none;
}

body.a11y-high-contrast kbd.gawa-kbd,
body.a11y-high-contrast .gawa-kbd {
    color: #000 !important;
    background-color: #fff !important;
    border-color: #000;
}

.gawa-skip-link {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    z-index: 10000;
    transform: translateY(-200%);
    border-radius: 9999px;
    background: #0063D7;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.65rem 1.1rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.gawa-skip-link:focus {
    transform: translateY(0);
    outline: 3px solid #FDE68A;
    outline-offset: 2px;
}

body.a11y-large-text {
    font-size: 112.5%;
}

body.a11y-high-contrast {
    background: #fff !important;
    color: #000 !important;
}

body.a11y-high-contrast a {
    text-decoration: underline;
}

body.a11y-high-contrast .rounded-2xl,
body.a11y-high-contrast .rounded-xl {
    border-color: #111827 !important;
}

body.a11y-reduce-motion *,
body.a11y-reduce-motion *::before,
body.a11y-reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

body.a11y-simplified .credit-fade-up,
body.a11y-simplified .credit-hub-card {
    box-shadow: none !important;
}

body.a11y-simplified .credit-hub-card {
    border-radius: 0.75rem !important;
}

/* Default AA-friendly focus for keyboard users */
:focus-visible {
    outline: 2px solid #0063D7;
    outline-offset: 2px;
}

body.a11y-focus-strong :focus-visible {
    outline: 3px solid #0063D7 !important;
    outline-offset: 3px !important;
}

body.a11y-high-contrast :focus-visible {
    outline: 3px solid #000 !important;
    outline-offset: 3px !important;
}

body.a11y-high-contrast {
    --tenant-primary: #000000;
}

body.a11y-high-contrast .bg-\[\#0063D7\],
body.a11y-high-contrast .bg-\[\#0054bd\],
body.a11y-high-contrast button.bg-\[\#0063D7\] {
    background-color: #000 !important;
    color: #fff !important;
}

body.a11y-simplified .credit-fade-up {
    animation: none !important;
}

body.a11y-simplified nav a {
    min-height: 2.75rem;
}

body.a11y-voice::after {
    content: '';
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    html:not(.a11y-allow-motion) *,
    html:not(.a11y-allow-motion) *::before,
    html:not(.a11y-allow-motion) *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
