/* Learning player: dark header/video + Udemy-style light content panels */

body.jbs-theme-child.jbs-tutor-learning {
	/* Lock light Tutor tokens so system/dark prefs cannot darken the panels. */
	--tutor-surface-base: #fff;
	--tutor-surface-l1: #fff;
	--tutor-surface-l1-hover: #f7f9fa;
	--tutor-surface-l2: #f7f9fa;
	--tutor-surface-l3: #f7f9fa;
	--tutor-surface-sidebar-l1: #fff;
	--tutor-text-primary: #1c1d1f;
	--tutor-text-secondary: #2d2f31;
	--tutor-text-subdued: #6a6f73;
	--tutor-icon-idle: #2d2f31;
	--tutor-icon-secondary: #6a6f73;
	--tutor-border-idle: #d1d7dc;
	--tutor-tab-l3-active-hover: #d1d7dc;
	background: #fff;
	color: #2d2f31;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: #fff;
	color: #2d2f31;
}

.jbs-learn-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: #1c1d1f;
	color: #fff;
}

body.admin-bar .jbs-learn-header {
	top: 32px;
}

.jbs-learn-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
	padding: 0 16px;
}

.jbs-learn-header__brand {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.jbs-learn-header__logo {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.jbs-learn-header__logo img {
	display: block;
	max-height: 34px;
	width: auto;
}

.jbs-learn-header__title {
	margin: 0;
	min-width: 0;
	overflow: hidden;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

a.jbs-learn-header__title:hover {
	color: #d1d7dc;
}

.jbs-learn-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.jbs-learn-header__text,
.jbs-learn-header__btn {
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.jbs-learn-header__btn {
	padding: 8px 12px;
}

.jbs-learn-header__btn:hover,
.jbs-learn-header__text:hover {
	color: #d1d7dc;
}

.jbs-learn-header__btn--icon {
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	padding: 0;
}

.jbs-learn-header__btn--icon span {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
}

.jbs-learn-cert {
	position: relative;
}

.jbs-learn-cert__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 8px;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.jbs-learn-cert__trigger:hover {
	color: #d1d7dc;
}

.jbs-learn-cert__icon {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border-radius: 50%;
	background: #c0f11c;
	color: #163300;
	flex: 0 0 auto;
}

.jbs-learn-cert__icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.jbs-learn-cert__progress {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 50%;
	background: conic-gradient(#fff calc(var(--jbs-progress) * 1%), #3e4143 0);
	flex: 0 0 auto;
}

.jbs-learn-cert__progress > span {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border-radius: 50%;
	background: #1c1d1f;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}

.jbs-learn-cert__chevron {
	display: block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: 0.85;
}

.jbs-learn-cert__menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 50%;
	z-index: 50;
	width: min(280px, calc(100vw - 32px));
	padding: 16px;
	background: #fff;
	color: #1c1d1f;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
	transform: translateX(-50%);
}

.jbs-learn-cert__menu::before {
	content: '';
	position: absolute;
	top: -6px;
	left: 50%;
	width: 12px;
	height: 12px;
	background: #fff;
	box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.06);
	transform: translateX(-50%) rotate(45deg);
}

.jbs-learn-cert__menu[hidden] {
	display: none;
}

.jbs-learn-cert__status {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
}

.jbs-learn-cert__remaining {
	margin: 0;
	color: #6a6f73;
	font-size: 13px;
	line-height: 1.4;
}

.jbs-learn-cert__cta {
	display: block;
	width: 100%;
	padding: 12px 16px;
	border-radius: 4px;
	background: #7c3aed;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.jbs-learn-cert__cta:hover {
	background: #6d28d9;
	color: #fff;
}

.jbs-learn-more {
	position: relative;
}

.jbs-learn-more__menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 50;
	min-width: 220px;
	padding: 8px 0;
	background: #fff;
	color: #1c1d1f;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.jbs-learn-more__menu[hidden] {
	display: none;
}

.jbs-learn-more__menu button {
	display: block;
	width: 100%;
	padding: 12px 16px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font: inherit;
	text-align: left;
}

.jbs-learn-more__menu button:hover {
	background: #f7f9fa;
}

.jbs-learn-share {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.55);
}

.jbs-learn-share[hidden] {
	display: none;
}

.jbs-learn-share__dialog {
	width: min(440px, 100%);
	padding: 20px;
	background: #fff;
	color: #1c1d1f;
}

.jbs-learn-share__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.jbs-learn-share__head h2,
.jbs-learn-overview__title {
	margin: 0;
	color: #1c1d1f;
	font-size: 20px;
}

.jbs-learn-share__close {
	border: 0;
	background: transparent;
	color: #1c1d1f;
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
}

.jbs-learn-share__note,
.jbs-learn-share__status {
	color: #6a6f73;
	font-size: 14px;
}

.jbs-learn-share__list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jbs-learn-share__list a,
.jbs-learn-share__list button {
	display: block;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #d1d7dc;
	background: #fff;
	color: #1c1d1f;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	text-align: left;
	text-decoration: none;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .jbs-tutor-learning-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: row;
	align-items: stretch;
	min-width: 0;
	min-height: 0;
	padding-inline-start: 0;
	padding-left: 0;
	background: #fff;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .jbs-tutor-learning-content {
	order: 1;
	align-self: flex-start;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: flex-start;
	width: 100%;
	min-width: 0;
	min-height: 0;
	padding: 0;
	background: #fff;
	color: #2d2f31;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-lesson-content {
	flex: 0 0 auto;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: #fff;
	color: #2d2f31;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar {
	order: 2;
	position: sticky;
	top: 56px;
	flex: 0 0 360px;
	width: 360px;
	max-width: 360px;
	height: calc(100vh - 56px);
	overflow: auto;
	border-right: 0;
	border-left: 1px solid #d1d7dc;
	background: #fff;
	color: #2d2f31;
	transform: none;
}

body.admin-bar.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar {
	top: 88px;
	height: calc(100vh - 88px);
}

.jbs-learn-sidebar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px;
	border-bottom: 1px solid #d1d7dc;
	background: #fff;
	color: #1c1d1f;
}

.jbs-learn-sidebar__title {
	margin: 0;
	color: #1c1d1f;
	font-size: 16px;
	font-weight: 700;
}

.jbs-learn-sidebar__close {
	border: 0;
	background: transparent;
	color: #2d2f31;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
}

.jbs-learn-sidebar__close,
.jbs-learn-header__content,
.jbs-learn-backdrop {
	display: none;
}

.jbs-learn-sidebar__reset {
	padding: 8px 16px 0;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-header-title {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	min-width: 0;
	color: #1c1d1f;
	font-weight: 700;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-header-title-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-header-progress {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	line-height: 0;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-header-progress .tutor-statics-progress,
body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-header-progress .tutor-progress-circle {
	display: block;
	width: 20px;
	height: 20px;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-header-title-text {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.3;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-header-meta {
	display: block;
	padding-left: 28px;
	color: #6a6f73;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav {
	display: flex;
	flex-direction: column;
	gap: 0;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-topic {
	gap: 4px;
	padding: 4px 0;
	border-bottom: 1px solid #d1d7dc;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-topic:last-child {
	border-bottom: 0;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-topic .tutor-learning-nav-header {
	gap: 10px;
	padding-block: 12px;
	padding-inline: 12px;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-item {
	color: #2d2f31;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-item:hover {
	background: #f7f9fa;
	color: #1c1d1f;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar .tutor-learning-nav-item.active {
	background: #d1d7dc;
	color: #1c1d1f;
}

/* Video well: Tutor-native 16:9 only (no nested aspect-ratio / absolute overrides). */
.jbs-learn-player {
	flex: 0 0 auto;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: #000;
	line-height: 0;
}

/* Quiz player: size to content (no fixed 16:9 well / inner scrollbar). */
.jbs-learn-player--quiz {
	position: relative;
	width: 100%;
	height: auto;
	min-height: 0;
	aspect-ratio: auto;
	overflow: visible;
	background: #fff;
	line-height: normal;
	color: #2d2f31;
}

.jbs-learn-player--quiz .tutor-quiz,
.jbs-learn-player--quiz .tutor-quiz-submission,
.jbs-learn-player--quiz .tutor-quiz-intro {
	min-height: 0;
	height: auto !important;
	box-sizing: border-box;
}

.jbs-learn-player--quiz .tutor-quiz-submission[data-question-layout-view="single_question"],
.jbs-learn-player--quiz .tutor-quiz-submission[data-question-layout-view="question_pagination"] {
	position: relative;
	height: auto !important;
	min-height: 0;
	padding: 12px 20px 20px;
}

/* Undo Tutor full-page absolute centering (top:96px/142px + justify-content:center). */
.jbs-learn-player--quiz .tutor-quiz-questions,
.jbs-learn-player--quiz .tutor-quiz-questions[data-question-layout-view="single_question"],
.jbs-learn-player--quiz .tutor-quiz-questions[data-question-layout-view="question_pagination"] {
	position: relative !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	transform: none !important;
	height: auto !important;
	max-height: none !important;
	justify-content: flex-start !important;
	gap: 12px;
	width: 100%;
	margin: 0 auto;
	padding-top: 0;
}

.jbs-learn-player--quiz .tutor-quiz-questions[data-question-layout-view="single_question"] .tutor-quiz-question,
.jbs-learn-player--quiz .tutor-quiz-questions[data-question-layout-view="question_pagination"] .tutor-quiz-question {
	margin-block: 0;
}

.jbs-learn-player--quiz .tutor-quiz-header {
	position: relative;
	top: auto;
	inset-inline: auto;
	z-index: 2;
	margin-bottom: 8px;
	padding-bottom: 8px;
	background: #fff;
}

.jbs-learn-player--quiz .tutor-quiz-footer {
	position: relative;
	margin-top: 12px;
}

.jbs-learn-player--quiz .tutor-quiz-intro {
	padding: 12px 20px 20px;
}

body.jbs-theme-child.jbs-tutor-learning .jbs-learn .jbs-tutor-learning-container {
	flex: 0 0 auto;
	width: 100%;
	max-width: none;
	height: auto;
	min-height: unset;
	margin: 0;
	padding: 0;
}

.jbs-learn-player .tutor-lesson-video-wrapper,
.jbs-learn-player .tutor-lesson-image-wrapper {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	background: #000;
	line-height: 0;
}

/* Let .tutor-ratio-16x9 { padding-top: 56.25% } own height — avoid double 16:9. */
.jbs-learn-player .tutor-video-player {
	position: relative;
	width: 100%;
	aspect-ratio: unset;
	height: auto;
	margin: 0;
	background: #000;
}

.jbs-learn-player .loading-spinner {
	display: none;
}

.jbs-learn-player .tutor-lesson-feature-image {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	background: #000;
}

.jbs-learn-tabs {
	flex: 0 0 auto;
	margin-top: 0;
	background: #fff;
	color: #2d2f31;
}

.jbs-learn-reading,
.jbs-learn-panel,
.jbs-learn-overview {
	padding: 24px 32px 48px;
	background: #fff;
	color: #2d2f31;
}

.jbs-learn-tabs__bar {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	border-bottom: 1px solid #d1d7dc;
	padding: 0 24px;
	background: #fff;
}

.jbs-learn-tabs__tab {
	flex: 0 0 auto;
	padding: 16px 8px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: transparent;
	color: #6a6f73;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
}

.jbs-learn-tabs__tab:hover {
	color: #1c1d1f;
}

.jbs-learn-tabs__tab.is-active {
	border-bottom-color: #1c1d1f;
	color: #1c1d1f;
}

.jbs-learn-overview__meta,
.jbs-learn-overview__block ul {
	margin: 12px 0 0;
	padding-left: 18px;
}

.jbs-learn-overview__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	padding-left: 0;
	list-style: none;
	color: #6a6f73;
}

.jbs-learn-overview__about,
.jbs-learn-overview__block {
	margin-top: 28px;
}

.jbs-learn-overview h3 {
	margin: 0 0 8px;
	color: #1c1d1f;
	font-size: 18px;
}

.jbs-learn-backdrop {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(0, 0, 0, 0.45);
}

@media (max-width: 782px) {
	body.admin-bar .jbs-learn-header {
		top: 46px;
	}
}

@media (max-width: 1024px) {
	.jbs-learn-header__title {
		max-width: 34vw;
	}

	.jbs-learn-header__content,
	.jbs-learn-sidebar__close {
		display: inline-flex;
	}

	.jbs-learn-backdrop {
		display: block;
	}

	body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar {
		position: fixed;
		top: 0;
		right: 0;
		left: auto;
		z-index: 70;
		flex: none;
		width: min(88vw, 380px);
		max-width: none;
		height: 100vh;
		transform: translateX(105%);
		transition: transform 0.2s ease;
		box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
	}

	body.jbs-theme-child.jbs-tutor-learning .jbs-learn .tutor-learning-sidebar.is-open {
		transform: translateX(0);
	}

	.jbs-learn-reading,
	.jbs-learn-panel,
	.jbs-learn-overview {
		padding: 20px 16px 40px;
	}

	.jbs-learn-cert__label {
		display: none;
	}
}

@media (min-width: 1025px) {
	.jbs-learn-backdrop {
		display: none !important;
	}
}

/* Create review modal */
.jbs-review-rating__stars {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.jbs-review-rating__prompt-slot {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	min-height: 42px;
}

.jbs-review-rating__prompt {
	margin: 0;
	max-width: 320px;
	color: #6a6f73;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.jbs-review-rating__prompt.is-visible {
	opacity: 1;
}

.jbs-review-rating__star-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.jbs-review-rating__star {
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: #f79009;
	cursor: pointer;
	line-height: 0;
	transform: scale(1);
	transition: transform 0.15s ease;
}

.jbs-review-rating__star:hover {
	transform: scale(1.12);
}

.jbs-review-rating__star-icon {
	display: flex;
	color: inherit;
}

.jbs-review-rating__star-icon svg {
	width: 56px;
	height: 56px;
}

.jbs-review-form__content {
	padding-bottom: 0;
}

.jbs-review-form__actions {
	padding-top: 20px;
}

.jbs-review-form__content[hidden],
.jbs-review-form__content[x-cloak],
.jbs-review-form__actions[hidden],
.jbs-review-form__actions[x-cloak],
.jbs-review-rating__star-icon[x-cloak] {
	display: none !important;
}
