/* ==========================================================================
   Theme isolation — forces our page output to behave as ONE full-width block
   no matter what layout system (flex/grid/float) the active theme's content
   wrapper uses. Without this, some themes lay two top-level siblings out as
   side-by-side columns instead of stacking them.
   ========================================================================== */
.cl-lms-root {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	flex: 1 1 100% !important;
	grid-column: 1 / -1 !important;
	float: none !important;
	clear: both !important;
	position: relative !important;
	box-sizing: border-box;
}
.cl-lms-root * { box-sizing: border-box; }
.cl-lms-root {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: #1a1a2e;
}

/* ==========================================================================
   Shrinks the theme's own site header (logo + site name banner) — this was
   taking up a large amount of vertical space above every page. These
   selectors target Astra's common header markup; if your theme changes or
   this doesn't fully match, the header padding/logo size are the values to
   adjust here.
   ========================================================================== */
.site-header, #masthead, .ast-primary-header-bar { padding-top: 8px !important; padding-bottom: 8px !important; min-height: 0 !important; }
.site-header img.custom-logo, .ast-site-identity img, .custom-logo-link img { max-height: 40px !important; width: auto !important; }
.site-header .site-title, .ast-site-identity .site-title { font-size: 18px !important; margin: 0 !important; }
.site-header .site-description, .ast-site-identity .site-description { display: none !important; }
.ast-site-identity { padding: 6px 0 !important; }

/* ---------- Layout helpers ---------- */
.cl-page-wrap { max-width: 920px; margin: 0 auto; padding: 32px 20px 70px; }
.cl-page-title { margin-bottom: 24px; font-size: 30px; font-weight: 800; }

/* ---------- Account bar ---------- */
.cl-account-bar {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	padding: 14px 28px;
	background: #14152b;
	color: #fff;
	width: 100%;
	flex-wrap: wrap;
	gap: 10px;
}
.cl-account-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cl-account-brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 16px; letter-spacing: 0.2px; margin-right: 18px; }
.cl-account-nav-link { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 14px; font-weight: 500; margin-right: 10px; }
.cl-account-nav-link:hover { color: #fff; text-decoration: underline; }
.cl-account-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-account-hi { font-size: 14px; opacity: 0.85; margin-right: 4px; }
.cl-account-profile { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; padding: 4px 8px; border-radius: 20px; transition: background 0.15s ease; }
.cl-account-profile:hover { background: rgba(255,255,255,0.1); }
.cl-account-profile img { border-radius: 50%; display: block; }

/* ---------- Buttons ---------- */
.cl-btn {
	display: inline-block; padding: 11px 20px; border-radius: 8px; border: 1.5px solid #1a1a2e;
	background: #fff; color: #1a1a2e; text-decoration: none; cursor: pointer; font-size: 14px;
	font-weight: 600; text-align: center; transition: all 0.15s ease;
}
.cl-btn:hover { background: #f2f3f7; transform: translateY(-1px); }
.cl-btn-primary { background: #2b5fd9; border-color: #2b5fd9; color: #fff; box-shadow: 0 2px 8px rgba(43,95,217,0.25); }
.cl-btn-primary:hover { background: #1f49b0; border-color: #1f49b0; }
.cl-btn-block { display: block; width: 100%; margin-top: 8px; }
.cl-btn-lg { padding: 14px 24px; font-size: 15.5px; }
.cl-btn-sm { padding: 7px 14px; font-size: 13px; border-color: rgba(255,255,255,0.35); background: transparent; color: #fff; }
.cl-btn-sm:hover { background: rgba(255,255,255,0.12); }
.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 18px; font-size: 14px; font-weight: 600; }

/* ---------- Courses grid ---------- */
.cl-courses-page { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.cl-filter-bar { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.cl-filter-bar input[type="text"] { flex: 1; min-width: 220px; padding: 11px 16px; border: 1.5px solid #e1e3ea; border-radius: 8px; font-size: 14px; }
.cl-filter-bar select { padding: 11px 16px; border: 1.5px solid #e1e3ea; border-radius: 8px; font-size: 14px; }
.cl-filter-bar input:focus, .cl-filter-bar select:focus { outline: none; border-color: #2b5fd9; }

.cl-courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 26px; }
.cl-course-card {
	border: 1px solid #eaebf0; border-radius: 14px; overflow: hidden; background: #fff;
	display: flex; flex-direction: column; transition: box-shadow 0.2s ease, transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(20,21,43,0.06);
}
.cl-course-card:hover { box-shadow: 0 12px 28px rgba(20,21,43,0.12); transform: translateY(-3px); }
.cl-course-thumb-link { display: block; position: relative; }
.cl-course-thumb { width: 100%; height: 168px; object-fit: cover; display: block; }
.cl-course-thumb-placeholder { background: linear-gradient(135deg, #2b5fd9, #7c9cf0); height: 168px; }
.cl-course-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cl-course-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.cl-course-cat-badge {
	display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
	color: #2b5fd9; background: #eaf0ff; padding: 3px 9px; border-radius: 20px;
}
.cl-course-card-body h3 { margin: 0; font-size: 17.5px; font-weight: 700; line-height: 1.35; }
.cl-course-card-body h3 a { color: #14152b; text-decoration: none; }
.cl-course-card-body h3 a:hover { color: #2b5fd9; }
.cl-course-excerpt { color: #666a77; font-size: 13.5px; line-height: 1.5; flex: 1; }
.cl-course-lesson-count { font-size: 12.5px; color: #8a8d99; display: flex; align-items: center; gap: 5px; }

.cl-course-price { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.cl-price-orig { text-decoration: line-through; color: #9a9da8; font-size: 13.5px; }
.cl-price-now { font-size: 21px; font-weight: 800; color: #14152b; }

/* ---------- Single course: overview ---------- */
.cl-page-wrap-wide { max-width: 1180px; }
.cl-course-heading { font-size: 34px; font-weight: 800; line-height: 1.2; margin: 0 0 24px; letter-spacing: -0.3px; }

.cl-overview-grid { display: flex; gap: 40px; align-items: flex-start; }
.cl-overview-main { flex: 1; min-width: 0; }
.cl-overview-sidebar { width: 340px; flex-shrink: 0; position: sticky; top: 20px; }

.cl-single-thumb { width: 100%; max-height: 400px; overflow: hidden; border-radius: 14px; margin-bottom: 24px; }
.cl-single-thumb img { width: 100%; height: 100%; max-height: 400px; object-fit: cover; display: block; }
.cl-single-description { font-size: 15.5px; line-height: 1.75; color: #333644; margin-bottom: 26px; }

.cl-buy-box { border: 1px solid #eaebf0; border-radius: 14px; padding: 26px; background: #fafbfd; box-shadow: 0 2px 10px rgba(20,21,43,0.07); }
.cl-enrolled-note { font-weight: 700; margin-bottom: 14px; font-size: 15px; }
.cl-coupon-row { display: flex; gap: 8px; margin: 14px 0 4px; }
.cl-coupon-row input[type="text"] { flex: 1; min-width: 0; padding: 11px 14px; border: 1.5px solid #e1e3ea; border-radius: 8px; font-size: 14px; }
#cl-coupon-msg { margin: 6px 0 4px; font-size: 13px; min-height: 16px; }
.cl-buy-box .cl-btn { margin-top: 12px; }
.cl-buy-box .cl-btn:first-of-type { margin-top: 16px; }

.cl-syllabus-list { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 10px; }
.cl-syllabus-item { display: flex; align-items: center; gap: 12px; border: 1px solid #eaebf0; border-radius: 10px; padding: 14px 18px; cursor: pointer; transition: all 0.15s ease; }
.cl-syllabus-item:hover { background: #f7f9ff; border-color: #c8d6f8; transform: translateX(2px); }
.cl-lesson-icon { width: 20px; text-align: center; flex-shrink: 0; }
.cl-lesson-title { flex: 1; font-size: 14.5px; font-weight: 500; }
.cl-badge { background: #e8f5e9; color: #2e7d32; font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 700; }

@media (max-width: 860px) {
	.cl-overview-grid { flex-direction: column; }
	.cl-overview-sidebar { width: 100%; position: static; }
}

/* ---------- Course player ---------- */
#cl-course-player.cl-page-wrap { max-width: 1280px; }
.cl-player-layout { display: flex; gap: 28px; align-items: flex-start; }
.cl-player-sidebar {
	width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px;
	border: 1px solid #eaebf0; border-radius: 14px; padding: 12px; position: sticky; top: 20px;
}
.cl-player-nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; transition: background 0.15s ease; }
.cl-player-nav-item:hover { background: #f2f4fb; }
.cl-player-nav-item.cl-active { background: #e8edfc; font-weight: 700; color: #2b5fd9; }
.cl-player-stage { flex: 1; min-width: 0; }
.cl-stage-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.cl-locked-prompt { text-align: center; padding: 90px 20px; border: 1.5px dashed #d8dae2; border-radius: 14px; background: #fafbfd; }
.cl-locked-prompt p { font-size: 17px; margin-bottom: 18px; color: #4a4d5a; font-weight: 500; }

/* ---------- Custom video player ---------- */
.cl-video-slot { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 380px; background: #000; border-radius: 12px; overflow: hidden; }
#cl-video-container { position: relative; width: 100%; height: 100%; background: #000; border-radius: 12px; overflow: hidden; }
/* YouTube prints its own title/share overlay near the top edge and, on some
   channels, a persistent custom watermark near the bottom-right — neither can
   be turned off via any embed parameter. Slightly oversizing the player and
   clipping the overflow crops those edge regions out of view. Kept small (4%)
   so it trims only the outer sliver, not visible video content. Note: a
   channel watermark baked into the *video itself* by its owner (via YouTube
   Studio) cannot be removed this way — only the platform's own hover chrome
   can be. !important guards against theme/cache CSS conflicts overriding this. */
#cl-yt-player { position: absolute !important; top: -4% !important; left: -4% !important; width: 108% !important; height: 108% !important; }
#cl-yt-player iframe { width: 100% !important; height: 100% !important; pointer-events: none !important; }
.cl-video-click-catcher { position: absolute; inset: 0; z-index: 1; cursor: pointer; background: transparent; }
.cl-video-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); }
.cl-vc-btn { background: none; border: none; color: #fff; font-size: 17px; cursor: pointer; padding: 4px 2px; line-height: 1; flex-shrink: 0; }
#cl-vc-time { color: #fff; font-size: 12.5px; white-space: nowrap; flex-shrink: 0; }

/* Custom-styled range sliders (seek + volume) — browsers give range inputs a
   large default thumb that, without explicit sizing, can visually collide
   with neighbouring icons. This forces a small, consistent thumb in every
   browser instead. The seek bar is the dominant, wide control; volume is
   deliberately short and grouped near the end so the two are never mistaken
   for "two progress bars". */
.cl-vc-seek, .cl-vc-volume {
	-webkit-appearance: none;
	appearance: none;
	height: 4px;
	border-radius: 2px;
	background: rgba(255,255,255,0.3);
	outline: none;
	cursor: pointer;
	flex-shrink: 0;
}
.cl-vc-seek { flex: 1 1 auto !important; min-width: 60px; margin: 0 4px; }
.cl-vc-volume { width: 50px !important; flex: 0 0 50px !important; }
.cl-vc-seek::-webkit-slider-thumb, .cl-vc-volume::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px; height: 12px; border-radius: 50%;
	background: #fff; cursor: pointer; border: none;
	box-shadow: 0 0 0 3px rgba(43,95,217,0.35);
}
.cl-vc-seek::-moz-range-thumb, .cl-vc-volume::-moz-range-thumb {
	width: 12px; height: 12px; border-radius: 50%;
	background: #fff; cursor: pointer; border: none;
	box-shadow: 0 0 0 3px rgba(43,95,217,0.35);
}
.cl-vc-seek::-webkit-slider-runnable-track, .cl-vc-volume::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; }
.cl-vc-seek::-moz-range-track, .cl-vc-volume::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); }

.cl-vc-speed { background: rgba(255,255,255,0.15); color: #fff; border: none; border-radius: 5px; font-size: 12.5px; padding: 5px 4px; flex-shrink: 0; }

@media (max-width: 480px) {
	.cl-video-controls { gap: 8px; padding: 8px 10px; }
	.cl-vc-volume { width: 44px !important; flex: 0 0 44px !important; }
	#cl-vc-time { font-size: 11px; }
}

/* ---------- Auth pages (login / register / forgot password) ---------- */
.cl-auth-wrap { max-width: 480px; }
.cl-auth-heading { font-size: 28px; font-weight: 800; margin: 0 0 22px; }
.cl-auth-error { background: #fdecea; color: #b32d2e; padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.cl-auth-notice { background: #e8f5e9; color: #2e7d32; padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.cl-auth-form { display: flex; flex-direction: column; gap: 16px; }
.cl-auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: #333644; flex: 1; }
.cl-auth-form input, .cl-auth-form select {
	padding: 11px 14px; border: 1.5px solid #e1e3ea; border-radius: 8px; font-size: 14.5px;
	font-weight: 400; font-family: inherit; color: #14152b;
}
.cl-auth-form input:focus, .cl-auth-form select:focus { outline: none; border-color: #2b5fd9; }
.cl-auth-form input:disabled { background: #f2f3f7; color: #8a8d99; }
.cl-password-wrap { position: relative; display: block; }
.cl-password-wrap input { width: 100%; padding-right: 42px; }
.cl-toggle-password {
	position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
	background: none; border: none; cursor: pointer; font-size: 16px;
	padding: 6px 8px; line-height: 1; opacity: 0.6;
}
.cl-toggle-password:hover { opacity: 1; }
.cl-form-row { display: flex; gap: 14px; }
.cl-form-row label { min-width: 0; }
.cl-auth-switch { margin-top: 18px; font-size: 14px; color: #555; }
.cl-auth-switch a { color: #2b5fd9; font-weight: 600; text-decoration: none; }
.cl-auth-switch a:hover { text-decoration: underline; }

@media (max-width: 560px) {
	.cl-form-row { flex-direction: column; }
}

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

/* ---------- Exam / quizzes ---------- */
.cl-exam-q { margin-bottom: 22px; }
.cl-exam-opt { display: block; padding: 5px 0; cursor: pointer; font-size: 14.5px; }
.cl-exam-locked { color: #888; font-style: italic; }
.cl-exam-passed { background: #e8f5e9; border-radius: 12px; padding: 20px; }
.cl-cert-checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-cert-checklist li { font-size: 14.5px; padding: 6px 0; border-bottom: 1px solid #f0f0f2; }
.cl-quiz-hint { font-size: 12.5px; color: #8a8d99; margin: -4px 0 8px; font-style: italic; }
.cl-lesson-quiz-wrap { margin-top: 24px; padding-top: 20px; border-top: 1px solid #eaebf0; }

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

/* ---------- Affiliate dashboard ---------- */
.cl-affiliate-link-box { border: 1px solid #eaebf0; border-radius: 12px; padding: 20px; background: #fafbfd; margin: 20px 0 28px; }
.cl-affiliate-link-box label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.cl-affiliate-link-row { display: flex; gap: 8px; }
.cl-affiliate-link-row input { flex: 1; padding: 10px 14px; border: 1.5px solid #e1e3ea; border-radius: 8px; font-size: 14px; background: #fff; }
.cl-affiliate-stats { display: flex; flex-wrap: wrap; margin: 0 -7px 32px; }
.cl-stat-card { border: 1px solid #eaebf0; border-radius: 12px; padding: 18px; text-align: center; background: #fff; flex: 1 1 140px; margin: 0 7px 14px; min-width: 140px; }
.cl-stat-value { display: block; font-size: 24px; font-weight: 800; color: #14152b; margin-bottom: 4px; }
.cl-stat-label { display: block; font-size: 12.5px; color: #8a8d99; }
.cl-affiliate-history { width: 100%; border-collapse: collapse; margin-top: 12px; }
.cl-affiliate-history th, .cl-affiliate-history td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #f0f0f2; font-size: 14px; }
.cl-affiliate-history th { color: #8a8d99; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.cl-player-layout { flex-direction: column; }
	.cl-player-sidebar { width: 100%; flex-direction: row; overflow-x: auto; position: static; }
	.cl-player-nav-item { white-space: nowrap; }
	.cl-video-slot { min-height: 220px; }
}
@media (max-width: 600px) {
	.cl-account-bar { padding: 12px 16px; }
	.cl-account-hi { display: none; }
	.cl-course-heading { font-size: 26px; }
}
