/* ═══════════════════════════════════════════════════════════════════════
   📖 PAMOKOS (js/lessons.js) — video + žingsniai. Šviesus langas kaip visa programa;
   tokenai iš css/theme.css (tamsi tema — savaime).
   ═══════════════════════════════════════════════════════════════════════ */
#lessons-modal { position: fixed; inset: 0; z-index: 99100; display: none; align-items: center; justify-content: center; font-family: var(--font, system-ui, sans-serif); }
#lessons-modal .ls-backdrop { position: absolute; inset: 0; background: rgba(24, 24, 27, 0.42); backdrop-filter: blur(2px); }
#lessons-modal .ls-card { position: relative; width: min(1040px, calc(100vw - 32px)); height: min(720px, calc(100vh - 48px)); display: flex; flex-direction: column;
    background: var(--bg-panel, #fff); color: var(--text, #18181B); border: 1px solid var(--border, #E5E4DE); border-radius: var(--r-lg, 14px);
    box-shadow: var(--shadow-xl, 0 24px 56px rgba(15,23,42,.14)); overflow: hidden; }
/* :where(#id) — nulinė specifika: kitaip ID (1,0,0) nurungtų .ls-item.active / .ls-btn.primary fonus */
:where(#lessons-modal) button { font: inherit; color: inherit; cursor: pointer; border: 0; background: transparent; text-align: left; }
:where(#lessons-modal) * { box-sizing: border-box; }

/* Antraštė */
.ls-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--border, #E5E4DE); }
.ls-title { font-size: 16px; font-weight: 700; }
.ls-sub { font-size: 12px; color: var(--text-soft, #A1A1AA); font-family: var(--font-mono, ui-monospace, monospace); }
.ls-x { margin-left: auto; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: var(--text-soft, #A1A1AA); }
.ls-x:hover { background: var(--bg-hover, #ECECE6); color: var(--text, #18181B); }

/* Kūnas: kairėje sąrašas, dešinėje skyrius */
.ls-body { flex: 1; min-height: 0; display: flex; }
.ls-nav { width: 250px; flex: none; overflow-y: auto; padding: 10px 8px; border-right: 1px solid var(--border, #E5E4DE); background: var(--bg-card, #FAFAF5); display: flex; flex-direction: column; gap: 2px; }
.ls-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--r-base, 10px); font-size: 13px; font-weight: 600; color: var(--text-dim, #71717A); width: 100%; }
.ls-item:hover { background: var(--bg-hover, #ECECE6); color: var(--text, #18181B); }
.ls-item.active { background: var(--primary, #E85D2A); color: #fff; }
.ls-item.active .ls-num { border-color: rgba(255,255,255,.7); color: #fff; }
.ls-num { flex: none; width: 20px; height: 20px; border-radius: 999px; border: 1.5px solid var(--border-light, #D4D2C9); font: 700 11px/17px var(--font-mono, ui-monospace, monospace); text-align: center; }
.ls-item.seen:not(.active) .ls-num { border-color: var(--accent-green, #2ECC71); color: var(--accent-green, #2ECC71); }
.ls-ico { flex: none; font-size: 15px; }
.ls-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-vid { flex: none; font-size: 10px; opacity: .7; }
.ls-main { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 22px 22px; }
.ls-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ls-h-ico { font-size: 28px; line-height: 1; margin-top: 2px; }
.ls-h h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.ls-intro { margin: 0; font-size: 13.5px; color: var(--text-dim, #71717A); line-height: 1.45; }

/* Video */
.ls-video { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 340px; border-radius: var(--r-base, 10px); overflow: hidden; background: #111; margin-bottom: 16px; }
.ls-video iframe, .ls-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.ls-novideo { background: var(--bg-card, #FAFAF5); border: 1px dashed var(--border-light, #D4D2C9); display: grid; place-items: center; color: var(--text-dim, #71717A); text-align: center; font-size: 13.5px; max-height: 120px; aspect-ratio: auto; height: 110px; }
.ls-novideo small { display: block; margin-top: 2px; color: var(--text-soft, #A1A1AA); }
.ls-novideo-ico { font-size: 22px; margin-bottom: 4px; }

/* Žingsniai */
.ls-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ls-step { display: flex; gap: 12px; align-items: flex-start; }
.ls-step-n { flex: none; width: 26px; height: 26px; border-radius: 999px; background: var(--primary-soft, rgba(232,93,42,.1)); color: var(--primary, #E85D2A); font: 700 13px/26px var(--font-mono, ui-monospace, monospace); text-align: center; }
.ls-step-b { flex: 1; min-width: 0; }
.ls-step-t { font-size: 14px; line-height: 1.5; }
.ls-step-t b { font-weight: 700; }
.ls-step-t kbd { background: var(--bg-card, #FAFAF5); border: 1px solid var(--border-light, #D4D2C9); border-bottom-width: 2px; padding: 0 6px; border-radius: 5px; font: 12px var(--font-mono, ui-monospace, monospace); }
.ls-step-img { display: block; width: 100%; max-width: 560px; margin-top: 8px; border-radius: var(--r-base, 10px); border: 1px solid var(--border, #E5E4DE); }
.ls-tips { margin-top: 18px; padding: 12px 14px; border-radius: var(--r-base, 10px); background: var(--bg-card, #FAFAF5); border: 1px solid var(--border, #E5E4DE); }
.ls-cap { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft, #A1A1AA); margin-bottom: 6px; }
.ls-tip { font-size: 13px; line-height: 1.45; padding: 3px 0; }

/* Poraštė */
.ls-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 18px; border-top: 1px solid var(--border, #E5E4DE); background: var(--bg-card, #FAFAF5); flex-wrap: wrap; }
.ls-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-dim, #71717A); }
.ls-chk input { accent-color: var(--primary, #E85D2A); width: 15px; height: 15px; }
.ls-chk small { color: var(--text-soft, #A1A1AA); }
.ls-foot-btns { display: flex; gap: 8px; margin-left: auto; }
.ls-btn { padding: 9px 14px; border-radius: 999px; background: var(--bg-panel, #fff); border: 1px solid var(--border-light, #D4D2C9); font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.ls-btn:hover { background: var(--bg-hover, #ECECE6); }
.ls-btn[disabled] { opacity: .45; cursor: default; }
.ls-btn.primary { background: var(--primary, #E85D2A); border-color: transparent; color: #fff; }
.ls-btn.primary:hover { background: var(--primary-dark, #C74A1E); }

@media (max-width: 760px) {
    #lessons-modal .ls-card { height: calc(100vh - 16px); width: calc(100vw - 16px); }
    .ls-body { flex-direction: column; }
    .ls-nav { width: 100%; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--border, #E5E4DE); padding: 8px; }
    .ls-item { flex: none; }
    .ls-name { display: none; }
    .ls-main { padding: 14px; }
}
