/* ============================================================
   WebEdu — học liệu (EduHocLieu: slide / PDF / video / iSpring / file) + kho bài học theo chương trình
   Tiền tố: .edu-hl-* (viewer, danh sách), .edu-lsn-* (bài học HS)
   ============================================================ */

/* ---- viewer trong sheet full ---- */
.edu-hl-sheet { height: 96vh; }
.edu-web .edu-hl-sheet { max-width: min(1280px, 96vw); width: 96vw; height: 92vh; }
.edu-hl-sheet .edu-sheet-body { padding: 0 12px 12px; display: flex; flex-direction: column; overflow: hidden; }
.edu-hl-viewer { display: flex; gap: 12px; flex: 1 1 auto; min-height: 0; }
.edu-hl-side { width: 240px; flex: 0 0 240px; overflow-y: auto; border-right: 1px solid var(--border); padding-right: 8px; }
.edu-hl-side-item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: var(--r-sm); text-align: left; color: var(--text-2); cursor: pointer; font: inherit; font-size: var(--fs-sm); }
.edu-hl-side-item:hover { background: var(--surface-3); }
.edu-hl-side-item.is-on { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.edu-hl-side-no { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); flex: 0 0 auto; }
.edu-hl-side-item.is-on .edu-hl-side-no { background: var(--primary); color: var(--on-primary); }
.edu-hl-side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edu-hl-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.edu-hl-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0 10px; flex-wrap: wrap; }
.edu-hl-bar-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.edu-hl-bar-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edu-hl-bar-act { display: flex; align-items: center; gap: 6px; }
.edu-hl-count { font-size: var(--fs-sm); color: var(--text-3); min-width: 36px; text-align: center; }
.edu-hl-stage { position: relative; flex: 1 1 auto; min-height: 0; background: var(--surface-3); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.edu-hl-frame { border: 0; width: 100%; flex: 1 1 auto; min-height: 60vh; background: #fff; }
.edu-hl-video { width: 100%; max-height: 100%; flex: 1 1 auto; background: #000; }
.edu-hl-dl { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px; color: var(--text-2); text-align: center; }
.edu-hl-dl-name { font-weight: 700; color: var(--text-1); word-break: break-all; }
.edu-hl-desc { padding: 10px 14px; font-size: var(--fs-sm); color: var(--text-2); background: var(--surface); border-top: 1px solid var(--border); }
.edu-hl-exit { position: absolute; top: 10px; right: 10px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.edu-hl-stage:fullscreen, .edu-hl-stage:-webkit-full-screen { border-radius: 0; background: #000; }
.edu-hl-stage:fullscreen .edu-hl-frame, .edu-hl-stage:-webkit-full-screen .edu-hl-frame { min-height: 100vh; }
/* iOS WebView (không có Fullscreen API): phóng khung bằng CSS */
.edu-hl-viewer.is-presenting .edu-hl-stage { position: fixed; inset: 0; z-index: 9999; border-radius: 0; background: #000; }
.edu-hl-viewer.is-presenting .edu-hl-frame { min-height: 100vh; }
.edu-mobile .edu-hl-viewer { flex-direction: column; }
.edu-mobile .edu-hl-side { width: auto; flex: 0 0 auto; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; border-right: 0; padding: 0 0 6px; }
.edu-mobile .edu-hl-side-item { width: auto; flex: 0 0 auto; background: var(--surface-3); white-space: nowrap; }
.edu-mobile .edu-hl-side-name { max-width: 160px; }
.edu-mobile .edu-hl-frame { min-height: 52vh; }

/* ---- danh sách học liệu (directive edu-hoclieu-list) ---- */
.edu-hl-list { display: flex; flex-direction: column; gap: 6px; }
.edu-hl-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--text-1); transition: border-color .15s var(--ease), background .15s var(--ease); }
.edu-hl-row:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.edu-hl-row.is-off { opacity: .6; }
.edu-hl-ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: var(--info-soft); color: var(--info); }
.edu-hl-k-slide, .edu-hl-k-ispring { background: var(--warn-soft); color: var(--warn); }
.edu-hl-k-video, .edu-hl-k-youtube { background: var(--danger-soft); color: var(--danger); }
.edu-hl-k-download { background: var(--ok-soft); color: var(--ok); }
.edu-hl-k-baigiang { background: var(--primary-soft); color: var(--primary); }
.edu-hl-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.edu-hl-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edu-hl-sub { font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edu-hl-chev { color: var(--text-3); }
.edu-hl-empty { font-size: var(--fs-sm); color: var(--text-3); padding: 8px 2px; }

/* ---- Bài học HS: chương trình → khoá học ---- */
.edu-lsn-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; }
.edu-lsn-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; white-space: nowrap; }
.edu-lsn-chip.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.edu-lsn-group { margin-bottom: 26px; }
.edu-lsn-group-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.edu-lsn-group-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: .01em; text-transform: uppercase; color: var(--ink); }
[data-dark] .edu-lsn-group-title { color: var(--text-1); }
.edu-lsn-group-count { font-size: var(--fs-sm); color: var(--text-3); }
.edu-lsn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.edu-mobile .edu-lsn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.edu-lsn-card { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; cursor: pointer; text-align: left; padding: 0; font: inherit; color: var(--text-1); display: flex; flex-direction: column; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.edu-lsn-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.edu-lsn-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--primary-soft2), var(--primary-soft)); display: flex; align-items: center; justify-content: center; color: var(--primary); background-size: cover; background-position: center; }
.edu-lsn-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.edu-lsn-card-title { font-weight: 700; font-size: var(--fs-sm); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.edu-lsn-card-sub { font-size: var(--fs-xs); color: var(--text-3); }
.edu-lsn-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.edu-lsn-hero-cover { width: 160px; aspect-ratio: 16 / 9; border-radius: var(--r); background: var(--primary-soft) center / cover no-repeat; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.edu-mobile .edu-lsn-hero-cover { width: 110px; }
.edu-lsn-bai { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.edu-lsn-bai-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: transparent; cursor: pointer; text-align: left; font: inherit; color: var(--text-1); }
.edu-lsn-bai-no { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.edu-lsn-bai-main { flex: 1 1 auto; min-width: 0; }
.edu-lsn-bai-title { font-weight: 700; }
.edu-lsn-bai-sub { font-size: var(--fs-xs); color: var(--text-3); }
.edu-lsn-bai-items { padding: 0 14px 12px 56px; }
.edu-mobile .edu-lsn-bai-items { padding-left: 14px; }
