/* ===================================
   WCAG 2.2 Accessibility Widget Styles
   =================================== */

:root {
    --a11y-bg: #ffffff;
    --a11y-text: #1f2937;
    --a11y-text-muted: #4b5563;
    --a11y-border: #e5e7eb;
    --a11y-primary: #171717;
    /* Neutral Black for high contrast/premium feel */
    --a11y-primary-hover: #000000;
    --a11y-accent: #D2B48C;
    /* Brand Gold/Tan for subtle highlights */
    --a11y-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.accessibility-visually-hidden {
    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;
}


/* Accessibility Toggle Button - GPU Accelerated */
.accessibility-toggle {
    position: fixed;
    top: auto;
    bottom: 50px;
    right: 30px;
    left: auto;
    z-index: 2147483647;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Only animate transform - avoid layout triggers */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.accessibility-toggle:hover {
    transform: translateZ(0) scale(1.12) rotate(-5deg);
    background: #1a1a1a;
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.accessibility-toggle:active {
    transform: translateZ(0) scale(0.95);
}

.accessibility-toggle:focus-visible {
    outline: 3px solid #D2B48C;
    outline-offset: 4px;
}

.accessibility-toggle svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    will-change: transform;
    transform: translateZ(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.accessibility-toggle:hover svg {
    transform: translateZ(0) scale(1.1);
}

/* Active state */
.accessibility-toggle[aria-expanded="true"] {
    transform: translateZ(0) rotate(180deg) scale(0.9);
    background: #1a1a1a;
    border-color: #D2B48C;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(210, 180, 140, 0.3), 0 8px 25px rgba(0, 0, 0, 0.35);
}

.accessibility-toggle[aria-expanded="true"]:hover {
    transform: translateZ(0) rotate(180deg) scale(1);
}

.accessibility-toggle[aria-expanded="true"] svg {
    transform: translateZ(0) scale(0.85);
}

/* Accessibility Overlay - Optimized (no blur animation) */
.accessibility-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Static blur - no animation for performance */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    /* GPU layer */
    transform: translateZ(0);
    will-change: opacity;
    backface-visibility: hidden;
    /* Only animate opacity */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease-out, visibility 0.35s;
}

.accessibility-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   SCROLL LOCK - Prevent page scroll when panel is open
   =================================== */
html.a11y-scroll-lock {
    overflow: hidden !important;
    height: 100% !important;
}

html.a11y-scroll-lock body {
    overflow: hidden !important;
    /* Remove height: 100% to allow body to retain full height for scroll positioning */
    position: fixed;
    width: 100%;
    touch-action: none;
    -webkit-overflow-scrolling: none;
    overscroll-behavior: none;
}

/* Preserve scroll position */
html.a11y-scroll-lock body {
    position: fixed;
    /* top will be set dynamically by JS to preserve scroll position */
}

/* Ensure the panel remains scrollable */
.a11y-scroll-lock .accessibility-panel {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

/* ===================================
   WIDGET PROTECTION & OVERRIDES
   Ensure the widget remains visible and usable regardless of mode
   =================================== */
.accessibility-toggle,
.accessibility-panel {
    /* Protect from Transparency Issues - explicit values instead of revert */
    opacity: 1 !important;
    /* Removed visibility: visible to allow correct toggling */
}

/* Accessibility Panel - 60fps GPU Accelerated */
.accessibility-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--a11y-bg);
    z-index: 10000;
    /* Static shadow - no animation */
    box-shadow: -25px 0 70px rgba(0, 0, 0, 0.18);
    /* GPU acceleration - CRITICAL for 60fps */
    transform: translate3d(100%, 0, 0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Only animate transform and opacity (composite-only properties) */
    opacity: 0;
    transition:
        transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
        opacity 0.3s ease-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

.accessibility-panel.active {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
}

/* Smoothly fade header when accessibility panel is open */
header,
.site-header {
    opacity: 1;
    transform: none;
    transition: opacity 0.45s ease;
    will-change: opacity;
}

html.a11y-scroll-lock header,
html.a11y-scroll-lock .site-header {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

html.a11y-scroll-lock .site-header,
html.a11y-scroll-lock .site-header.scrolled {
    background: #ffffff !important;
    z-index: 9999 !important;
    filter: none !important;
}

/* Staggered content reveal inside panel - ENTRY ONLY */
/* On exit, content stays visible and slides out with panel */

.accessibility-panel .accessibility-panel__header,
.accessibility-panel .accessibility-panel__content,
.accessibility-panel .accessibility-panel__footer {
    opacity: 1;
    transform: translateY(0);
}

/* When panel is NOT active (closed or closing), hide content immediately */
.accessibility-panel:not(.active) .accessibility-panel__header,
.accessibility-panel:not(.active) .accessibility-panel__content,
.accessibility-panel:not(.active) .accessibility-panel__footer {
    opacity: 1;
    transform: translateY(0);
    transition: none;
    /* No transition on close - panel handles all animation */
}

/* When panel IS active - staggered entry animations */
.accessibility-panel.active .accessibility-panel__header {
    animation: slideInFromTop 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.accessibility-panel.active .accessibility-panel__content {
    animation: slideInFromBottom 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.accessibility-panel.active .accessibility-panel__footer {
    animation: slideInFromBottom 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel Header */
.accessibility-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid var(--a11y-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.accessibility-panel__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--a11y-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.accessibility-panel__title svg {
    width: 28px;
    height: 28px;
    fill: var(--a11y-primary);
}

.accessibility-panel__close {
    background: transparent;
    border: none;
    color: var(--a11y-text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.accessibility-panel__close:hover {
    background: #f3f4f6;
    color: var(--a11y-text);
}

.accessibility-panel__close:focus-visible {
    outline: 3px solid #D2B48C;
    outline-offset: 3px;
    background: #f3f4f6;
    color: var(--a11y-text);
}

.accessibility-panel__close svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Panel Content */
.accessibility-panel__content {
    padding: 32px;
    flex: 1;
}

/* Section Groups */
.accessibility-section {
    margin-bottom: 40px;
}

.accessibility-section__title {
    font-family: 'Inclusive Sans', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--a11y-text-muted);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Control Grid */
.accessibility-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.accessibility-controls--single {
    grid-template-columns: 1fr;
}

/* Toggle Buttons */
.accessibility-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 16px;
    background: #fff;
    border: 1px solid var(--a11y-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
}

.accessibility-btn:hover {
    border-color: var(--a11y-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.accessibility-btn:focus-visible {
    outline: 3px solid #D2B48C;
    outline-offset: 3px;
    border-color: var(--a11y-primary);
}

.accessibility-btn.active {
    background: var(--a11y-primary);
    border-color: var(--a11y-primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.accessibility-btn svg {
    width: 28px;
    height: 28px;
    fill: var(--a11y-text);
    transition: all 0.2s ease;
}

.accessibility-btn.active svg {
    fill: #fff;
}

.accessibility-btn__label {
    font-family: 'Inclusive Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Slider Controls */
.accessibility-slider {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.accessibility-slider__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.accessibility-slider__label {
    font-family: 'Inclusive Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--a11y-text);
}

.accessibility-slider__value {
    font-family: 'Inclusive Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--a11y-text-muted);
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.accessibility-slider__input {
    width: 100%;
    height: 6px;
    border-radius: 10px;
    background: #e5e7eb;
    outline: 0;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.accessibility-slider__input:focus-visible {
    outline: 3px solid #D2B48C;
    outline-offset: 4px;
}

.accessibility-slider__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--a11y-primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #fff;
    transition: transform 0.1s ease;
}

.accessibility-slider__input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.accessibility-slider__input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--a11y-primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #fff;
}

/* Reset Button */
.accessibility-reset {
    width: 100%;
    padding: 16px;
    background: #f3f4f6;
    color: var(--a11y-text);
    border: none;
    border-radius: 12px;
    font-family: 'Inclusive Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.accessibility-reset:hover {
    background: #e5e7eb;
    color: #000;
}

.accessibility-reset:focus-visible {
    outline: 3px solid #D2B48C;
    outline-offset: 3px;
}

.accessibility-reset svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Panel Footer */
.accessibility-panel__footer {
    padding: 24px 32px;
    background: #ffffff;
    border-top: 1px solid var(--a11y-border);
    text-align: center;
}

.accessibility-panel__footer p {
    font-family: 'Inclusive Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--a11y-text-muted);
    margin: 0 0 4px 0;
}

.accessibility-panel__footer .accessibility-panel__credit {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ===================================
   Accessibility Mode Styles (Functional Mechanics)
   =================================== */

/* High Contrast Mode */
body.a11y-high-contrast header>*,
body.a11y-high-contrast main,
body.a11y-high-contrast footer,
body.a11y-high-contrast #booking-overlay,
body.a11y-high-contrast .skip-link {
    filter: contrast(1.4);
}

body.a11y-high-contrast * {
    border-color: currentColor !important;
}

/* Inverted Colors */
body.a11y-invert-colors {
    background-color: #000 !important;
    color: #fff !important;
}

body.a11y-invert-colors header>*,
body.a11y-invert-colors main,
body.a11y-invert-colors footer,
body.a11y-invert-colors #booking-overlay,
body.a11y-invert-colors .skip-link {
    filter: invert(1) hue-rotate(180deg);
}

body.a11y-invert-colors img,
body.a11y-invert-colors video,
body.a11y-invert-colors iframe {
    filter: invert(1) hue-rotate(180deg);
}

/* Grayscale Mode */
body.a11y-grayscale header>*,
body.a11y-grayscale main,
body.a11y-grayscale footer,
body.a11y-grayscale #booking-overlay,
body.a11y-grayscale .skip-link {
    filter: grayscale(1);
}

/* Large Cursor */
body.a11y-large-cursor,
body.a11y-large-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1' d='M5.5 3.21V20.8l4.97-4.75 3.07 7.25 2.79-1.18-3.1-7.32h6.27L5.5 3.21z'/%3E%3C/svg%3E"), auto !important;
}

body.a11y-large-cursor a,
body.a11y-large-cursor button,
body.a11y-large-cursor [role="button"],
body.a11y-large-cursor input[type="submit"],
body.a11y-large-cursor input[type="button"] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1' d='M10.5 9a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm-4 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm8 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z'/%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1' d='M9 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-2.26c1.81-1.27 3-3.36 3-5.74A7 7 0 0 0 9 2z'/%3E%3C/svg%3E"), pointer !important;
}

/* Reading Guide */
.a11y-reading-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 40px;
    background: rgba(255, 235, 59, 0.4);
    border-top: 2px solid #FBC02D;
    border-bottom: 2px solid #FBC02D;
    pointer-events: none;
    z-index: 99999;
    display: none;
}

body.a11y-reading-guide-active .a11y-reading-guide {
    display: block;
}

/* Highlight Links */
body.a11y-highlight-links a {
    outline: 2px solid #FBC02D !important;
    outline-offset: 2px !important;
    background: rgba(255, 235, 59, 0.3) !important;
}

body.a11y-highlight-links a:focus {
    outline: 3px solid #F57F17 !important;
}

/* Focus Indicator Enhancement */
body.a11y-focus-indicator *:focus {
    outline: 4px solid #FBC02D !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.8) !important;
}

/* Hide Images */
body.a11y-hide-images img,
body.a11y-hide-images picture,
body.a11y-hide-images video,
body.a11y-hide-images canvas,
body.a11y-hide-images iframe,
body.a11y-hide-images object,
body.a11y-hide-images embed,
body.a11y-hide-images [role="img"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.a11y-hide-images *:not(.accessibility-panel):not(.accessibility-panel *):not(.accessibility-toggle):not(.accessibility-toggle *):not(.a11y-reading-guide) {
    background-image: none !important;
}

/* Stop Animations */
body.a11y-stop-animations *,
body.a11y-stop-animations *::before,
body.a11y-stop-animations *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* Readable Font */
body.a11y-readable-font * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
    letter-spacing: normal !important;
}

/* Dyslexia Friendly Font */
@font-face {
    font-family: 'OpenDyslexic';
    src: var(--lj-font-e99f2dc4c893) format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body.a11y-dyslexia-font * {
    font-family: 'OpenDyslexic', Arial, sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
    line-height: 1.6 !important;
}

/* Text Spacing */
body.a11y-text-spacing * {
    line-height: 2 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

/* ADHD Friendly - Reduce Distractions */
body.a11y-adhd-friendly aside,
body.a11y-adhd-friendly [role="complementary"],
body.a11y-adhd-friendly [role="banner"] .nav-secondary,
body.a11y-adhd-friendly .sidebar,
body.a11y-adhd-friendly .advertisement,
body.a11y-adhd-friendly .social-share,
body.a11y-adhd-friendly footer {
    opacity: 0.15;
    filter: grayscale(1);
    transition: all 0.3s ease;
}

body.a11y-adhd-friendly:hover aside,
body.a11y-adhd-friendly:hover [role="complementary"],
body.a11y-adhd-friendly:hover footer {
    opacity: 1;
    filter: none;
}

/* Screen Reader Mode - Visual Enhancements */
body.a11y-screen-reader [aria-hidden="true"]:not(.accessibility-panel [aria-hidden="true"]) {
    display: none !important;
}

/* Saturation Control */
body.a11y-low-saturation header>*,
body.a11y-low-saturation main,
body.a11y-low-saturation footer,
body.a11y-low-saturation #booking-overlay,
body.a11y-low-saturation .skip-link {
    filter: saturate(0.5);
}

body.a11y-high-saturation header>*,
body.a11y-high-saturation main,
body.a11y-high-saturation footer,
body.a11y-high-saturation #booking-overlay,
body.a11y-high-saturation .skip-link {
    filter: saturate(1.5);
}

/* Light Mode (forced) */
body.a11y-light-mode {
    background: #ffffff !important;
    color: #000000 !important;
}

body.a11y-light-mode * {
    background-color: transparent;
    color: inherit;
}

body.a11y-light-mode section,
body.a11y-light-mode div,
body.a11y-light-mode header,
body.a11y-light-mode footer {
    background-color: #ffffff !important;
}

/* Monochrome */
/* Monochrome */
body.a11y-monochrome header>*,
body.a11y-monochrome main,
body.a11y-monochrome footer,
body.a11y-monochrome #booking-overlay,
body.a11y-monochrome .skip-link {
    filter: grayscale(100%);
}

/* Blue Light Filter */
body.a11y-blue-light-filter::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 166, 0, 0.15);
    /* Warm orange tint */
    z-index: 999999;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* Font Size + Zoom Scaling */
:root {
    --a11y-font-scale: 1;
    --a11y-page-zoom: 1;
}

html.a11y-font-size-110 {
    font-size: 110% !important;
    --a11y-font-scale: 1.1;
    --a11y-page-zoom: 1.1;
}

html.a11y-font-size-120 {
    font-size: 120% !important;
    --a11y-font-scale: 1.2;
    --a11y-page-zoom: 1.2;
}

html.a11y-font-size-130 {
    font-size: 130% !important;
    --a11y-font-scale: 1.3;
    --a11y-page-zoom: 1.3;
}

html.a11y-font-size-140 {
    font-size: 140% !important;
    --a11y-font-scale: 1.4;
    --a11y-page-zoom: 1.4;
}

html.a11y-font-size-150 {
    font-size: 150% !important;
    --a11y-font-scale: 1.5;
    --a11y-page-zoom: 1.5;
}

html.a11y-font-size-160 {
    font-size: 160% !important;
    --a11y-font-scale: 1.6;
    --a11y-page-zoom: 1.6;
}

html.a11y-font-size-170 {
    font-size: 170% !important;
    --a11y-font-scale: 1.7;
    --a11y-page-zoom: 1.7;
}

html.a11y-font-size-180 {
    font-size: 180% !important;
    --a11y-font-scale: 1.8;
    --a11y-page-zoom: 1.8;
}

html.a11y-font-size-190 {
    font-size: 190% !important;
    --a11y-font-scale: 1.9;
    --a11y-page-zoom: 1.9;
}

html.a11y-font-size-200 {
    font-size: 200% !important;
    --a11y-font-scale: 2;
    --a11y-page-zoom: 2;
}

html[class*="a11y-font-size-"] body > *:not(.accessibility-toggle):not(.accessibility-overlay):not(.accessibility-panel):not(.a11y-reading-guide) {
    zoom: var(--a11y-page-zoom);
}



/* Line Height Scaling */
body.a11y-line-height-1 * {
    line-height: 1 !important;
}

/* ===================================
   WIDGET PROTECTION & OVERRIDES
   Ensure the widget remains visible and usable regardless of mode
   =================================== */
.accessibility-toggle,
.accessibility-panel {
    /* Protect from Transparency Issues - explicit values instead of revert */
    opacity: 1 !important;

}

.accessibility-panel {
    background-color: var(--a11y-bg) !important;
    color: var(--a11y-text) !important;
}

.accessibility-toggle {
    background-color: #ffffff;
    color: #1a1a1a;
    border-color: #1a1a1a;
}

/* Reset children to inherit or default, but don't force transparent */
.accessibility-panel * {
    border-color: inherit;
}

/* Explicit Fix for Light Mode on Toggle Button */
body.a11y-light-mode .accessibility-toggle {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a !important;
    opacity: 1 !important;
}

/* Protect from Text Spacing/Font changes */
.accessibility-toggle,
.accessibility-panel * {
    line-height: normal !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
}

/* Ensure Z-Index is honoured */
.accessibility-toggle {
    z-index: 2147483647 !important;
}

.accessibility-panel {
    z-index: 10000 !important;
}

.accessibility-overlay {
    z-index: 9998 !important;
}


body.a11y-line-height-1-25 * {
    line-height: 1.25 !important;
}

body.a11y-line-height-1-5 * {
    line-height: 1.5 !important;
}

body.a11y-line-height-1-75 * {
    line-height: 1.75 !important;
}

body.a11y-line-height-2 * {
    line-height: 2 !important;
}

body.a11y-line-height-2-5 * {
    line-height: 2.5 !important;
}

/* Spacings */
body.a11y-letter-spacing-1 * {
    letter-spacing: 0.05em !important;
}

body.a11y-letter-spacing-2 * {
    letter-spacing: 0.1em !important;
}

body.a11y-letter-spacing-3 * {
    letter-spacing: 0.15em !important;
}

body.a11y-letter-spacing-4 * {
    letter-spacing: 0.2em !important;
}

body.a11y-word-spacing-1 * {
    word-spacing: 0.1em !important;
}

body.a11y-word-spacing-2 * {
    word-spacing: 0.2em !important;
}

body.a11y-word-spacing-3 * {
    word-spacing: 0.3em !important;
}

body.a11y-word-spacing-4 * {
    word-spacing: 0.4em !important;
}

@media (prefers-reduced-motion: reduce) {

    .accessibility-toggle,
    .accessibility-toggle svg,
    .accessibility-panel,
    .accessibility-panel .accessibility-panel__header,
    .accessibility-panel .accessibility-panel__content,
    .accessibility-panel .accessibility-panel__footer,
    .accessibility-overlay,
    header,
    .site-header {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }

    html {
        scroll-behavior: auto !important;
    }
}

/* Mobile Reponsive */
@media (max-width: 768px) {
    .accessibility-toggle {
        top: 100px;
        left: 16px;
        right: auto;
        bottom: auto;
    }

    .accessibility-toggle[aria-expanded="true"] {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .accessibility-panel {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: auto;
        transform: translate3d(-100%, 0, 0);
        box-shadow: 25px 0 70px rgba(0, 0, 0, 0.18);
    }

    .accessibility-controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media print {

    .accessibility-toggle,
    .accessibility-panel,
    .accessibility-overlay {
        display: none !important;
    }
}








