/**
 * Vedanta Course Topics — front-end and shared block styles.
 * Selectors stay scoped to the plugin so the active theme is not changed.
 */

.wp-block-vedanta-course-topics.vedanta-course-topics,
.wp-block-vedanta-course-price.vedanta-course-price,
.wp-block-vedanta-course-stage.vedanta-course-stage {
	--vct-accent: #a6533c;
	--vct-accent-dark: #86402f;
	--vct-accent-soft: #c78a72;
	--vct-ink: #352b24;
	--vct-muted: #77675c;
	--vct-line: rgba( 166, 83, 60, 0.22 );
	--vct-paper: #f7f0e6;
	--vct-paper-light: #fffaf3;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	color: var( --vct-ink );
	font-family: inherit;
}

.wp-block-vedanta-course-topics.vedanta-course-topics {
	container-type: inline-size;
	position: relative;
	margin-block: clamp( 2rem, 4vw, 3.25rem );
	padding: clamp( 1.35rem, 3vw, 2.25rem );
	border: 1px solid var( --vct-line );
	border-radius: 3px;
	background: var( --vct-paper );
	box-shadow: 0 14px 42px rgba( 76, 52, 38, 0.05 );
}

.wp-block-vedanta-course-topics.vedanta-course-topics::before {
	position: absolute;
	top: -1px;
	left: clamp( 1.35rem, 3vw, 2.25rem );
	width: 4.5rem;
	height: 2px;
	background: var( --vct-accent );
	content: "";
}

.vedanta-course-topics .vedanta-course-topics__heading {
	margin: 0 0 clamp( 1.1rem, 2.4vw, 1.65rem );
	color: var( --vct-ink );
	font-family: inherit;
	font-size: clamp( 1.35rem, 2.3vw, 1.78rem );
	font-weight: 500;
	letter-spacing: -0.015em;
	line-height: 1.35;
}

/* Table-like three-column topic grid. */
.vedanta-course-topics .vedanta-course-topics__grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	width: 100%;
	min-width: 0;
	border-top: 1px solid var( --vct-line );
	border-left: 1px solid var( --vct-line );
	background: rgba( 255, 250, 243, 0.38 );
	counter-reset: vct-topic;
}

.vedanta-course-topics .vedanta-course-topic {
	display: grid;
	grid-template-columns: 2rem minmax( 0, 1fr );
	grid-template-areas:
		"number title"
		"number count"
		"number watch";
	column-gap: 0.65rem;
	row-gap: 0.42rem;
	align-content: center;
	align-items: start;
	box-sizing: border-box;
	min-width: 0;
	min-height: 5.3rem;
	margin: 0;
	padding: 0.9rem 0.85rem;
	border-right: 1px solid var( --vct-line );
	border-bottom: 1px solid var( --vct-line );
	background: transparent;
	color: var( --vct-ink );
	counter-increment: vct-topic;
}

.vedanta-course-topics .vedanta-course-topic::before {
	grid-area: number;
	align-self: start;
	padding-top: 0.18rem;
	color: var( --vct-accent );
	content: counter( vct-topic, decimal-leading-zero );
	font-family: Georgia, "Times New Roman", serif;
	font-size: 0.73rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.08em;
	line-height: 1.3;
}

.vedanta-course-topics .vedanta-course-topic__title {
	grid-area: title;
	display: block;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: 0.96rem;
	font-weight: 400;
	line-height: 1.48;
	overflow-wrap: break-word;
	white-space: normal;
	word-break: normal;
	word-wrap: break-word;
	writing-mode: horizontal-tb;
}

.vedanta-course-topics .vedanta-course-topic__count {
	grid-area: count;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: start;
	min-height: 1.5rem;
	margin: 0;
	padding: 0.12rem 0.48rem;
	border: 1px solid rgba( 166, 83, 60, 0.28 );
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.5 );
	color: var( --vct-accent );
	font-family: inherit;
	font-size: 0.69rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.vedanta-course-topics .vedanta-course-topic__watch {
	grid-area: watch;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: start;
	gap: 0.42rem;
	min-height: 1.8rem;
	margin: 0.05rem 0 0;
	padding: 0.28rem 0.68rem;
	border: 1px solid rgba( 166, 83, 60, 0.32 );
	border-radius: 999px;
	background: var( --vct-paper-light );
	box-shadow: none;
	color: var( --vct-accent-dark );
	cursor: pointer;
	font-family: inherit;
	font-size: 0.76rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.vedanta-course-topics .vedanta-course-topic__watch:hover {
	border-color: var( --vct-accent );
	background: #fffdf9;
	color: var( --vct-accent-dark );
}

.vedanta-course-topics .vedanta-course-topic__watch:focus-visible {
	outline: 2px solid var( --vct-accent );
	outline-offset: 2px;
}

.vedanta-course-topics .vedanta-course-topic__watch:disabled {
	opacity: 1;
	cursor: default;
}

.vedanta-course-topics .vedanta-course-topic__watch-icon {
	width: 0;
	height: 0;
	border-top: 0.28rem solid transparent;
	border-bottom: 0.28rem solid transparent;
	border-left: 0.43rem solid currentColor;
}

/* Show six topics initially. Without JavaScript, every topic stays visible. */
.vedanta-course-topics.vct-is-ready.vct-is-collapsed .vedanta-course-topic:nth-child( n + 7 ) {
	display: none;
}

.vedanta-course-topics .vedanta-course-topics__toggle-wrap {
	display: none;
	justify-content: center;
	margin-top: 1.25rem;
}

.vedanta-course-topics.vct-is-ready .vedanta-course-topics__toggle-wrap {
	display: flex;
}

.vedanta-course-topics .vedanta-course-topics__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	min-height: 2.85rem;
	padding: 0.62rem 1.2rem;
	border: 1px solid rgba( 166, 83, 60, 0.34 );
	border-radius: 999px;
	background: var( --vct-paper-light );
	box-shadow: none;
	color: var( --vct-accent-dark );
	cursor: pointer;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.vedanta-course-topics .vedanta-course-topics__toggle:hover {
	border-color: var( --vct-accent );
	background: #fffdf9;
	color: var( --vct-accent-dark );
}

.vedanta-course-topics .vedanta-course-topics__toggle:focus-visible {
	outline: 2px solid var( --vct-accent );
	outline-offset: 3px;
}

.vedanta-course-topics .vedanta-course-topics__toggle-icon {
	width: 0.48rem;
	height: 0.48rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY( -0.12rem ) rotate( 45deg );
	transition: transform 160ms ease;
}

.vedanta-course-topics:not( .vct-is-collapsed ) .vedanta-course-topics__toggle-icon {
	transform: translateY( 0.12rem ) rotate( 225deg );
}

.vedanta-course-topics .vedanta-course-topics__note {
	margin: clamp( 1.15rem, 2.7vw, 1.7rem ) 0 0;
	padding: 0.75rem 0 0 1rem;
	border-left: 2px solid var( --vct-accent-soft );
	color: var( --vct-muted );
	font-family: inherit;
	font-size: 0.88rem;
	line-height: 1.62;
}

/* Course format and price callout. */
.wp-block-vedanta-course-price.vedanta-course-price {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	grid-template-areas:
		"heading amount"
		"format amount"
		"note amount";
	column-gap: clamp( 1.25rem, 4vw, 3rem );
	row-gap: 0.5rem;
	align-items: center;
	position: relative;
	margin-block: clamp( 2rem, 4vw, 3rem );
	padding: clamp( 1.25rem, 3vw, 1.85rem );
	border: 1px solid rgba( 166, 83, 60, 0.2 );
	border-radius: 5px;
	background: linear-gradient( 125deg, #f2e2d5 0%, #f8eee4 100% );
	box-shadow: 0 16px 38px rgba( 76, 52, 38, 0.055 );
}

.vedanta-course-price .vedanta-course-price__heading {
	grid-area: heading;
	margin: 0;
	color: var( --vct-ink );
	font-family: inherit;
	font-size: clamp( 1.15rem, 2vw, 1.42rem );
	font-weight: 600;
	line-height: 1.35;
}

.vedanta-course-price .vedanta-course-price__format {
	grid-area: format;
	margin: 0;
	color: var( --vct-muted );
	font-family: inherit;
	font-size: 0.98rem;
	line-height: 1.55;
}

.vedanta-course-price .vedanta-course-price__amount {
	grid-area: amount;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	min-width: 9.5rem;
	padding: 0.4rem 0 0.4rem clamp( 1.2rem, 3vw, 2.2rem );
	border: 0;
	border-left: 1px solid rgba( 166, 83, 60, 0.22 );
	border-radius: 0;
	background: transparent;
	color: var( --vct-accent-dark );
	text-align: center;
}

.vedanta-course-price .vedanta-course-price__price {
	display: block;
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: clamp( 1.25rem, 2.4vw, 1.65rem );
	font-weight: 700;
	line-height: 1.25;
}

.vedanta-course-price .vedanta-course-price__label {
	display: block;
	margin-top: 0.18rem;
	color: inherit;
	font-family: inherit;
	font-size: 0.73rem;
	font-weight: 500;
	line-height: 1.25;
	opacity: 0.78;
}

.vedanta-course-price .vedanta-course-price__note {
	grid-area: note;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0.55rem 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var( --vct-ink );
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.5;
}

.vedanta-course-price .vedanta-course-price__note::before {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var( --vct-accent );
	color: #fffaf4;
	content: "✓";
	font-family: Arial, sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
}

/* Compact, editable course-stage roadmap card. */
.wp-block-vedanta-course-stage.vedanta-course-stage {
	position: relative;
	margin-block: clamp( 1.35rem, 3vw, 2rem );
	padding: clamp( 1.05rem, 2.7vw, 1.55rem );
	border: 1px solid var( --vct-line );
	border-left: 3px solid var( --vct-accent );
	border-radius: 3px;
	background: rgba( 247, 240, 230, 0.48 );
	box-shadow: 0 8px 24px rgba( 76, 52, 38, 0.025 );
}

.vedanta-course-stage .vedanta-course-stage__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding-bottom: 0.78rem;
	border-bottom: 1px solid var( --vct-line );
}

.vedanta-course-stage .vedanta-course-stage__title {
	margin: 0;
	color: var( --vct-ink );
	font-family: inherit;
	font-size: clamp( 1.02rem, 1.8vw, 1.2rem );
	font-weight: 700;
	line-height: 1.35;
}

.vedanta-course-stage .vedanta-course-stage__status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.75rem;
	padding: 0.22rem 0.65rem;
	border: 1px solid rgba( 166, 83, 60, 0.25 );
	border-radius: 999px;
	background: var( --vct-paper-light );
	color: var( --vct-accent-dark );
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
}

.vedanta-course-stage .vedanta-course-stage__body {
	margin-top: 0.9rem;
}

.vedanta-course-stage .vedanta-course-stage__body > :first-child,
.vedanta-course-stage .vedanta-course-stage__body > .block-editor-inner-blocks > .block-editor-block-list__layout > :first-child {
	margin-top: 0;
}

.vedanta-course-stage .vedanta-course-stage__body > :last-child,
.vedanta-course-stage .vedanta-course-stage__body > .block-editor-inner-blocks > .block-editor-block-list__layout > :last-child {
	margin-bottom: 0;
}

.vedanta-course-stage .vedanta-course-stage__body p {
	margin-block: 0 0.8rem;
	color: var( --vct-ink );
	font-family: inherit;
	font-size: 0.97rem;
	line-height: 1.65;
}

.vedanta-course-stage .vedanta-course-stage__body ul {
	margin-block: 0;
	padding-left: 1.35rem;
}

.vedanta-course-stage .vedanta-course-stage__body li {
	margin: 0;
	padding-left: 0.18rem;
	color: var( --vct-ink );
	font-family: inherit;
	font-size: 0.97rem;
	line-height: 1.62;
}

.vedanta-course-stage .vedanta-course-stage__body li + li {
	margin-top: 0.45rem;
}

.vedanta-course-stage .vedanta-course-stage__body li::marker {
	color: var( --vct-accent );
}

/* When the lecture list belongs to Stage 1, keep it inside the same card. */
.vedanta-course-stage .wp-block-vedanta-course-topics.vedanta-course-topics {
	margin: clamp( 1.25rem, 3vw, 1.8rem ) 0 0;
	padding: clamp( 1.15rem, 2.6vw, 1.55rem ) 0 0;
	border: 0;
	border-top: 1px solid var( --vct-line );
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.vedanta-course-stage .wp-block-vedanta-course-topics.vedanta-course-topics::before {
	display: none;
}

.vedanta-course-stage .vedanta-course-topics .vedanta-course-topics__heading {
	margin: 0 0 clamp( 0.95rem, 2vw, 1.3rem );
	font-size: clamp( 1.18rem, 2vw, 1.48rem );
	font-weight: 500;
}

.vedanta-course-stage .vedanta-course-topics .vedanta-course-topics__note {
	margin: clamp( 1rem, 2.4vw, 1.45rem ) 0 0;
	padding: 0 0 0 0.9rem;
	font-size: 0.86rem;
	font-weight: 400;
	line-height: 1.6;
}

/* Fluent Forms registration inside the Lotus course sidebar card. */
.vedanta-registration-card .vct-course-registration-form {
	--vct-form-accent: #a6533c;
	--vct-form-accent-dark: #86402f;
	--vct-form-ink: #352b24;
	--vct-form-muted: #77675c;
	--vct-form-line: rgba( 166, 83, 60, 0.28 );
	--vct-form-paper: #fffaf3;
	margin-top: clamp( 1.25rem, 3vw, 1.75rem );
	font-family: inherit;
}

.vedanta-registration-card .vct-course-registration-form .ff-el-group {
	margin-bottom: 1.05rem;
}

.vedanta-registration-card .vct-course-registration-form .ff-el-input--label {
	margin-bottom: 0.42rem;
}

.vedanta-registration-card .vct-course-registration-form .ff-el-input--label label {
	margin: 0;
	color: var( --vct-form-ink );
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.45;
}

.vedanta-registration-card .vct-course-registration-form .ff-el-input--label .ff-el-required {
	color: var( --vct-form-accent );
}

.vedanta-registration-card .vct-course-registration-form .ff-el-form-control {
	box-sizing: border-box;
	width: 100%;
	min-height: 3.1rem;
	padding: 0.68rem 0.85rem;
	border: 1px solid var( --vct-form-line );
	border-radius: 5px;
	background: var( --vct-form-paper );
	box-shadow: none;
	color: var( --vct-form-ink );
	font-family: inherit;
	font-size: 0.92rem;
	line-height: 1.4;
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.vedanta-registration-card .vct-course-registration-form .ff-el-form-control::placeholder {
	color: var( --vct-form-muted );
	opacity: 0.68;
}

.vedanta-registration-card .vct-course-registration-form .ff-el-form-control:hover {
	border-color: rgba( 166, 83, 60, 0.48 );
}

.vedanta-registration-card .vct-course-registration-form .ff-el-form-control:focus {
	border-color: var( --vct-form-accent );
	background: #fffdf9;
	box-shadow: 0 0 0 3px rgba( 166, 83, 60, 0.11 );
	outline: 0;
}

.vedanta-registration-card .vct-course-registration-form .ff-el-is-error .ff-el-form-control {
	border-color: #aa453a;
}

.vedanta-registration-card .vct-course-registration-form .text-danger,
.vedanta-registration-card .vct-course-registration-form .error {
	margin-top: 0.35rem;
	color: #8c342d;
	font-family: inherit;
	font-size: 0.76rem;
	line-height: 1.4;
}

.vedanta-registration-card .vct-course-registration-form .ff-btn-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 3.15rem;
	margin: 0;
	padding: 0.68rem 1rem;
	border: 1px solid var( --vct-form-accent ) !important;
	border-radius: 999px;
	background: var( --vct-form-accent ) !important;
	box-shadow: none !important;
	color: #fffaf4 !important;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.vedanta-registration-card .vct-course-registration-form .ff-btn-submit:hover {
	border-color: var( --vct-form-accent-dark ) !important;
	background: var( --vct-form-accent-dark ) !important;
	transform: translateY( -1px );
}

.vedanta-registration-card .vct-course-registration-form .ff-btn-submit:focus-visible {
	outline: 2px solid var( --vct-form-accent-dark );
	outline-offset: 3px;
}

.vedanta-registration-card .vct-course-registration-form .ff-message-success {
	margin: 0;
	padding: 0.9rem 1rem;
	border: 1px solid var( --vct-form-line );
	border-left: 3px solid var( --vct-form-accent );
	border-radius: 4px;
	background: rgba( 255, 250, 243, 0.72 );
	box-shadow: none;
	color: var( --vct-form-ink );
	font-family: inherit;
	font-size: 0.88rem;
	line-height: 1.55;
}

/* Shared responsive YouTube modal. */
body.vct-video-is-open {
	overflow: hidden;
}

.vct-video-modal[hidden] {
	display: none !important;
}

.vct-video-modal {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	z-index: 999999;
	inset: 0;
	box-sizing: border-box;
	padding: clamp( 1rem, 4vw, 3rem );
	background: rgba( 24, 18, 14, 0.82 );
	backdrop-filter: blur( 4px );
}

.vct-video-modal__dialog {
	position: relative;
	width: min( 100%, 1050px );
	border: 1px solid rgba( 255, 255, 255, 0.18 );
	border-radius: 5px;
	background: #16110e;
	box-shadow: 0 24px 80px rgba( 0, 0, 0, 0.45 );
}

.vct-video-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	z-index: 2;
	top: -0.9rem;
	right: -0.9rem;
	width: 2.35rem;
	height: 2.35rem;
	padding: 0;
	border: 1px solid rgba( 166, 83, 60, 0.34 );
	border-radius: 50%;
	background: #fffaf3;
	box-shadow: 0 5px 18px rgba( 0, 0, 0, 0.22 );
	color: #603326;
	cursor: pointer;
	font-family: Arial, sans-serif;
	font-size: 1.55rem;
	font-weight: 400;
	line-height: 1;
}

.vct-video-modal__close:hover {
	background: #ffffff;
}

.vct-video-modal__close:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

.vct-video-modal__video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
}

.vct-video-modal__video iframe {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

@container ( max-width: 700px ) {
	.vedanta-course-topics .vedanta-course-topics__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}

@container ( max-width: 460px ) {
	.vedanta-course-topics .vedanta-course-topics__grid {
		grid-template-columns: minmax( 0, 1fr );
	}
}

@media ( max-width: 700px ) {
	.wp-block-vedanta-course-price.vedanta-course-price {
		grid-template-columns: minmax( 0, 1fr );
		grid-template-areas:
			"heading"
			"format"
			"amount"
			"note";
	}

	.vedanta-course-price .vedanta-course-price__amount {
		align-items: flex-start;
		justify-self: stretch;
		margin-top: 0.35rem;
		padding: 0.8rem 0 0;
		border-top: 1px solid rgba( 166, 83, 60, 0.2 );
		border-left: 0;
		text-align: left;
	}
}

@media ( max-width: 480px ) {
	.wp-block-vedanta-course-topics.vedanta-course-topics {
		padding: 1.1rem;
	}

	.wp-block-vedanta-course-topics.vedanta-course-topics::before {
		left: 1.1rem;
	}

	.vedanta-course-topics .vedanta-course-topic {
		min-height: 4.8rem;
		padding: 0.78rem 0.7rem;
	}

	.vedanta-course-stage .vedanta-course-stage__header {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.55rem;
	}

	.vct-video-modal {
		padding: 0.85rem;
	}

	.vct-video-modal__close {
		top: 0.45rem;
		right: 0.45rem;
		width: 2rem;
		height: 2rem;
		background: rgba( 255, 250, 243, 0.94 );
		font-size: 1.35rem;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.vedanta-course-topics .vedanta-course-topics__toggle,
	.vedanta-course-topics .vedanta-course-topics__toggle-icon,
	.vedanta-course-topics .vedanta-course-topic__watch {
		transition: none;
	}

	.vedanta-registration-card .vct-course-registration-form .ff-el-form-control,
	.vedanta-registration-card .vct-course-registration-form .ff-btn-submit {
		transition: none;
	}
}
