/* PROTOTYPE for the "Full labs" feature -- see docs/roadmap.md.
   Desktop-only on purpose: a fixed-minimum-width layout, no small-viewport
   rules anywhere in this file -- an explicit, accepted scope cut for this
   feature, not an oversight (see the note in lab.php). */

.lab-wrap {
    min-width: 900px;
}

/* Same amber-notice visual language as .diagnostic-hint in the main
   stylesheet -- reused rather than inventing a second "heads up" color. */
.lab-login-prompt {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
    padding: 0.7rem 1rem;
    margin: 0.8rem 0;
}
.lab-login-prompt a { color: #92400e; font-weight: 600; }

/* A quieter, informational cousin of .lab-login-prompt -- "here's what
   loaded," not "something needs your attention." */
.lab-draft-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e40af;
    padding: 0.7rem 1rem;
    margin: 0.8rem 0;
}

.lab-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--muted);
    margin-top: 1rem;
}

.lab-tab {
    margin-top: 0;
    padding: 0.6rem 1.1rem;
    background: #f3f4f6;
    color: var(--muted);
    border: 1px solid var(--muted);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    position: relative;
    top: 1px;
}

.lab-tab.active {
    background: #fff;
    color: var(--ink);
    border-bottom: 1px solid #fff;
}

.lab-tab-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lab-panels {
    border: 1px solid var(--muted);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
    padding: 1rem;
}

.lab-panel {
    display: none;
}

.lab-panel.active {
    display: block;
}

.lab-panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.lab-panel-label {
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.lab-a11y-toggle {
    margin-top: 0;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--muted);
}
.lab-a11y-toggle:hover:not(:disabled) { background: #f3f4f6; }
.lab-a11y-toggle:disabled { color: var(--muted); cursor: default; }

.lab-panel .CodeMirror {
    height: 420px;
    border: 1px solid var(--muted);
    border-radius: 6px;
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 0.92rem;
}

.lab-reference {
    max-height: 420px;
    overflow-y: auto;
}

.lab-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.6rem;
}

.lab-secondary-btn {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--muted);
}
.lab-secondary-btn:hover:not(:disabled) { background: #f3f4f6; }

.lab-output {
    background: #f3f4f6;
    border: 1px solid var(--muted);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.lab-bundle {
    margin-top: 1.2rem;
}

.lab-bundle-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1rem;
    margin: 0 0 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--muted);
}

.lab-bundle-score {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--muted);
}

.lab-result-call {
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 0.82rem;
    color: var(--muted);
}

.lab-instructions {
    max-height: 560px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.lab-instructions h2 { margin: 1.2rem 0 0.4rem; }
.lab-instructions h2:first-child { margin-top: 0; }
.lab-instructions h3 { margin: 1rem 0 0.3rem; }
/* render_rich_text()'s image syntax always emits class="problem-image"
   (style.css, shared site-wide), which only caps at max-width: 100% of its
   container -- no real size limit of its own. Inside .lab-instructions that
   container is nearly the full .lab-wrap width (min-width: 900px), so a
   480x480 board SVG rendered there at "100%" comes out oversized on a wide
   desktop screen. Scoped here instead of changing .problem-image itself,
   which other pages (problem/worksheet prompts) rely on filling its
   container at full width. (There used to be a .lab-instructions-img rule
   here with the same intent, but render_rich_text() never actually emitted
   that class -- dead CSS, replaced rather than kept alongside this.) */
.lab-instructions .problem-image {
    max-width: 420px;
}
.lab-instructions-code {
    background: #f3f4f6;
    border: 1px solid var(--muted);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 0.88rem;
}

.lab-checkpoints { margin: 0.8em 0; padding: 0.7em 1em; border: 1px solid var(--border, #ccc); border-radius: 6px; }
.lab-checkpoints ul { margin: 0.4em 0 0.4em 1.2em; padding: 0; }
.lab-checkpoint-on_time { color: var(--pass, #1a7f37); }
.lab-checkpoint-late, .lab-checkpoint-missed { color: var(--fail, #b42318); }

/* The API tab: the tables themselves (.api-*) are in style.css, shared with the problem pages. */
.lab-api { max-height: 560px; overflow-y: auto; padding-right: 0.5rem; }
.lab-api h3 { margin: 1.2rem 0 0.4rem; }
.lab-api h3:first-child { margin-top: 0; }

/* The Watch player for a program that prints frames (assets/frames.js). */
.frames-player {
    margin: 0.8rem 0;
}
.frames-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--muted);
    border-radius: 6px;
    background: #fff;
}
.frames-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.frames-btn {
    padding: 0.3rem 0.7rem;
}
.frames-slider {
    flex: 1 1 10rem;
    min-width: 8rem;
}
.frames-label {
    font-size: 0.9rem;
    color: var(--ink);
}
