/* ========================================================
   Nexainta — Accessibility Plugin Styles
   public/assets/a11y.css
   ======================================================== */

/* ── Floating Button ────────────────────────────────────── */
.a11y-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 0.7rem 1.1rem 0.7rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.a11y-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(79, 70, 229, 0.55);
}

.a11y-fab:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.a11y-fab-label {
    font-size: 0.8rem;
}

/* ── Panel ──────────────────────────────────────────────── */
.a11y-panel {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    z-index: 9001;
    width: 280px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform-origin: bottom right;
    animation: panelIn 0.2s ease;
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.a11y-panel-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    background: none;
    -webkit-text-fill-color: #f8fafc;
}

.a11y-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a11y-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.a11y-close:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.a11y-panel-body {
    padding: 0.75rem 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* ── Control Group (Font size) ──────────────────────────── */
.a11y-control-group {}

.a11y-control-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.a11y-btn-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.a11y-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    transition: all 0.15s;
}

.a11y-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.a11y-btn:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.a11y-value-label {
    flex: 0 0 50px;
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
}

/* ── Toggle row ─────────────────────────────────────────── */
.a11y-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.a11y-switch-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.87rem;
    color: #cbd5e1;
    font-weight: 500;
}

.a11y-switch {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.a11y-switch[aria-checked="true"] {
    background: #4f46e5;
    border-color: #4f46e5;
}

.a11y-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.a11y-switch[aria-checked="true"] .a11y-switch-thumb {
    transform: translateX(20px);
}

.a11y-switch:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

/* ── Reset button ───────────────────────────────────────── */
.a11y-reset-btn {
    width: 100%;
    padding: 0.55rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.a11y-reset-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}


/* ════════════════════════════════════════════════════════
   ACCESSIBILITY MODIFIER CLASSES (applied to <html>)
   ════════════════════════════════════════════════════════ */

/* ── Font Sizes ─────────────────────────────────────────── */
html[data-font="sm"] {
    font-size: 13px;
}

html[data-font="md"] {
    font-size: 16px;
}

html[data-font="lg"] {
    font-size: 19px;
}

html[data-font="xl"] {
    font-size: 22px;
}

html[data-font="xxl"] {
    font-size: 26px;
}

/* ── High Contrast ──────────────────────────────────────── */
html.a11y-contrast {
    --bg-base: #000 !important;
    --bg-900: #0a0a0a !important;
    --bg-card: #111 !important;
    --border: rgba(255, 255, 255, 0.3) !important;
    --text-primary: #fff !important;
    --text-secondary: #e2e8f0 !important;
    --text-muted: #94a3b8 !important;
    --brand-400: #a5b4fc !important;
    --brand-600: #6366f1 !important;
}

html.a11y-contrast .nav-link,
html.a11y-contrast .hero-subtitle,
html.a11y-contrast .step-desc,
html.a11y-contrast .trust-card p,
html.a11y-contrast .testimonial-text {
    color: #e2e8f0 !important;
}

html.a11y-contrast .btn-outline {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

html.a11y-contrast .lang-btn {
    color: #94a3b8 !important;
}

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

/* ── Focus Highlight ────────────────────────────────────── */
html.a11y-focus *:focus-visible {
    outline: 3px solid #fbbf24 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.25) !important;
    border-radius: 4px;
}