/* ============================================================
   BRAINZIE — INTERACTIVE LESSON STYLES
   Shared by every lesson page (the focused, one-step-at-a-time
   stepper) and the lesson template. Loaded after brainzie.css.
   ============================================================ */

.lesson { width: min(100% - 40px, 940px); margin-inline: auto; }

/* progress */
.lesson-progress { display: flex; align-items: center; gap: 14px; margin: 28px 0 22px; flex-wrap: wrap; }
.lesson-progress .label { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.dots { display: flex; gap: 8px; flex-wrap: wrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); border: none; padding: 0; cursor: pointer; transition: background .15s, transform .15s; }
.dot:hover { transform: scale(1.25); }
.dot.done { background: var(--brand-tint); }
.dot.current { background: var(--brand); transform: scale(1.3); }

/* step */
.step { display: none; animation: fade .25s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step-kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 600; color: var(--secondary); }
.step h2 { margin: 6px 0 14px; }
.step p { font-size: 1.05rem; line-height: 1.7; }
.step p code, li code { background: var(--paper-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-family: "JetBrains Mono", monospace; font-size: .9em; color: var(--brand-deep); }

/* code block */
.code { border-radius: var(--radius-s); overflow: hidden; margin: 20px 0; box-shadow: var(--shadow-s); }
.code-bar { display: flex; justify-content: space-between; align-items: center; background: #2b2740; color: #c8c2dd; padding: 8px 14px; font-family: "JetBrains Mono", monospace; font-size: .76rem; }
.code-bar .file { display: flex; align-items: center; gap: 8px; }
.code-bar .file::before { content: "📄"; }
.copy { background: none; border: 1px solid #565073; color: #c8c2dd; font-family: var(--font-display); font-size: .72rem; font-weight: 600; padding: 3px 11px; border-radius: 6px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.copy:hover { border-color: #9b93b3; }
.copy.copied { border-color: #3fb950; color: #3fb950; }
.code pre { margin: 0; background: #1d1a2b; padding: 16px 18px; overflow-x: auto; }
.code code { font-family: "JetBrains Mono", monospace; font-size: .86rem; line-height: 1.65; color: #e7e3f3; white-space: pre; }

/* try-it panels (embedded Blazor demos/exercises via iframe) */
.tryit { margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--white); }
.tryit-bar { background: var(--brand-tint); color: var(--brand-deep); font-family: var(--font-display); font-weight: 600; font-size: .82rem; padding: 9px 16px; letter-spacing: .04em; }
.tryit iframe { width: 100%; border: 0; display: block; background: var(--paper-2); }

/* callouts */
.note { border-left: 4px solid var(--secondary); background: #EEE7FB; border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 13px 17px; margin: 18px 0; font-size: .97rem; }
.note strong { color: var(--secondary); }
.watch { border-left: 4px solid var(--accent-orange); background: #FFF1E0; border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 13px 17px; margin: 18px 0; font-size: .97rem; }
.watch strong { color: #B26A00; }

/* ---- Standard-lesson helpers ---------------------------------- */

/* "Today's goal" success-criteria list, homework-review checklist, recap list */
.goal-box { background: var(--brand-tint); border-radius: var(--radius-s); padding: 18px 22px; margin: 16px 0; }
.goal-box strong { color: var(--brand-deep); }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; }
.checklist li { position: relative; padding-left: 32px; line-height: 1.65; }
.checklist li + li { margin-top: 10px; }
.checklist li::before { content: "✋"; position: absolute; left: 0; top: 0; line-height: inherit; }
.checklist.qs li::before { content: "❓"; }

/* fast-fire group exercise — "Spot the error" / "What does it do?" */
.fastfire { border: 2px dashed var(--brand); border-radius: var(--radius-s); padding: 8px 18px 18px; margin: 18px 0; }
.fastfire .tag { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--brand); padding: 4px 12px; border-radius: 0 0 8px 8px; }

/* exercise list, ordered by increasing difficulty */
.exercises { list-style: none; margin: 8px 0 0; padding: 0; }
.exercises li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px; }
.exercises li + li { margin-top: 12px; }
.exercises h4 { font-size: 1.02rem; margin-bottom: 4px; }
.diff { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 6px; }
.diff.easy { color: #137A43; background: #E3F9EC; }
.diff.medium { color: #B26A00; background: #FFF1E0; }
.diff.hard { color: var(--brand-deep); background: var(--brand-tint); }

/* nav buttons — rendered both above and below the step (see assets/lesson.js) */
.lesson-nav { display: flex; justify-content: space-between; gap: 14px; margin: 34px 0 10px; border-top: 1px solid var(--line); padding-top: 22px; }
.lesson-nav.top { margin: 6px 0 22px; border-top: 0; padding-top: 0; }
.lesson-nav button { font-family: var(--font-display); font-weight: 600; font-size: 1rem; padding: 12px 26px; border-radius: 999px; cursor: pointer; border: 1.6px solid transparent; transition: transform .15s, background .15s, color .15s, border-color .15s; }
.lesson-nav .prev { background: transparent; color: var(--ink); border-color: var(--line); }
.lesson-nav .prev:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-deep); transform: translateY(-2px); }
.lesson-nav .next { background: var(--brand); color: #fff; box-shadow: var(--shadow-s); }
.lesson-nav .next:hover:not(:disabled) { background: var(--brand-deep); transform: translateY(-2px); }
.lesson-nav button:disabled { opacity: .4; cursor: default; }

/* ---- Full-screen toggle (glowing, à la team.core DataGrid) -------------- */
.fs-btn { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 1.05rem; line-height: 1; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.fs-btn:hover { border-color: var(--brand); color: var(--brand-deep); }
.fs-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Glow to invite use until the student has tried full screen once (JS clears it). */
.fs-btn.glow { animation: fs-glow 2s ease-in-out infinite; border-color: var(--brand); color: var(--brand-deep); }
.fs-btn.glow:hover { animation: none; }
@keyframes fs-glow {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 75%, transparent); background: var(--white); transform: scale(1); }
  50%      { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand) 0%, transparent); background: color-mix(in srgb, var(--brand) 16%, var(--white)); transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .fs-btn.glow { animation: none !important; } }

/* lesson title shown in the progress bar only when full screen (the page header is hidden) */
.lesson-progress .fs-title { display: none; font-family: var(--font-display); font-weight: 700; color: var(--ink); }

/* ---- Full-screen layout: only the current step (and a slim bar) show ----- */
body.lesson-fullscreen { overflow: hidden; }
body.lesson-fullscreen header.nav,
body.lesson-fullscreen .pagehead,
body.lesson-fullscreen > footer { display: none; }
body.lesson-fullscreen .lesson-shell { position: fixed; inset: 0; z-index: 200; overflow-y: auto; background: var(--paper); padding: 0; }
body.lesson-fullscreen .lesson { padding: 0 8px 40px; }
body.lesson-fullscreen .lesson-progress { position: sticky; top: 0; z-index: 5; margin: 0 0 18px; padding: 12px 8px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
body.lesson-fullscreen .lesson-progress .fs-title { display: inline; }
