/**
 * Gemeinsame Lab-Shell: Optik für alle Seiten, die dieselbe Struktur nutzen
 * (Mini-Rail, #side-panel, #main-content, #canvas-container, optional Coach, Grid).
 * In der HTML-Seite: nach cyber-layout / cyber-lab-overrides / branding einbinden.
 */
:root {
    /* --branding-blue and --neon-blue are defined in branding.styles.extracted.css
       and cyber-layout.css respectively — only --deep-bg is unique to this file. */
    --deep-bg: rgb(0, 0, 20);
}

body {
    margin: 0;
    padding: 0;
    background: var(--deep-bg);
    color: white;
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

/* #sidebar-header removed — cyber-lab-overrides.css sets min-height:0 / margin-bottom:0
   with !important, making the override here a no-op. */

#main-content {
    flex-grow: 1;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(0, 210, 255, 0.05) 0%, transparent 40%);
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(5, 25, 55, 1) 0%, rgba(8, 20, 42, 1) 100%);
}

#math-coach-box {
    position: absolute;
    /* off the stage edges instead of glued into the corner (Doc, 18.09.2026: "nicht geklatscht") -
       the offset filmkritik and marionwalter already set by hand. The top is flush with the side panel's first
       card, which starts 10px down (Doc, 19.09.2026: "die Box oben links ist nicht bündig mit dem Top") */
    top: 10px;
    left: 24px;
    max-width: calc(100% - 48px);
    width: 380px;
    background: rgba(10, 20, 40, 0.4);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    color: white;
    font-family: 'Orbitron', sans-serif;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    z-index: 10;
}

#math-coach-box.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Explanation text reads in Outfit. Orbitron stays on labels, numbers and
   buttons - whole sentences in it are hard to read. */
#coach-content {
    font-family: 'Outfit', sans-serif;
    line-height: 1.55;
    /* no last line with a lone "1." (Doc, 19.09.2026: "die 1 Punkt auf der nächsten Zeile, das ist nicht so schön") */
    text-wrap: pretty;
}

.coach-title {
    font-size: 0.7rem;
    color: #00d2ff;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Collapse handle — see js/coach-box.js. The box itself stays click-through,
   only the title row takes the pointer. */
#math-coach-box .coach-title {
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
}

.coach-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: 7px;
    background: rgba(0, 210, 255, 0.08);
    color: #00d2ff;
    cursor: pointer;
    transition: background .2s ease, transform .3s ease;
}

.coach-toggle:hover {
    background: rgba(0, 210, 255, 0.2);
}

#math-coach-box.collapsed .coach-toggle {
    transform: rotate(-90deg);
}

#math-coach-box.collapsed {
    width: auto;
    max-width: min(340px, calc(100% - 48px));
    padding: 12px 16px;
    border-radius: 8px;        /* a handle, not a pill (Doc, 18.09.2026: "weniger rund") */
}

#math-coach-box.collapsed .coach-title {
    margin-bottom: 0;
}

#math-coach-box.collapsed #coach-content {
    display: none;
}

.coach-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00d2ff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00d2ff;
}

.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 210, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 210, 255, 0.05) 1px, transparent 1px);
    background-size: min(120px, 11vw) min(120px, 11vw);
    pointer-events: none;
}

/* Lab on a deck slide (class set by cyber-left-chrome.js): no grid lines (Doc, 17.09.2026) */
html.cyber-in-deck .cyber-grid {
    background-image: none;
}

.coach-math-highlight {
    color: #ffde00;
    font-weight: bold;
}

.cyber-label {
    font-family: 'Orbitron' !important;
    font-size: 0.85rem;
    letter-spacing: 2px;
    opacity: 0.8;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type='number'] {
    -moz-appearance: textfield;
}

.cyber-select {
    background-image: none !important;
}
