/* courses.css — danh mục + trang bán + trang học (player) của module Khóa học.
   Kế thừa biến màu/khoảng cách từ assets/aios/styles.css (trang marketing);
   trang học tự chứa (không nạp styles.css) nên khai lại vài biến gốc ở .player. */

/* ── Danh mục + trang bán ── */
.co-main { padding: 34px 0 60px; }
.co-h1 { margin: 0 0 6px; }
.co-lead { color: #6b6357; max-width: 62ch; margin: 0 0 24px; }
.co-empty { color: #6b6357; padding: 24px 0; }

/* Lưới + thẻ của danh mục dùng .ev-grid/.ev-card ở assets/aios/styles.css (mục 24) — cùng bộ
   với dải sự kiện và dải khóa học trang chủ: bìa VUÔNG 1:1, tối đa 3 thẻ/hàng. Đừng dựng lại
   .co-card ở đây: bản cũ (bìa 16/9, lưới auto-fill) làm cùng một khóa hiện hai kiểu ở hai trang,
   và tên .co-grid còn trùng với .co-grid của shop.css (lưới 2 cột) — hai file, hai nghĩa. */
.co-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #efe7cf; font-size: .78rem; font-weight: 600; }
.co-badge--preview { background: #d9f0e0; color: #1c7c40; font-size: .72rem; vertical-align: 1px; }

.co-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; margin-bottom: 30px; }
.co-hero__media:empty { display: none; }
.co-hero__cover { width: 100%; border: 2px solid #1a1a1a; border-radius: 14px; display: block; }
.co-video { position: relative; width: 100%; aspect-ratio: 16/9; border: 2px solid #1a1a1a; border-radius: 14px; overflow: hidden; background: #000; }
.co-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.co-hero__info h1 { margin: 0 0 8px; }
.co-hero__meta { color: #6b6357; font-size: .9rem; margin: 10px 0 18px; }
.co-hero__cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.co-cta { font-size: 1.02rem; }
.co-desc { max-width: 72ch; margin-bottom: 30px; }
.co-outline { max-width: 72ch; }
.co-sec { border: 2px solid #1a1a1a; border-radius: 12px; margin-bottom: 10px; background: #fff; }
.co-sec summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.co-sec summary::-webkit-details-marker { display: none; }
.co-sec__n { color: #6b6357; font-weight: 400; font-size: .85rem; }
.co-sec ul { margin: 0; padding: 2px 16px 12px; list-style: none; }
.co-sec li { padding: 6px 0; border-top: 1px dashed #d8cfba; }
.co-sec li:first-child { border-top: 0; }
.co-confirm { max-width: 60ch; margin: 40px auto; text-align: center; }
.co-confirm form { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

@media (max-width: 800px) {
  .co-hero { grid-template-columns: 1fr; }
}

/* ── Trang học (Focus Mode — tự chứa, không nạp styles.css) ── */
.player { margin: 0; background: #f5efd9; color: #1a1a1a; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; min-height: 100dvh; }
.player * { box-sizing: border-box; }
.player .btn { display: inline-block; padding: 10px 20px; border-radius: 999px; border: 2px solid #1a1a1a; font-weight: 700; text-decoration: none; cursor: pointer; font-size: .95rem; background: #fff; color: #1a1a1a; }
.player .btn-primary { background: #f47c30; color: #fff; border-color: #1a1a1a; }
.player .btn[disabled] { opacity: .5; cursor: default; }

.pl-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 100dvh; }
.pl-side { border-right: 2px solid #1a1a1a; background: #fbf6e8; padding: 18px 16px 40px; overflow-y: auto; position: sticky; top: 0; height: 100dvh; }
.pl-back { display: inline-block; color: #6b6357; text-decoration: none; font-size: .85rem; margin-bottom: 10px; }
.pl-back:hover { color: #1a1a1a; }
.pl-course { font-size: 1.02rem; margin: 0 0 12px; }
.pl-progress { margin-bottom: 16px; }
.pl-progress__track { height: 8px; background: #e4dbc2; border-radius: 4px; overflow: hidden; }
.pl-progress__fill { height: 100%; background: #f47c30; border-radius: 4px; transition: width .25s ease; }
.pl-progress__label { font-size: .78rem; color: #6b6357; }
.pl-sec { margin-bottom: 8px; }
.pl-sec summary { cursor: pointer; font-weight: 700; font-size: .88rem; padding: 6px 0; list-style: none; }
.pl-sec summary::-webkit-details-marker { display: none; }
.pl-lesson { display: flex; gap: 8px; align-items: baseline; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: #1a1a1a; font-size: .88rem; }
.pl-lesson:hover { background: #efe7cf; }
.pl-lesson.is-current { background: #1a1a1a; color: #fff; }
.pl-lesson.is-done { color: #6b6357; }
.pl-lesson--locked { display: flex; gap: 8px; padding: 7px 8px; color: #b0a890; font-size: .88rem; }
.pl-tick { flex: none; width: 1.1em; }

.pl-main { padding: 26px 34px 90px; max-width: 980px; }
.pl-title { margin: 0 0 16px; font-size: 1.5rem; }
.pl-video { position: relative; width: 100%; aspect-ratio: 16/9; border: 2px solid #1a1a1a; border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 20px; }
.pl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pl-body { max-width: 72ch; line-height: 1.65; }
.pl-body img { max-width: 100%; }
.pl-atts { margin-top: 22px; border: 2px solid #1a1a1a; border-radius: 12px; padding: 14px 16px; background: #fff; }
.pl-atts h3 { margin: 0 0 8px; font-size: .95rem; }
.pl-att { display: block; padding: 6px 0; text-decoration: none; color: #1a1a1a; border-top: 1px dashed #d8cfba; }
.pl-att:first-of-type { border-top: 0; }
.pl-att:hover { color: #f47c30; }
/* Khách chưa ghi danh mở bài xem thử: chỉ thấy khối khoá, không thấy tên tệp/link. */
.pl-atts--locked { border-style: dashed; background: #faf6ea; }
.pl-att-lock { margin: 0; color: #6b6357; font-size: .92rem; }

.pl-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); border-top: 2px solid #1a1a1a; }
.pl-bar--guest { justify-content: center; }
.pl-nav { color: #6b6357; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.pl-nav:hover { color: #1a1a1a; }

.pl-toc-toggle { display: none; }
.pl-backdrop { display: none; }

@media (max-width: 900px) {
  .pl-layout { grid-template-columns: 1fr; }
  .pl-side { position: fixed; inset: 0 25% 0 0; min-width: 290px; z-index: 40; transform: translateX(-102%); transition: transform .2s ease; height: 100dvh; }
  .pl-side.open { transform: none; box-shadow: 6px 0 24px rgba(0,0,0,.25); }
  .pl-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
  .pl-backdrop[hidden] { display: none; }
  .pl-toc-toggle { display: inline-flex; position: fixed; top: 10px; left: 10px; z-index: 20; padding: 8px 14px; border-radius: 999px; border: 2px solid #1a1a1a; background: #fff; font-weight: 700; cursor: pointer; }
  .pl-main { padding: 60px 18px 90px; }
  .pl-bar { position: sticky; bottom: 0; background: #f5efd9; }
}

