/* Accessibility Widget Styles */
:root {
    --acc-primary: #007bff;
    /* Standard accessible blue */
    --acc-text: #ffffff;
    --acc-bg: #1a1a1a;
    --acc-panel-width: 300px;
    --acc-z-index: 999999;
}

/* Floating Trigger Button */
/* Floating Trigger Button - Luxury Theme */
#accessibility-trigger {
    position: fixed;
    bottom: 25px;
    left: 25px;
    /* Bottom Left as requested */
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #d4af37 0%, #C5A059 100%);
    border-radius: 50%;
    cursor: pointer;
    z-index: var(--acc-z-index);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4), 0 0 0 4px rgba(0, 0, 0, 0.2);
    /* Double ring effect */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    outline: none;
    overflow: hidden;
}

#accessibility-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
    z-index: 1;
}

#accessibility-trigger:hover::before {
    left: 100%;
}

#accessibility-trigger:hover,
#accessibility-trigger:focus {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.6), 0 0 0 4px rgba(0, 0, 0, 0.4);
}

#accessibility-trigger svg {
    width: 38px;
    height: 38px;
    position: relative;
    z-index: 2;
    /* fill: #000; Removed to allow SVG internal colors */
}

/* Sidebar Menu - Luxury Refinements */
#accessibility-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--acc-panel-width);
    background: rgba(18, 18, 18, 0.95);
    /* Dark semi-transparent background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    border-right: 1px solid rgba(197, 160, 89, 0.2);
    z-index: var(--acc-z-index);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    color: #f0f0f0;
    font-family: 'Assistant', 'Varela Round', sans-serif;
    direction: rtl;
}

#accessibility-panel.is-open {
    transform: translateX(0);
}

/* Panel Header - Dark Gold */
.acc-panel-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    color: #C5A059;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.acc-close-btn {
    background: none;
    border: none;
    color: #C5A059;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s;
}

.acc-close-btn:hover {
    transform: rotate(90deg);
}

/* Feature List */
.acc-features {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Scrollbar styling for the panel */
.acc-features::-webkit-scrollbar {
    width: 6px;
}

.acc-features::-webkit-scrollbar-track {
    background: #0f0f0f;
}

.acc-features::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.acc-features::-webkit-scrollbar-thumb:hover {
    background: #C5A059;
}


.acc-feature-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    /* Dark mode input bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    text-align: right;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: #e0e0e0;
}

.acc-feature-btn:hover {
    background-color: rgba(197, 160, 89, 0.1);
    border-color: rgba(197, 160, 89, 0.4);
    transform: translateX(-2px);
}

.acc-feature-btn.active {
    background: linear-gradient(135deg, #d4af37 0%, #aa8b42 100%);
    color: #000;
    border-color: #d4af37;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Icons inside buttons need to handle color change */
.acc-feature-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Reset Button */
.acc-reset-btn {
    width: 100%;
    background: transparent;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.acc-reset-btn:hover {
    background: #ff6b6b;
    color: #fff;
}

/* =========================================
   ACCESSIBILITY UTILITY CLASSES (Applied to Body/HTML)
   ========================================= */

/* 1. Text Resizing */
html[data-acc-fontsize="1"] {
    zoom: 1.1;
}

html[data-acc-fontsize="2"] {
    zoom: 1.25;
}

html[data-acc-fontsize="3"] {
    zoom: 1.5;
}

/* 2. Grayscale */
/* 2. Grayscale */
#site-wrapper.acc-grayscale {
    filter: grayscale(100%) !important;
}

/* 3. High Contrast (Yellow on Black) */
body.acc-high-contrast {
    background-color: #000 !important;
    color: #ffff00 !important;
}

body.acc-high-contrast * {
    background-color: #000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.acc-high-contrast img,
body.acc-high-contrast video {
    filter: grayscale(100%) contrast(150%);
}

/* 4. Negative Contrast (Invert) */
/* 4. Negative Contrast (Invert) */
#site-wrapper.acc-negative-contrast {
    filter: invert(100%) !important;
    background-color: #fff;
    /* Ensure base for inversion */
}

#site-wrapper.acc-negative-contrast img {
    filter: invert(100%);
    /* Flip content back to normal if desired, or keep generic */
}

/* 5. Light Background (White on Black) */
body.acc-light-bg {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.acc-light-bg * {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* 6. Highlight Links */
body.acc-highlight-links a {
    text-decoration: underline !important;
    font-weight: bold !important;
    background-color: #ffff00 !important;
    color: #000000 !important;
}

/* 7. Readable Font (Dyslexia Friendly - Simple Sans) */
body.acc-readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
    line-height: 1.5 !important;
    letter-spacing: 0.05em !important;
}

/* Mobile Responsiveness for Panel */
@media (max-width: 480px) {
    #accessibility-panel {
        width: 85%;
    }
}