/* Splitscreen-Login: schwebende Karte auf dem markentypischen Navy-Verlauf,
   links Video-Panel (volle Kartenhöhe), rechts Login-Formular.
   Wird von index.php und admin_auswahl.php gemeinsam genutzt.
   --primary/--accent/--bg-blue-light/--bg-blue-dark/--karte/--text-muted
   werden von jeder einbindenden Seite selbst im :root definiert (aus dem
   Farbschema der Seite, siehe deren eigener <style>-Block + theme.php). */

html, body.split-body {
    margin: 0;
    min-height: 100vh;
}

body.split-body {
    background: radial-gradient(ellipse 1400px 900px at 50% -10%, var(--bg-blue-light) 0%, var(--bg-blue-dark) 75%) fixed;
    background-color: var(--bg-blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.split-card {
    position: relative;
    background: var(--karte);
    width: 100%;
    max-width: 920px;
    min-height: 540px;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    padding: 18px;
    box-sizing: border-box;
}

/* ---- linkes Panel: Video ---- */
.split-video-pane {
    flex: 0 0 44%;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--primary);
}

.split-video-pane video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.split-video-gradient {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.22) 30%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* ---- Logo oben links auf dem Video, in einer weißen Karte. Blendet sich
   passend zum Videofortschritt ein (siehe split-login.js) -> ist am Anfang
   unsichtbar und beim letzten Frame des Videos vollständig zu sehen. ---- */
.login-logo-chip {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    background: var(--karte);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transition: opacity 0.25s linear;
}

.login-logo {
    display: block;
    width: 120px;
    height: auto;
}

.split-video-caption {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 28px;
    z-index: 2;
    pointer-events: none;
    min-height: 4.4em;
}

.caption-block {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.caption-block.is-active {
    opacity: 1;
    transform: translateY(0);
}

.caption-bar {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
    margin-bottom: 12px;
}

.caption-heading {
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1.25;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.caption-subtext {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.45;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

/* ---- rechtes Panel: Login-Formular ---- */
.split-form-pane {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Oben/unten symmetrisch (30px) -> .login-box zentriert sich exakt auf
       Höhe des Video-Panels daneben (kein Logo mehr hier, das die Mitte
       nach unten verschieben würde).
       Links/rechts bewusst NICHT symmetrisch: das äußere Padding der
       .split-card (18px) wirkt nur auf der rechten Seite zusätzlich zum
       Formular-Padding, links liegt das Video direkt ohne Kartenrand an -
       daher hier 54px (=36+18) links, damit der optische Abstand
       Video->Eingabefelder gleich groß ist wie Eingabefelder->Kartenrand. */
    padding: 30px 36px 30px 54px;
    box-sizing: border-box;
}

/* ---- Umschalter Lehrkraft / Admin (kompakt statt volle Breite) ---- */
.mode-switch {
    display: inline-flex;
    background: var(--bg-blue-light);
    border-radius: 999px;
    padding: 3px;
    margin-bottom: 22px;
}

.mode-switch-btn {
    text-align: center;
    padding: 6px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.mode-switch-btn:hover { color: var(--primary); }

.mode-switch-btn.active {
    /* Bewusst kraeftige --primary-Fuellung statt nur --karte auf --bg-blue-light:
       die beiden sind bei mehreren Farbschemata (z.B. Circuit Slate, Graphite
       Brass) fast dasselbe blasse Weiss/Grau, dann war per Auge kaum zu
       erkennen, welche Seite aktiv ist. --primary hat laut theme_definitionen.php
       in jedem Schema garantiert genug Kontrast zu weisser Schrift. */
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.login-welcome {
    color: var(--primary);
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 18px;
    text-align: center;
}

/* ---- Sichtbarer Fokusring für Tastaturnutzung (Buttons/Links dieser Seiten) ---- */
.pw-toggle:focus-visible,
.login-btn:focus-visible,
.mode-switch-btn:focus-visible,
.split-form-pane a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ---- Bewegungsreduzierung respektieren: Video ausblenden, Caption-Wechsel ohne Animation ---- */
@media (prefers-reduced-motion: reduce) {
    .split-video-pane video {
        display: none;
    }
    .caption-block {
        transition: none !important;
    }
}

/* ---- Responsive: unter 800px übereinander statt nebeneinander ---- */
@media (max-width: 800px) {
    body.split-body {
        padding: 0;
    }
    .split-card {
        flex-direction: column;
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    .split-video-pane {
        flex: 0 0 auto;
        height: 38vh;
        min-height: 220px;
        border-radius: 16px;
    }
    .split-form-pane {
        padding: 24px 24px 40px;
    }
    .login-logo-chip {
        top: 12px;
        left: 12px;
        padding: 6px 10px;
    }
    .login-logo {
        width: 94px;
    }
}
