/* ---------- Layout helpers ---------- */
.cl-page-wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px 60px; }
.cl-page-title { margin-bottom: 20px; }

/* ---------- Account bar ---------- */
.cl-account-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: #16182b; color: #fff; }
.cl-account-brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 16px; }
.cl-account-actions { display: flex; align-items: center; gap: 10px; }
.cl-account-hi { font-size: 14px; opacity: 0.85; margin-right: 4px; }

/* ---------- Buttons ---------- */
.cl-btn { display: inline-block; padding: 10px 18px; border-radius: 6px; border: 1px solid #1a1a2e; background: #fff; color: #1a1a2e; text-decoration: none; cursor: pointer; font-size: 14px; text-align: center; }
.cl-btn:hover { background: #f2f2f2; }
.cl-btn-primary { background: #2b5fd9; border-color: #2b5fd9; color: #fff; }
.cl-btn-primary:hover { background: #1f49b0; }
.cl-btn-block { display: block; width: 100%; margin-top: 8px; }
.cl-btn-lg { padding: 13px 22px; font-size: 15px; }
.cl-btn-sm { padding: 6px 12px; font-size: 13px; border-color: rgba(255,255,255,0.4); background: transparent; color: #fff; }
.cl-btn-sm:hover { background: rgba(255,255,255,0.1); }
.cl-btn-sm.cl-btn-primary { background: #2b5fd9; border-color: #2b5fd9; }
.cl-link-btn { background: none; border: none; color: #2b5fd9; cursor: pointer; padding: 0 0 16px; font-size: 14px; }

/* ---------- Courses grid ---------- */
.cl-courses-page { max-width: 1200px; margin: 0 auto; }
.cl-filter-bar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.cl-filter-bar input[type="text"] { flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid #d8d8d8; border-radius: 6px; }
.cl-filter-bar select { padding: 10px 14px; border: 1px solid #d8d8d8; border-radius: 6px; }

.cl-courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.cl-course-card { border: 1px solid #e6e6e6; border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.cl-course-thumb { width: 100%; height: 160px; object-fit: cover; display: block; }
.cl-course-thumb-placeholder { background: linear-gradient(135deg, #2b5fd9, #6f8fe8); }
.cl-course-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cl-course-card-body h3 { margin: 0; font-size: 17px; }
.cl-course-card-body h3 a { color: inherit; text-decoration: none; }
.cl-course-excerpt { color: #666; font-size: 13px; flex: 1; }

.cl-course-price { display: flex; align-items: baseline; gap: 8px; }
.cl-price-orig { text-decoration: line-through; color: #999; font-size: 14px; }
.cl-price-now { font-size: 20px; font-weight: 700; color: #1a1a2e; }

/* ---------- Single course: overview ---------- */
.cl-single-thumb { width: 100%; max-height: 380px; overflow: hidden; border-radius: 10px; margin-bottom: 20px; }
.cl-single-thumb img { width: 100%; height: 100%; max-height: 380px; object-fit: cover; display: block; }
.cl-course-heading { font-size: 32px; line-height: 1.25; margin: 0 0 14px; }
.cl-single-description { font-size: 15px; line-height: 1.7; color: #333; margin-bottom: 24px; }

.cl-buy-box { border: 1px solid #e6e6e6; border-radius: 10px; padding: 22px; margin: 24px 0; background: #fafafa; }
.cl-enrolled-note { font-weight: 600; margin-bottom: 12px; }
.cl-coupon-row { display: flex; gap: 8px; margin: 12px 0 4px; }
.cl-coupon-row input[type="text"] { flex: 1; padding: 10px; border: 1px solid #d8d8d8; border-radius: 6px; }
#cl-coupon-msg { margin: 6px 0 4px; font-size: 13px; min-height: 16px; }
.cl-action-row { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.cl-action-row .cl-btn { flex: 1; min-width: 160px; }

.cl-syllabus-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 10px; }
.cl-syllabus-item { display: flex; align-items: center; gap: 10px; border: 1px solid #e6e6e6; border-radius: 8px; padding: 12px 16px; cursor: pointer; }
.cl-syllabus-item:hover { background: #f7f9ff; border-color: #c8d6f8; }
.cl-lesson-icon { width: 20px; text-align: center; flex-shrink: 0; }
.cl-lesson-title { flex: 1; }
.cl-badge { background: #e8f5e9; color: #2e7d32; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }

/* ---------- Course player ---------- */
#cl-course-player.cl-page-wrap { max-width: 1100px; }
.cl-player-layout { display: flex; gap: 24px; align-items: flex-start; }
.cl-player-sidebar { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; border: 1px solid #e6e6e6; border-radius: 10px; padding: 10px; }
.cl-player-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.cl-player-nav-item:hover { background: #f2f4fb; }
.cl-player-nav-item.cl-active { background: #e8edfc; font-weight: 600; }
.cl-player-stage { flex: 1; min-width: 0; }
.cl-stage-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.cl-locked-prompt { text-align: center; padding: 60px 20px; border: 1px dashed #d8d8d8; border-radius: 10px; }
.cl-locked-prompt p { font-size: 16px; margin-bottom: 16px; color: #555; }

/* ---------- Custom video player ---------- */
.cl-video-slot { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
#cl-video-container { position: relative; width: 100%; height: 100%; background: #000; border-radius: 8px; overflow: hidden; }
#cl-yt-player { width: 100%; height: 100%; }
.cl-video-controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.75)); }
.cl-vc-btn { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; padding: 4px 6px; }
.cl-vc-seek { flex: 1; }
#cl-vc-time { color: #fff; font-size: 12px; white-space: nowrap; }
.cl-vc-volume { width: 70px; }
.cl-vc-speed { background: rgba(255,255,255,0.15); color: #fff; border: none; border-radius: 4px; font-size: 12px; padding: 3px; }

/* ---------- PDF modal ---------- */
.cl-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 100000; align-items: center; justify-content: center; }
.cl-modal-inner { background: #fff; width: 90%; max-width: 800px; max-height: 90vh; overflow-y: auto; border-radius: 8px; padding: 20px; position: relative; }
.cl-modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 20px; cursor: pointer; }
.cl-pdf-page { display: block; width: 100%; height: auto; margin-bottom: 10px; border: 1px solid #eee; user-select: none; }

/* ---------- Exam ---------- */
.cl-exam-q { margin-bottom: 20px; }
.cl-exam-opt { display: block; padding: 4px 0; cursor: pointer; }
.cl-exam-locked { color: #888; font-style: italic; }
.cl-exam-passed { background: #e8f5e9; border-radius: 8px; padding: 16px; }

/* ---------- Dashboard ---------- */
.cl-dashboard { max-width: 900px; margin: 0 auto; padding: 24px 16px; }
.cl-dashboard-list { display: flex; flex-direction: column; gap: 16px; }
.cl-dashboard-item { display: flex; gap: 16px; border: 1px solid #e6e6e6; border-radius: 8px; padding: 14px; align-items: center; }
.cl-dashboard-item img { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; }
.cl-dashboard-item-body { flex: 1; }
.cl-progress-bar { background: #eee; border-radius: 6px; height: 8px; overflow: hidden; margin: 6px 0 4px; }
.cl-progress-fill { background: #2b5fd9; height: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
	.cl-player-layout { flex-direction: column; }
	.cl-player-sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
	.cl-player-nav-item { white-space: nowrap; }
}
