/* Accessibility Widget Styles */
.acc-widget {
    position: fixed;
    right: 20px;
    bottom: 20px; /* Moved to bottom right as requested */
    z-index: 10001; /* Higher than contact menu */
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.acc-btn-toggle {
    width: 50px;
    height: 50px;
    background: #5B21B6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid #fff;
    font-size: 24px;
    pointer-events: auto;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.acc-btn-toggle:hover {
    transform: scale(1.1);
}

.acc-menu {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    width: 280px;
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
    border: 1px solid #eee;
    margin-right: -10px;
}

.acc-menu.show {
    display: flex;
    animation: accFadeIn 0.3s ease-out;
}

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

.acc-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 5px;
}

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

.acc-option-btn {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.acc-option-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.acc-option-btn.active {
    background: #5B21B6;
    color: #fff;
    border-color: #5B21B6;
}

.acc-font-controls {
    display: flex;
    gap: 5px;
}

.acc-font-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: bold;
}

/* Accessibility Modes Implementation */

/* 1. Grayscale - Apply to main sections but not the widget */
body.acc-grayscale > *:not(.acc-widget),
body.acc-grayscale .hero,
body.acc-grayscale section,
body.acc-grayscale header,
body.acc-grayscale footer,
body.acc-grayscale .top-bar {
    filter: grayscale(100%) !important;
}

/* 2. High Contrast - Keep widget normal but change everything else */
body.acc-high-contrast {
    background: #000 !important;
}

body.acc-high-contrast *:not(.acc-widget):not(.acc-widget *) {
    background-color: #000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.acc-high-contrast a:not(.acc-widget):not(.acc-widget *) {
    text-decoration: underline !important;
}

body.acc-high-contrast img:not(.acc-widget):not(.acc-widget *) {
    filter: brightness(0.8) contrast(1.2) grayscale(0.5);
}

/* 3. Inverted / Negative */
body.acc-negative > *:not(.acc-widget) {
    filter: invert(100%) hue-rotate(180deg) !important;
}

/* 4. Font Scaling */
html.acc-font-xs { font-size: 14px !important; }
html.acc-font-sm { font-size: 15px !important; }
html.acc-font-md { font-size: 16px !important; } /* Default */
html.acc-font-lg { font-size: 18px !important; }
html.acc-font-xl { font-size: 20px !important; }
html.acc-font-xxl { font-size: 24px !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .acc-widget {
        right: 15px;
        bottom: 20px;
    }
    .acc-menu {
        width: 260px;
        position: absolute;
        bottom: 60px;
        right: 0;
    }
}
