/* Accessibility Widget Styles */
:root {
    --acc-btn-bg: #0072ce;
    --acc-btn-color: #ffffff;
    --acc-panel-bg: #ffffff;
    --acc-text-color: #333333;
}

/* Floating Button */
#accessibility-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--acc-btn-bg);
    color: var(--acc-btn-color);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease;
}

#accessibility-btn:hover {
    transform: scale(1.1);
}

/* Accessibility Panel */
#accessibility-panel {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 280px;
    background-color: var(--acc-panel-bg);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 9999;
    display: none;
    border: 1px solid #ddd;
    text-align: right;
    direction: rtl;
}

#accessibility-panel.active {
    display: block;
    animation: fadeInUs 0.3s ease;
}

@keyframes fadeInUs {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#accessibility-panel h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    color: var(--primary-blue);
}

.acc-control-group {
    margin-bottom: 15px;
}

.acc-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.acc-btn-row {
    display: flex;
    gap: 10px;
}

.acc-action-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.acc-action-btn:hover {
    background: #e9ecef;
}

.acc-action-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* High Contrast Mode - NUCLEAR OPTION */
body.high-contrast,
body.high-contrast * {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
    /* Kill gradients */
}

body.high-contrast img {
    filter: grayscale(100%) contrast(150%);
}

body.high-contrast a,
body.high-contrast a * {
    color: #ffff00 !important;
    /* Yellow links */
    text-decoration: underline !important;
}

/* Highlight for Speech */
.speaking-highlight {
    background-color: #ffeb3b !important;
    color: #000000 !important;
    outline: 3px solid #f44336 !important;
    border-radius: 4px;
    z-index: 10000;
    position: relative;
    cursor: help;
}