/* Lesson notes beside the demonstration videos (lesson.js). Video on the left, lesson on the right. */
.fire-training-card.has-lesson { width: min(1320px, 96vw); max-height: calc(100vh - 24px); padding: 22px 26px 18px; overflow: hidden; }
.fire-training-card.has-lesson h2 { margin: 6px 0 14px; font-size: clamp(24px, 3.2vw, 40px); }
.fire-training-card.has-lesson .modal-key-hint { margin-top: 14px; }
.fire-extinguisher-modal:has(.has-lesson) { padding: 12px; }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 16px; height: clamp(300px, calc(100vh - 230px), 620px); text-align: left; }
.has-lesson .lesson-layout > .training-video-screen { height: 100%; min-height: 0; }
.tablet-frame.has-lesson { width: min(1320px, 96vw); }
.tablet-frame.has-lesson .lesson-layout { height: auto; min-height: 0; }
.tablet-frame.has-lesson .lesson-layout > .tablet-screen { min-height: 0; }

.lesson-panel { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; color: #d6e8eb; background: rgba(3, 13, 21, .92); border: 1px solid rgba(84, 223, 215, .3); border-radius: 10px; }
.lesson-head { padding: 13px 16px 12px; border-bottom: 1px solid rgba(84, 223, 215, .18); background: rgba(84, 223, 215, .05); }
.lesson-kicker { color: var(--cyan, #54dfd7); font: 500 10.5px DM Mono, monospace; letter-spacing: .16em; text-transform: uppercase; }
.lesson-title { margin: 3px 0 10px; color: #f2ffff; font: 800 20px/1.2 Manrope, sans-serif; }
.lesson-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lesson-button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; color: #06151b; background: var(--cyan, #54dfd7); border: 0; border-radius: 999px; font: 800 12.5px Manrope, sans-serif; cursor: pointer; }
.lesson-button:hover { filter: brightness(1.08); }
.lesson-button:focus-visible, .lesson-pick select:focus-visible, .lesson-body:focus-visible { outline: 2px solid #ffd27a; outline-offset: 2px; }
.lesson-button[hidden], .lesson-pick[hidden] { display: none; }
.lesson-pick { display: inline-flex; flex: 1 1 160px; align-items: center; gap: 6px; min-width: 0; color: #8fa9b0; font: 500 10.5px DM Mono, monospace; letter-spacing: .1em; text-transform: uppercase; }
.lesson-pick select { flex: 1; min-width: 0; min-height: 32px; padding: 0 8px; color: #e9ffff; background: #0b1e29; border: 1px solid rgba(84, 223, 215, .35); border-radius: 6px; font: 600 13px Manrope, sans-serif; text-transform: none; letter-spacing: 0; }
.lesson-back { margin-top: 9px; color: #1c1305; background: #ffd27a; }
.lesson-panel.is-browsing { border-color: rgba(255, 210, 122, .55); }

.lesson-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 18px 22px; font: 14.5px/1.6 Manrope, sans-serif; overscroll-behavior: contain; scrollbar-color: rgba(84, 223, 215, .45) transparent; }
.lesson-body > :first-child { margin-top: 4px; }
.lesson-body p { margin: 8px 0; }
.lesson-body h4 { margin: 18px 0 6px; padding-top: 12px; color: var(--cyan, #54dfd7); border-top: 1px solid rgba(84, 223, 215, .14); font: 700 12.5px DM Mono, monospace; letter-spacing: .1em; text-transform: uppercase; }
.lesson-body > h4:first-child { padding-top: 0; border-top: 0; }
.lesson-body h5 { margin: 12px 0 4px; color: #ffd27a; font: 800 14px Manrope, sans-serif; }
.lesson-body ul { margin: 4px 0 10px; padding-left: 20px; }
.lesson-body li { margin: 5px 0; }
.lesson-body li::marker { color: var(--cyan, #54dfd7); }
.lesson-body strong { color: #fff; }
.lesson-body .lesson-note { padding: 8px 12px; background: rgba(255, 210, 122, .08); border-left: 3px solid #ffd27a; border-radius: 4px; }
.lesson-body .lesson-empty { color: #8fa9b0; font-style: italic; }
.lesson-top { position: absolute; right: 14px; bottom: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }

/* Narrow windows: the lesson goes under the video. */
@media (max-width: 860px) {
  .lesson-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(160px, 40vh) minmax(0, 1fr); height: calc(100vh - 150px); }
  .fire-training-card.has-lesson { padding: 14px 14px 12px; }
  .fire-training-card.has-lesson h2 { margin: 2px 0 10px; font-size: 22px; }
  .fire-training-card.has-lesson .eyebrow { display: none; }
  .lesson-title { font-size: 17px; }
  .lesson-body { font-size: 14px; }
}

/* Touch screens: the touch layout hides the key hints, so the video and lesson can use that space. */
.touch-controls .has-lesson .lesson-layout { height: calc(100vh - 92px); }
@media (max-width: 860px) {
  .touch-controls .has-lesson .lesson-layout { height: calc(100vh - 80px); }
}
@media (max-height: 520px) and (min-width: 600px) {
  .has-lesson .lesson-layout { grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); grid-template-rows: none; height: calc(100vh - 118px); }
  .touch-controls .has-lesson .lesson-layout { height: calc(100vh - 80px); }
  .fire-training-card.has-lesson { padding: 10px 14px; }
  .fire-training-card.has-lesson h2 { margin: 0 0 6px; font-size: 20px; }
  .fire-training-card.has-lesson .eyebrow { display: none; }
  .fire-training-card.has-lesson .modal-key-hint { margin-top: 6px; }
  .lesson-head { padding: 8px 12px; }
  .lesson-title { margin-bottom: 6px; font-size: 16px; }
}
