/**
 * Shatabhisha Course Hub — Front-end styles (Part 6).
 *
 * All --sch-* custom properties are now defined once, globally, in
 * assets/css/variables.css (Part 10's Design System defaults) with the
 * admin's overrides injected right after it. This file only *consumes*
 * those variables. Includes tablet (≤ 1024px) and mobile (≤ 600px)
 * breakpoints so every row/column/block stacks cleanly on smaller screens.
 */

.sch-course-page {
	font-family: var(--sch-font);
	color: var(--sch-text);
	max-width: 1140px;
	margin: 0 auto;
	padding: 24px 20px 60px;
	box-sizing: border-box;
}

/* Part 35: editor-only empty-block placeholder — only ever rendered
   inside Elementor's own editor (SCH_Elementor_Context::is_editor_context()),
   never on a real front-end page view. */
.sch-elementor-empty-placeholder {
	padding: 14px 16px;
	background: repeating-linear-gradient(
		45deg,
		rgba(0, 0, 0, 0.03),
		rgba(0, 0, 0, 0.03) 10px,
		rgba(0, 0, 0, 0.06) 10px,
		rgba(0, 0, 0, 0.06) 20px
	);
	border: 1px dashed #b5b5b5;
	border-radius: 4px;
	color: #6b6b6b;
	font-size: 13px;
	font-style: italic;
	line-height: 1.5;
}

.sch-course-page * {
	box-sizing: border-box;
}

.sch-empty-template {
	background: #fff8e5;
	border: 1px solid #f0c36d;
	border-radius: var(--sch-radius);
	padding: 16px 20px;
}

/* Template Builder live preview banner (Part 19) — only ever shown to the
   logged-in admin currently previewing unsaved template changes. */
.sch-preview-banner {
	position: sticky;
	top: 0;
	z-index: 9999;
	background: #1d2327;
	color: #fff;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 16px;
}

/* Rows & Columns */
.sch-row {
	display: flex;
	gap: 32px;
	margin-bottom: 32px;
	align-items: flex-start;
}

.sch-col {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Blocks */
.sch-block {
	margin: 0;
}

.sch-course-image img {
	width: 100%;
	height: auto;
	border-radius: var(--sch-radius);
	box-shadow: var(--sch-shadow);
	display: block;
}

/* Part 29: optional hover-zoom effect on the Elementor Course Image widget. */
.sch-image-hover-zoom {
	overflow: hidden;
}

.sch-image-hover-zoom img {
	transition: transform 0.35s ease;
}

.sch-image-hover-zoom:hover img {
	transform: scale(var(--sch-hover-zoom-scale, 1.08));
}

/* Part 29: optional click-to-enlarge lightbox on the Elementor Course Image widget. */
a.sch-lightbox-trigger {
	display: inline-block;
	cursor: zoom-in;
}

.sch-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	z-index: 100000;
	cursor: zoom-out;
}

.sch-lightbox-overlay img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sch-lightbox-overlay .sch-lightbox-close {
	position: absolute;
	top: 20px;
	right: 30px;
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	background: none;
	border: none;
	padding: 8px;
}

.sch-course-title {
	font-size: var(--sch-h1);
	line-height: 1.25;
	font-weight: 700;
	margin: 0;
}

.sch-short-description {
	font-size: var(--sch-body);
	color: var(--sch-text-muted);
	line-height: 1.6;
}

.sch-full-description {
	font-size: var(--sch-body);
	line-height: 1.8;
	color: var(--sch-text);
}

.sch-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sch-badge {
	display: inline-block;
	background: var(--sch-bg-soft);
	color: var(--sch-primary-dark);
	border: 1px solid var(--sch-border);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: var(--sch-badge);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.sch-price-block {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

.sch-price-original {
	text-decoration: line-through;
	color: var(--sch-text-muted);
	font-size: 16px;
}

.sch-price-current {
	font-size: var(--sch-price);
	font-weight: 800;
	color: var(--sch-text);
}

.sch-offer-text {
	background: #fdecea;
	color: #c0341d;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 6px;
	text-transform: uppercase;
}

.sch-enroll-btn {
	display: inline-block;
	background: var(--sch-primary);
	color: #fff;
	font-size: var(--sch-button);
	font-weight: 700;
	text-decoration: none;
	padding: var(--sch-button-padding);
	border-radius: var(--sch-button-radius);
	text-align: center;
	transition: background-color 0.15s ease, transform 0.1s ease;
}

.sch-enroll-btn:hover,
.sch-enroll-btn:focus {
	background: var(--sch-primary-dark);
	color: #fff;
	transform: translateY(-1px);
}

/* Consent Checkbox gating (Part 22) — .is-disabled/.is-consent-active are
   toggled by frontend.js; --sch-consent-*-color custom properties are
   emitted by SCH_Analytics::output_consent_color_vars() only when the
   feature is on (disabled color always; active color only if configured). */

.sch-enroll-btn.is-disabled {
	background: var(--sch-consent-disabled-color, #9ca3af) !important;
	opacity: 0.7;
	cursor: not-allowed;
	pointer-events: none;
	transform: none !important;
}

.sch-enroll-btn.is-consent-active {
	background: var(--sch-consent-active-color);
}

.sch-consent-checkbox {
	margin: 12px 0;
	font-size: 14px;
	line-height: 1.5;
}

.sch-consent-checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
}

.sch-consent-checkbox input[type='checkbox'] {
	margin-top: 3px;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.sch-consent-checkbox a {
	color: var(--sch-primary);
	text-decoration: underline;
}

.sch-meta-line {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: var(--sch-text-muted);
}

.sch-meta-line .dashicons {
	color: var(--sch-primary);
}

.sch-meta-label {
	font-weight: 600;
	color: var(--sch-text);
}

/* Countdown */
.sch-countdown {
	display: flex;
	gap: 12px;
}

.sch-countdown-unit {
	background: var(--sch-bg-soft);
	border-radius: var(--sch-radius);
	padding: 10px 16px;
	text-align: center;
	min-width: 64px;
}

.sch-countdown-unit span {
	display: block;
	font-size: 22px;
	font-weight: 800;
	color: var(--sch-primary-dark);
}

.sch-countdown-unit label {
	display: block;
	font-size: 11px;
	color: var(--sch-text-muted);
	text-transform: uppercase;
}

/* Highlights */
.sch-highlights {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px 20px;
}

.sch-highlights li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: var(--sch-body);
}

.sch-highlights .dashicons {
	color: #2e9d5f;
	flex: none;
}

/* Who Should Join / Prerequisites (Part 17) — share Highlights' list layout */
.sch-who-should-join h2,
.sch-prerequisites h2 {
	font-size: var(--sch-h3);
	margin: 0 0 14px;
}

.sch-who-should-join ul,
.sch-prerequisites ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px 20px;
}

.sch-who-should-join li,
.sch-prerequisites li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: var(--sch-body);
}

.sch-who-should-join .dashicons {
	color: var(--sch-primary);
	flex: none;
}

.sch-prerequisites .dashicons {
	color: var(--sch-text-muted);
	flex: none;
}

/* Information Boxes */
.sch-info-boxes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.sch-info-box {
	background: var(--sch-card-bg);
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	padding: 20px;
	box-shadow: var(--sch-shadow);
}

.sch-info-box .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: var(--sch-primary);
	margin-bottom: 10px;
}

.sch-info-box h3 {
	font-size: var(--sch-h4);
	margin: 0 0 6px;
}

.sch-info-box p {
	font-size: 13px;
	color: var(--sch-text-muted);
	margin: 0;
}

/* Curriculum */
.sch-curriculum-section,
.sch-faq-item {
	background: var(--sch-card-bg);
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	padding: 14px 18px;
	margin-bottom: 10px;
}

.sch-curriculum-section summary,
.sch-faq-item summary {
	cursor: pointer;
	font-weight: 700;
	font-size: var(--sch-faq);
	list-style: none;
}

.sch-curriculum-section summary::-webkit-details-marker,
.sch-faq-item summary::-webkit-details-marker {
	display: none;
}

.sch-curriculum-section summary::before,
.sch-faq-item summary::before {
	content: "+";
	display: inline-block;
	width: 18px;
	color: var(--sch-primary);
	font-weight: 800;
}

.sch-curriculum-section[open] summary::before,
.sch-faq-item[open] summary::before {
	content: "−";
}

.sch-curriculum-section ul {
	margin: 10px 0 0 26px;
	padding: 0;
}

.sch-faq-answer {
	margin-top: 10px;
	color: var(--sch-text-muted);
	line-height: 1.7;
}

/* Instructor */
.sch-instructor {
	background: var(--sch-bg-soft);
	border-radius: var(--sch-radius);
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sch-instructor-label {
	font-size: 12px;
	text-transform: uppercase;
	color: var(--sch-text-muted);
	letter-spacing: 0.04em;
}

.sch-instructor-name {
	font-size: var(--sch-h4);
	font-weight: 700;
}

/* Related Courses — card grid itself is styled by assets/css/cards.css (shared with [course_grid]) */
.sch-related-courses h2 {
	font-size: var(--sch-h2);
	margin: 0 0 16px;
}

/* Review */
.sch-review {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.sch-review-stars .dashicons {
	color: #f0a800;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.sch-review-average {
	font-weight: 700;
}

.sch-review-count {
	color: var(--sch-text-muted);
}

/* Sticky CTA */
.sch-sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	background: #fff;
	border-top: 1px solid var(--sch-border);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	z-index: 9999;
	padding: 12px 20px;
}

.sch-sticky-cta-inner {
	max-width: 1140px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 16px;
}

.sch-sticky-cta-title {
	flex: 1;
	font-weight: 700;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sch-sticky-cta-price {
	font-weight: 800;
	color: var(--sch-primary-dark);
}

.sch-sticky-cta .sch-enroll-btn {
	padding: 10px 20px;
	font-size: 14px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1024px) {
	.sch-course-page {
		padding: 20px 16px 56px;
	}

	.sch-row {
		gap: 24px;
	}

	.sch-course-title {
		font-size: 28px;
	}
}

@media (max-width: 600px) {
	.sch-row {
		flex-direction: column;
		gap: 16px;
	}

	.sch-col {
		flex-basis: 100% !important;
		width: 100%;
	}

	.sch-course-title {
		font-size: 24px;
	}

	.sch-price-current {
		font-size: 24px;
	}

	.sch-enroll-btn {
		width: 100%;
	}

	.sch-countdown {
		justify-content: space-between;
	}

	.sch-countdown-unit {
		min-width: 0;
		flex: 1;
		padding: 8px 6px;
	}

	.sch-sticky-cta-inner {
		flex-wrap: wrap;
	}

	.sch-sticky-cta-title {
		flex-basis: 100%;
		white-space: normal;
	}
}
