/**
 * PathwayAI Pro — Global Site Unified Dark Standard
 * Student Panel (dashboard dark) is the master reference for every page
 * EXCEPT Learning World (keeps its own light/dark toggle).
 * Visual only — no DOM / logic changes.
 */

/* ── Theme toggle removed on global-dark pages (Learning World keeps navbar toggle) ── */
body.pathway-dark-global .nav-theme-wrap,
body.pathway-dark-global .pathway-auth-theme-toggle {
    display: none !important;
}

/* ── Global dark canvas (matches student panel body.dark) ── */
body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.pathway-login-page) {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37, 99, 235, 0.14), transparent 55%),
        var(--p-bg, #0b0e14) !important;
    color: var(--p-text-body, #cbd5e1) !important;
    color-scheme: dark;
}

html[data-pathway-theme-scope="global-dark"] {
    color-scheme: dark;
}

/* ── Auth pages → v5 glass tokens (do not override pathway_auth_experience.css) ── */
body.pathway-dark-global.pathway-auth-page {
    --auth-panel-bg: #050810;
    --auth-card-bg: rgba(8, 12, 22, 0.82);
    --auth-card-border: rgba(80, 150, 255, 0.22);
    --auth-text: var(--p-text-heading, #f8fafc);
    --auth-muted: var(--p-text-muted, #94a3b8);
    --auth-input-bg: rgba(6, 10, 18, 0.72);
    --auth-input-border: rgba(80, 150, 255, 0.28);
    --auth-focus: rgba(59, 130, 246, 0.45);
    --auth-link: #60a5fa;
}

/* ── Topbar / cards / panels → pathway_cinematic_unifier.css (loads after this file) ── */

/* ── Forms / inputs — student panel ── */
body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.pathway-login-page) input:not([type="checkbox"]):not([type="radio"]):not(.pathway-auth-input),
body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.pathway-login-page) select:not(.pathway-auth-input),
body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.pathway-login-page) textarea:not(.pathway-auth-input) {
    background: var(--p-surface-2, #12161f) !important;
    border: 1px solid var(--p-border, rgba(255, 255, 255, 0.1)) !important;
    color: var(--p-text-heading, #f8fafc) !important;
    border-radius: var(--p-radius-md, 12px) !important;
}

body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.pathway-login-page) input:focus,
body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.pathway-login-page) select:focus,
body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.pathway-login-page) textarea:focus {
    border-color: rgba(96, 165, 250, 0.55) !important;
    box-shadow: var(--p-focus-ring, 0 0 0 3px rgba(37, 99, 235, 0.35)) !important;
}

/* ── Alerts / toasts ── */
body.pathway-dark-global .alert.success {
    background: rgba(22, 163, 74, 0.14) !important;
    border-color: rgba(74, 222, 128, 0.35) !important;
    color: #bbf7d0 !important;
}

body.pathway-dark-global .alert.error {
    background: rgba(220, 38, 38, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fecaca !important;
}

/* ── Tables ── */
body.pathway-dark-global.page-os-shell:not(.learning-world-page) table th {
    color: var(--p-text-muted, #94a3b8) !important;
    border-color: var(--p-border, rgba(255, 255, 255, 0.08)) !important;
}

body.pathway-dark-global.page-os-shell:not(.learning-world-page) table td {
    color: var(--p-text-body, #cbd5e1) !important;
    border-color: var(--p-border, rgba(255, 255, 255, 0.06)) !important;
}

/* ── Footer ── */
body.pathway-dark-global.page-os-shell:not(.learning-world-page) .footer {
    color: var(--p-text-muted, #94a3b8) !important;
    border-top: 1px solid var(--p-border, rgba(255, 255, 255, 0.08)) !important;
}

body.pathway-dark-global.page-os-shell:not(.learning-world-page) .footer a {
    color: var(--p-text-body, #cbd5e1) !important;
    text-shadow: none !important;
}

/* ── Scrollbar (WebKit) — student panel dark ── */
body.pathway-dark-global.page-os-shell:not(.learning-world-page) ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.pathway-dark-global.page-os-shell:not(.learning-world-page) ::-webkit-scrollbar-track {
    background: var(--p-bg-subtle, #0f131c);
}

body.pathway-dark-global.page-os-shell:not(.learning-world-page) ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

body.pathway-dark-global.page-os-shell:not(.learning-world-page) ::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page) #mainContent .card:hover,
    body.pathway-dark-global.page-os-shell:not(.learning-world-page):not(.pathway-auth-page) .admin-main .card:hover {
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ZERO DIV HOVER SURFACE CHANGE — sitewide (login/auth pages excluded)
   No background, border, shadow, or transform flip on div/card/section hover.
   ═══════════════════════════════════════════════════════════════════════════ */

@media (hover: hover) {
    body:not(.pathway-auth-page) :is(div, section, article, aside, main, header, footer, nav):hover:not(.btn):not(.btn-primary):not(.btn-secondary):not(.btn-outline):not(.btn-ghost):not(.lw-btn):not(.pathway-auth-card):not(.pathway-auth-visual):not(.pathway-auth-hero-img):not(.pathway-auth-shell):not(.home-ambient):not(.home-ambient-base):not(.home-ambient-mesh):not(.home-ambient-grid):not(.home-ambient-orb):not(.home-mouse-glow):not(.pathway-auth-submit):not(.pathway-auth-social-btn) {
        transform: none !important;
        filter: none !important;
    }

    body:not(.pathway-auth-page) .card:hover,
    body:not(.pathway-auth-page) .form-card:hover,
    body:not(.pathway-auth-page) .stat:hover,
    body:not(.pathway-auth-page) .step-item:hover,
    body:not(.pathway-auth-page) .feature-box:hover,
    body:not(.pathway-auth-page) .onboarding-card:hover,
    body:not(.pathway-auth-page) .admin-chip-card:hover,
    body:not(.pathway-auth-page) .trust-institute-grid article:hover,
    body:not(.pathway-auth-page) .testimonial-slide:hover,
    body:not(.pathway-auth-page) .stack-grid div:hover,
    body:not(.pathway-auth-page) .faq-item:hover {
        transform: none !important;
        box-shadow: inherit !important;
        filter: none !important;
    }

    body.page-public-home.home-cinematic:not(.pathway-auth-page) div:hover:not(.btn):not(.btn-primary):not(.btn-secondary):not(.btn-outline):not(.home-ambient):not(.home-ambient-base):not(.home-ambient-mesh):not(.home-ambient-grid):not(.home-ambient-orb):not(.home-mouse-glow):not(.step-number),
    body.page-public-home.home-cinematic:not(.pathway-auth-page) .card:hover,
    body.page-public-home.home-cinematic:not(.pathway-auth-page) section.card:hover,
    body.page-public-home.home-cinematic:not(.pathway-auth-page) .stat:hover {
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
        box-shadow: none !important;
        transform: none !important;
    }

    body.page-public-home.home-cinematic:not(.pathway-auth-page) section.pilot-schools-section:hover,
    body.page-public-home.home-cinematic:not(.pathway-auth-page) .pilot-school-card:hover,
    body.page-public-home.home-cinematic:not(.pathway-auth-page) .pilot-schools-metrics article:hover {
        background: rgba(22, 34, 68, 0.12) !important;
        background-color: rgba(22, 34, 68, 0.12) !important;
        box-shadow: none !important;
    }
}
