/* 개준모 클래스 (/lab/class) — 강의 목록 · 강의 소개 · 강의실. board.css 다음에 읽는다. */

/* ── 강의 목록 ── */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cl-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid #dde2ea; border-radius: 12px;
  overflow: hidden; color: #1f2933; text-decoration: none; transition: box-shadow .15s, transform .15s;
}
.cl-card:hover { color: #1f2933; box-shadow: 0 8px 24px rgba(15, 30, 60, .12); transform: translateY(-2px); }
.cl-cover { position: relative; aspect-ratio: 16 / 9; background: #0e1f47; }
.cl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-count {
  position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .72); color: #fff;
  font-size: 12.5px; font-weight: 500; padding: 3px 8px; border-radius: 6px;
}
.cl-body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.cl-body h2 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.3px; }
.cl-lecturer { margin: 0; font-size: 13.5px; color: #4a5562; font-weight: 500; }
.cl-sum { margin: 0; font-size: 13.5px; color: #6b7684; line-height: 1.55; }
.cl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cl-tags span { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: #f1f4f8; color: #4a5562; }
.cl-more { margin: 18px 0 0; font-size: 13px; color: #8a929e; }

/* ── 강의 소개 ── */
.cc-main { padding-top: 18px; }
.cc-panel {
  display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 26px; align-items: start;
  background: #fff; border: 1px solid #dde2ea; border-radius: 14px; padding: 22px; margin-bottom: 26px;
}
.cc-thumb { position: relative; display: block; border-radius: 10px; overflow: hidden; background: #0e1f47; aspect-ratio: 16 / 9; }
.cc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.cc-thumb:hover img { transform: scale(1.03); }
.cc-thumb-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  background: rgba(26, 110, 255, .92); color: #fff; display: grid; place-items: center; font-size: 34px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.cc-thumb-play .bi { margin-left: 4px; line-height: 1; }
.cc-thumb-t { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12.5px; padding: 3px 8px; border-radius: 6px; }
.cc-info h1 { font-size: 24px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.4px; }
.cc-meta { margin: 0 0 14px; font-size: 14px; color: #4a5562; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cc-meta .acc { font-size: 12px; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-play {
  display: inline-flex; align-items: center; gap: 6px; background: #1a6eff; color: #fff; border: 0;
  border-radius: 9px; padding: 11px 20px; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.cc-play:hover { background: #0f5ae0; color: #fff; }
.cc-play .bi { font-size: 18px; margin-left: -4px; }
.cc-login {
  display: inline-flex; align-items: center; background: #fff; color: #1f2933; border: 1px solid #cdd4dc;
  border-radius: 9px; padding: 10px 16px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.cc-login:hover { border-color: #1a6eff; color: #1a6eff; }
.cc-hint { margin: 10px 0 0; font-size: 13px; color: #6b7684; }
.cc-hint .bi { color: #9aa2ae; }
.cc-lessons { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid #eef0f3; }
.cc-lessons a {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; column-gap: 8px;
  padding: 11px 4px; border-bottom: 1px solid #eef0f3; color: #1f2933; text-decoration: none; font-size: 14.5px;
}
.cc-lessons a:hover { background: #f6f8fb; }
.cc-lessons a:hover .cc-t { color: #1a6eff; }
.cc-no { font-weight: 700; color: #1a6eff; font-size: 13.5px; }
.cc-d { font-size: 13px; color: #8a929e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-done { color: #12805c; margin-right: 4px; }
.cc-bar { grid-column: 2 / 4; height: 3px; background: #e9edf3; border-radius: 2px; margin-top: 6px; overflow: hidden; }
.cc-bar i { display: block; height: 100%; background: #e53935; }

/* 상세페이지(.cdp) 안쪽 — Bootstrap 기본값이 새어 들어오는 곳만 되돌림 */
.cdp .lead { font-weight: inherit; }
.cdp mark { background-color: transparent; }
.cdp dl, .cdp ol, .cdp ul { margin-bottom: 0; }
.cdp dd { margin-bottom: 0; }

.cc-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: rgba(255, 255, 255, .97);
  border-top: 1px solid #dde2ea; box-shadow: 0 -4px 16px rgba(15, 30, 60, .08);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%); transition: transform .2s ease;
}
.cc-sticky.on { transform: none; }
.cc-sticky .container-xl { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-sticky-t { font-weight: 700; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-sticky .cc-play { flex-shrink: 0; padding: 9px 16px; font-size: 14px; }

/* ── 강의실 ── */
.cw-main { padding: 16px 0 28px; }
.cw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.cw-stage { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.cw-stage .plyr { height: 100%; --plyr-color-main: #1a6eff; --plyr-video-control-color-hover: #fff;
  --plyr-tooltip-background: rgba(20, 24, 31, .92); --plyr-tooltip-color: #fff; touch-action: manipulation; }
.cw-stage video { width: 100%; height: 100%; display: block; }
.cw-info { padding: 14px 2px 0; }
.cw-course { font-size: 13.5px; color: #1a6eff; text-decoration: none; font-weight: 500; }
.cw-course .bi { font-size: 11px; }
.cw-info h1 { font-size: 21px; font-weight: 700; margin: 4px 0 4px; letter-spacing: -0.3px; }
.cw-meta { margin: 0; font-size: 13.5px; color: #6b7684; }
.cw-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.cw-nav a {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border: 1px solid #dde2ea; border-radius: 8px;
  background: #fff; color: #1f2933; font-size: 14px; text-decoration: none;
}
.cw-nav a.next { background: #1a6eff; border-color: #1a6eff; color: #fff; font-weight: 700; }
.cw-nav a:hover { border-color: #1a6eff; }
.cw-keys { margin-top: 14px; font-size: 13px; color: #4a5562; }
.cw-keys summary { cursor: pointer; color: #6b7684; width: max-content; }
.cw-keys ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }

.cw-side { background: #fff; border: 1px solid #dde2ea; border-radius: 12px; overflow: hidden; position: sticky; top: 12px; }
.cw-side-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 10px; border-bottom: 1px solid #eef0f3; }
.cw-side-head b { font-size: 15px; }
.cw-side-head span { font-size: 12.5px; color: #8a929e; }
.cw-list { list-style: none; margin: 0; padding: 0; }
.cw-list a {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 8px; align-items: start;
  padding: 12px 16px; border-bottom: 1px solid #f1f3f6; color: #1f2933; text-decoration: none; font-size: 14px; line-height: 1.45;
}
.cw-list a:hover { background: #f6f8fb; }
.cw-list li.now a { background: #eef4ff; }
.cw-list li.now .cw-lt { color: #0b57d0; font-weight: 500; }
.cw-ico { color: #b8c0cc; font-size: 15px; line-height: 1.3; }
.cw-list li.now .cw-ico { color: #1a6eff; }
.cw-list li.done .cw-ico, .cw-list li.done:not(.now) .cw-ico { color: #12805c; }
.cw-lt b { font-weight: 700; margin-right: 2px; }
.cw-ld { font-size: 12.5px; color: #8a929e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cw-list .cc-bar { grid-column: 2 / 4; }
.cw-intro { display: block; padding: 12px 16px; font-size: 13.5px; color: #4a5562; text-decoration: none; }
.cw-intro:hover { color: #1a6eff; }

/* 잠금 */
.cw-lock { position: absolute; inset: 0; background-size: cover; background-position: center; display: grid; place-items: center; }
.cw-lock::before { content: ""; position: absolute; inset: 0; background: rgba(8, 14, 30, .72); backdrop-filter: blur(3px); }
.cw-lock-card { position: relative; text-align: center; color: #fff; padding: 16px; }
.cw-lock-card > .bi { font-size: 30px; display: block; margin-bottom: 8px; }
.cw-lock-t { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.cw-lock-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cw-lock-btns .cc-login { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .4); }

/* 플레이어 위 덧붙임: 토스트 · 두 번 톡 표시 · 가운데 버튼 · 다음 강의 · 오류 */
.cw-toast {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%) translateY(-8px); z-index: 5;
  background: rgba(20, 24, 31, .88); color: #fff; font-size: 13.5px; padding: 7px 12px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
}
.cw-toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.cw-toast-act { border: 0; background: none; color: #8fb6ff; font-weight: 700; font-size: 13.5px; padding: 0; }

.cw-ripple {
  position: absolute; top: 0; bottom: 0; width: 38%; z-index: 2; pointer-events: none; opacity: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff;
  font-size: 13px; font-weight: 700;
}
.cw-ripple.left { left: 0; background: radial-gradient(circle at 0% 50%, rgba(255, 255, 255, .22) 0 62%, transparent 63%); }
.cw-ripple.right { right: 0; background: radial-gradient(circle at 100% 50%, rgba(255, 255, 255, .22) 0 62%, transparent 63%); }
.cw-ripple svg { width: 34px; height: 34px; }
.cw-ripple.show { animation: cwRipple .65s ease-out; }
@keyframes cwRipple { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

.cw-center {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 2;
  display: flex; justify-content: center; align-items: center; gap: 12%; pointer-events: none;
  transition: opacity .25s;
}
.plyr--hide-controls .cw-center { opacity: 0; }
.plyr--hide-controls .cw-center .cw-cbtn { pointer-events: none; }
/* Plyr 의 `.plyr button { font: inherit; width: auto }` 를 이기도록 .plyr 를 앞에 붙인다 */
.plyr .cw-cbtn {
  pointer-events: auto; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff;
  width: 52px; height: 52px; display: grid; place-items: center; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.plyr .cw-cbtn svg { width: 30px; height: 30px; }
.plyr .cw-cplay { width: 64px; height: 64px; font-size: 40px; background: rgba(0, 0, 0, .55); }
.cw-cplay .bi { line-height: 1; }
.cw-cbtn svg path, .cw-ripple svg path { fill: currentColor; }
.cw-cbtn svg text, .cw-ripple svg text { fill: currentColor; font: 700 6.5px sans-serif; }
.cw-touch .plyr__control--overlaid { display: none !important; }

.cw-next {
  position: absolute; inset: 0; z-index: 6; background: rgba(8, 14, 30, .82); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px;
}
.cw-next-k { margin: 0; font-size: 13px; color: #9fb2da; }
.cw-next-t { margin: 4px 0 14px; font-size: 18px; font-weight: 700; }
.cw-next-b { display: flex; gap: 8px; }
.cw-next-b button, .cw-next-b a {
  border-radius: 8px; padding: 9px 16px; font-size: 14px; text-decoration: none; border: 1px solid rgba(255, 255, 255, .4);
  background: transparent; color: #fff;
}
.cw-next-b a { background: #1a6eff; border-color: #1a6eff; font-weight: 700; }
.cw-fail {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7; max-width: 86%;
  background: rgba(20, 24, 31, .92); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; text-align: center;
}

/* ── 태블릿 이하 ── */
@media (max-width: 991.98px) {
  .cw-grid { grid-template-columns: minmax(0, 1fr); }
  .cw-side { position: static; }
  .cc-panel { grid-template-columns: minmax(0, 1fr); }
  .cc-thumb { max-width: 560px; }
}

/* ── 휴대폰: 영상은 화면 폭 꽉, 스크롤해도 위에 붙어 있게 ── */
@media (max-width: 767.98px) {
  .cw-main { padding-top: 0; }
  .cw-main > .container-xl { padding-left: 0; padding-right: 0; }
  .cw-stage { border-radius: 0; position: sticky; top: 0; z-index: 20; }
  .cw-info, .cw-side { margin-left: 12px; margin-right: 12px; }
  .cw-info h1 { font-size: 18px; }
  .cc-panel { padding: 14px; gap: 14px; border-radius: 12px; }
  .cc-info h1 { font-size: 20px; }
  .cc-play { padding: 11px 18px; }
  .cw-next-t { font-size: 15px; }
}
