/* ==========================================================================
   TCF look for the LearnPress learning screens (lessons and quizzes)
   Loaded only on LearnPress pages (body.tcf-lms) — see inc/lms.php.
   Restyles LearnPress's own markup; no LearnPress templates are replaced, so
   a LearnPress update can at worst make a detail fall back to its default look.
   ========================================================================== */

body.tcf-lms {
	--tcf-lms-ink: #2b1f2c;
	--tcf-lms-muted: #6f6271;
	--tcf-lms-bg: #f6f1f7;          /* faint lavender page */
	--tcf-lms-tint: #f1e8f2;        /* section bars, info blocks */
	--tcf-lms-tint-strong: #e9dcea;
	--tcf-lms-line: #e7dde8;
	--tcf-lms-done: #2f9e5f;
	--tcf-lms-radius: 18px;
	--tcf-lms-head: "Montserrat", "Raleway", sans-serif;
	--tcf-lms-body: "Raleway", sans-serif;
	--lp-primary-color: var(--tcf-primary, #5b3b60);
	--lp-secondary-color: var(--tcf-primary-dark, #6a3f6c);
	--lp-bg-color-lesson: #fff;
}

/* ---------- Type ---------- */
body.tcf-lms #popup-course,
body.tcf-lms #popup-course input,
body.tcf-lms #popup-course button {
	font-family: var(--tcf-lms-body);
	color: var(--tcf-lms-ink);
}
body.tcf-lms #popup-course h1,
body.tcf-lms #popup-course h2,
body.tcf-lms #popup-course h3,
body.tcf-lms #popup-course h4,
body.tcf-lms #popup-course h5,
body.tcf-lms #popup-course h6,
body.tcf-lms #popup-header .course-title a,
body.tcf-lms #popup-sidebar .lp-course-curriculum__title,
body.tcf-lms #popup-sidebar .course-section__title {
	font-family: var(--tcf-lms-head);
	letter-spacing: -0.01em;
}

/* ---------- Page background ---------- */
body.tcf-lms #popup-course {
	background: var(--tcf-lms-bg);
}

/* ---------- Header ---------- */
body.tcf-lms #popup-header {
	min-height: var(--lp-popup-header-height, 80px);
	box-sizing: border-box;
	background: linear-gradient(100deg, var(--tcf-primary, #5b3b60), var(--tcf-primary-dark, #6a3f6c));
	border-bottom: 0;
	color: #fff;
	box-shadow: 0 2px 14px rgba(43, 20, 44, 0.18);
}
body.tcf-lms #popup-header::before {
	/* TCF logo (white); the image is set in inc/lms.php */
	content: "";
	flex: 0 0 auto;
	align-self: stretch;
	width: 84px;
	min-height: 34px;
	margin: 20px 24px 20px 28px;
	padding-right: 24px;
	border-right: 1px solid rgba(255, 255, 255, 0.35);
	background: var(--tcf-lms-logo, none) left center / contain no-repeat;
	background-origin: content-box;
	box-sizing: content-box;
}
body.tcf-lms #popup-header .popup-header__inner {
	gap: 28px;
}
body.tcf-lms #popup-header .course-title a,
body.tcf-lms #popup-header .course-title a:hover {
	color: #fff;
	font-weight: 600;
}
body.tcf-lms #popup-header .curriculum-info,
body.tcf-lms #popup-header .curriculum-info span {
	color: rgba(255, 255, 255, 0.8);
	font-family: var(--tcf-lms-body);
}
body.tcf-lms #popup-header .curriculum-info span:not(:first-child)::before {
	background-color: rgba(255, 255, 255, 0.65);
	width: 4px;
	height: 4px;
}
body.tcf-lms #popup-header .items-progress {
	color: #fff;
	position: relative;
	padding-right: 52px;
}
body.tcf-lms #popup-header .items-progress .number {
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 6px;
}
body.tcf-lms #popup-header .learn-press-progress {
	height: 8px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.28);
	overflow: hidden;
	width: 220px;
}
body.tcf-lms #popup-header .learn-press-progress__active {
	background: #fff;
	border-radius: 8px;
}
body.tcf-lms #popup-header .tcf-lms-percent {
	position: absolute;
	right: 0;
	bottom: -3px;
	font-weight: 600;
	font-size: 0.95rem;
	color: #fff;
}
body.tcf-lms #popup-header .back-course {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	align-self: stretch;
	margin-left: 18px;
	padding: 0 28px;
	border-left: 1px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	opacity: 0.95;
}
body.tcf-lms #popup-header .back-course:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}
body.tcf-lms #popup-header .back-course i {
	display: none;
}
body.tcf-lms #popup-header .back-course::before {
	content: "\f08b";
	font-family: "Font Awesome 7 Pro", "Font Awesome 5 Pro", "FontAwesome";
	font-weight: 300;
	font-size: 1.25rem;
}
body.tcf-lms #popup-header .back-course::after {
	content: var(--tcf-lms-exit, "Exit course");
	font-family: var(--tcf-lms-body);
}

/* ---------- Curriculum sidebar ---------- */
body.tcf-lms #popup-sidebar {
	background: #fff;
	border-right: 1px solid var(--tcf-lms-line);
}
body.tcf-lms #popup-sidebar .lp-course-curriculum__title {
	color: var(--tcf-lms-ink);
	font-weight: 600;
}
body.tcf-lms #popup-sidebar .course-curriculum-info,
body.tcf-lms #popup-sidebar .course-curriculum-info * {
	color: var(--tcf-lms-muted);
}
body.tcf-lms #popup-sidebar .course-section {
	border: 0;
	margin: 0 14px 10px;
	background: transparent;
}
body.tcf-lms #popup-sidebar .course-section-header {
	background: var(--tcf-lms-tint);
	border: 0;
	border-radius: 12px;
	padding: 14px 16px;
}
body.tcf-lms #popup-sidebar .course-section-header:hover {
	background: var(--tcf-lms-tint-strong);
}
body.tcf-lms #popup-sidebar .course-section__title {
	color: var(--tcf-primary, #5b3b60);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.35;
}
body.tcf-lms #popup-sidebar .section-count-items,
body.tcf-lms #popup-sidebar .section-toggle {
	color: var(--tcf-primary, #5b3b60);
}
body.tcf-lms #popup-sidebar .course-section__items {
	padding: 6px 0 4px;
	margin: 0;
}
body.tcf-lms #popup-sidebar .course-item {
	position: relative;
	margin: 0;
	padding: 0 !important; /* spacing moves onto the link so the whole item is clickable */
	border-top: 0;
	border-bottom: 1px solid var(--tcf-lms-line);
	border-radius: 0;
	background: transparent;
	transition: background-color 0.15s ease;
}
body.tcf-lms #popup-sidebar .course-item:last-child {
	border-bottom: 0;
}
body.tcf-lms #popup-sidebar .course-item:hover {
	background: #faf6fa;
}
body.tcf-lms #popup-sidebar .course-item__left,
body.tcf-lms #popup-sidebar .course-item-title {
	color: var(--tcf-lms-ink);
	font-size: 0.95rem;
	line-height: 1.4;
}
body.tcf-lms #popup-sidebar .course-item__left:hover {
	color: var(--tcf-primary, #5b3b60);
}
body.tcf-lms #popup-sidebar .course-item__right {
	color: var(--tcf-lms-muted);
}
body.tcf-lms #popup-sidebar .course-item__info .course-item-ico::before {
	color: var(--tcf-primary, #5b3b60);
	opacity: 0.75;
}
/* The link fills the whole item, so clicking anywhere in it opens the lesson */
body.tcf-lms #popup-sidebar .course-item__link {
	display: flex;
	align-items: flex-start; /* icon, title and status line up on the first line */
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px 12px 16px;
	border-radius: inherit;
	cursor: pointer;
	text-decoration: none;
}
body.tcf-lms #popup-sidebar .course-item__info {
	display: flex;
	align-items: center;
	height: 1.33rem; /* = title font-size 0.95rem x line-height 1.4 */
	flex: 0 0 auto;
}
body.tcf-lms #popup-sidebar .course-item__info .course-item-ico {
	display: inline-flex;
	align-items: center;
	height: 1.33rem;
	line-height: 1;
}
body.tcf-lms #popup-sidebar .course-item__info .course-item-ico::before {
	display: block;
	font-size: 1rem;
	line-height: 1;
}
body.tcf-lms #popup-sidebar .course-item-title {
	margin: 0;
}

/* Current lesson / quiz: solid purple with white text */
body.tcf-lms #popup-sidebar .course-item.current {
	background: var(--tcf-primary, #5b3b60);
	border-bottom-color: transparent;
	border-left: 0 !important;
	border-radius: 10px;
	box-shadow: none !important;
}
/* LearnPress marks the current item with a bar on the left; not needed on the purple block */
body.tcf-lms #popup-sidebar .course-item.current::before,
body.tcf-lms #popup-sidebar .course-item.current::after,
body.tcf-lms #popup-sidebar .course-item.current .course-item__link::before {
	content: none !important;
	display: none !important;
}
body.tcf-lms #popup-sidebar .course-item.current:hover {
	background: var(--tcf-primary-dark, #6a3f6c);
}
body.tcf-lms #popup-sidebar .course-item.current .course-item-title,
body.tcf-lms #popup-sidebar .course-item.current .course-item__left,
body.tcf-lms #popup-sidebar .course-item.current .course-item__right,
body.tcf-lms #popup-sidebar .course-item.current .course-item__right *,
body.tcf-lms #popup-sidebar .course-item.current .course-item__info .course-item-ico::before {
	color: #fff !important;
	opacity: 1;
}
body.tcf-lms #popup-sidebar .course-item.current .course-item-title {
	font-weight: 700;
}
body.tcf-lms #popup-sidebar .course-item.current .course-item__status .course-item-ico.in-progress,
body.tcf-lms #popup-sidebar .course-item.current .course-item__status .course-item-ico.started,
body.tcf-lms #popup-sidebar .course-item.current .course-item__status .course-item-ico.doing {
	border-color: rgba(255, 255, 255, 0.75);
}
body.tcf-lms #popup-sidebar .course-item.current .course-item__status .course-item-ico.passed.completed {
	box-shadow: 0 0 0 2px #fff;
}
/* The item before the current one loses its divider so the purple block stands clear */
body.tcf-lms #popup-sidebar .course-item:has(+ .course-item.current) {
	border-bottom-color: transparent;
}

/* Status: empty circle to do, filled green tick when done */
/* Status circle on the same line as the icon and the first line of the title */
body.tcf-lms #popup-sidebar .course-item__status {
	display: flex;
	align-items: center;
	align-self: flex-start;
	height: 1.33rem;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1;
	flex: 0 0 auto;
}
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin: 0 !important;
	line-height: 1;
	border-radius: 50%;
	box-sizing: border-box;
}
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.in-progress,
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.started,
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.doing {
	border: 2px solid #b9adbb;
}
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.in-progress::before,
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.started::before,
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.doing::before {
	content: "";
}
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.passed.completed,
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.completed:not(.failed):not(.in-progress) {
	background: var(--tcf-lms-done);
	border: 0;
}
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.passed.completed::before,
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.completed:not(.failed):not(.in-progress)::before {
	content: "\f00c";
	font-family: "lp-icon";
	color: #fff;
	font-size: 12px;
	line-height: 1;
}
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.failed.completed {
	border: 2px solid #d2524f;
}
body.tcf-lms #popup-sidebar .course-item__status .course-item-ico.failed.completed::before {
	font-size: 11px;
	color: #d2524f;
}

/* Search box */
body.tcf-lms #popup-sidebar .search-course button {
	color: var(--tcf-lms-ink);
}

/* ---------- Content: white card on lavender ---------- */
body.tcf-lms #popup-content {
	background: var(--tcf-lms-bg);
}
body.tcf-lms #popup-content .content-item-scrollable {
	padding: 0 24px;
}
body.tcf-lms #popup-content .content-item-wrap {
	margin: 24px auto 24px; /* lavender margin above and below the card */
	padding: 10px;
	background: #fff;
	border: 1px solid var(--tcf-lms-line);
	border-radius: var(--tcf-lms-radius);
	box-shadow: 0 14px 40px rgba(74, 37, 67, 0.07);
	box-sizing: border-box;
}
@media (max-width: 1024px) {
	body.tcf-lms #popup-content .content-item-scrollable {
		padding: 0 12px;
	}
	body.tcf-lms #popup-content .content-item-wrap {
		padding: 28px 22px 32px;
	}
}

body.tcf-lms #popup-content h1.course-item-title,
body.tcf-lms #popup-content .content-item-summary > .course-item-title,
body.tcf-lms #popup-content .quiz-title,
body.tcf-lms #popup-content .lesson-title {
	color: var(--tcf-primary, #5b3b60);
	font-family: var(--tcf-lms-head) !important;
	font-size: clamp(1.3rem, 2vw, 1.5rem) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
	margin: 14px 0 14px !important;
}
body.tcf-lms #popup-content .content-item-description,
body.tcf-lms #popup-content .content-item-summary p,
body.tcf-lms #popup-content .tcf-quiz-desc {
	font-size: 1.05rem;
	line-height: 1.7;
	color: #3d3240;
}
body.tcf-lms #popup-content .content-item-summary h2,
body.tcf-lms #popup-content .content-item-summary h3,
body.tcf-lms #popup-content .tcf-quiz-desc h2,
body.tcf-lms #popup-content .tcf-quiz-desc h3 {
	color: var(--tcf-primary, #5b3b60);
	font-weight: 700;
	margin: 1.2em 0 0.5em;
}
body.tcf-lms #popup-content .content-item-summary h3,
body.tcf-lms #popup-content .tcf-quiz-desc h3 {
	margin-top: 0.85rem;
}
body.tcf-lms #popup-content .content-item-summary h4,
body.tcf-lms #popup-content .tcf-quiz-desc h4 {
	margin-top: 1.5rem;
}
body.tcf-lms #popup-content .tcf-quiz-desc ul li::marker,
body.tcf-lms #popup-content .content-item-summary ul li::marker {
	color: var(--tcf-primary, #5b3b60);
}

/* Buttons */
body.tcf-lms #popup-course .lp-button:not(.completed),
body.tcf-lms #popup-course .lp-button.start,
body.tcf-lms #popup-course .lp-button.submit-quiz {
	background: var(--tcf-primary, #5b3b60);
	border-color: var(--tcf-primary, #5b3b60);
	color: #fff;
	border-radius: 10px;
	font-family: var(--tcf-lms-body);
	font-weight: 600;
}
body.tcf-lms #popup-course .lp-button:not(.completed):hover {
	background: var(--tcf-primary-dark, #6a3f6c);
	opacity: 1;
}
body.tcf-lms #popup-course .lp-button.completed {
	border-radius: 10px;
}

/* ---------- Quiz start screen ---------- */
/* Questions / time limit / pass mark as three blocks */
body.tcf-lms #popup-content .quiz-intro {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 14px 0 24px;
	padding: 0;
}
@media (max-width: 768px) {
	body.tcf-lms #popup-content .quiz-intro {
		grid-template-columns: 1fr;
	}
}
body.tcf-lms #popup-content .quiz-intro-item {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 18px 20px;
	border-radius: 12px;
	background: var(--tcf-lms-tint);
	color: var(--tcf-lms-ink);
}
body.tcf-lms #popup-content .quiz-intro-item--questions-count { order: 1; }
body.tcf-lms #popup-content .quiz-intro-item--duration { order: 2; }
body.tcf-lms #popup-content .quiz-intro-item--passing-grade { order: 3; }
body.tcf-lms #popup-content .quiz-intro-item::before {
	margin: 0;
	flex: 0 0 auto;
	font-family: "Font Awesome 7 Pro", "Font Awesome 5 Pro", "FontAwesome";
	font-weight: 300;
	font-size: 1.6rem;
	color: var(--tcf-primary, #5b3b60);
}
body.tcf-lms #popup-content .quiz-intro-item--questions-count::before { content: "\f0ca"; }  /* list */
body.tcf-lms #popup-content .quiz-intro-item--duration::before { content: "\f017"; }         /* clock */
body.tcf-lms #popup-content .quiz-intro-item--passing-grade::before { content: "\f5a2"; }    /* award */
body.tcf-lms #popup-content .quiz-intro-item__title {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--tcf-lms-muted);
	padding: 0;
}
body.tcf-lms #popup-content .quiz-intro.tcf-reworded .quiz-intro-item__title {
	display: none;
}
body.tcf-lms #popup-content .quiz-intro-item__content {
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--tcf-lms-ink);
}

/* "Before you begin" */
body.tcf-lms .tcf-quiz-before {
	display: flex;
	align-items: center;
	gap: 22px;
	margin: 26px 0 28px;
	padding: 26px 30px !important;
	border-radius: 12px;
	background: var(--tcf-lms-tint);
	box-sizing: border-box;
}
body.tcf-lms .tcf-quiz-before::before {
	content: "\f0eb"; /* lightbulb */
	flex: 0 0 auto;
	padding-right: 22px;
	border-right: 1px solid rgba(91, 59, 96, 0.25);
	font-family: "Font Awesome 7 Pro", "Font Awesome 5 Pro", "FontAwesome";
	font-weight: 300;
	font-size: 2rem;
	color: var(--tcf-primary, #5b3b60);
}
body.tcf-lms .tcf-quiz-before h3 {
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-size: 1.15rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: var(--tcf-primary, #5b3b60);
}
body.tcf-lms .tcf-quiz-before p {
	margin: 0 !important;
	font-size: 0.98rem !important;
	line-height: 1.55 !important;
}

/* Start bar: "Ready to test your knowledge?" + Start quiz */
body.tcf-lms #popup-content .quiz-buttons:has(.lp-button.start) {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 8px;
	padding-top: 22px;
	border-top: 1px solid var(--tcf-lms-line);
}
body.tcf-lms #popup-content .quiz-buttons:has(.lp-button.start)::before {
	content: var(--tcf-lms-ready, "Ready to test your knowledge?");
	margin-right: auto;
	font-size: 1.05rem;
	color: #3d3240;
}
body.tcf-lms #popup-content .quiz-buttons:has(.lp-button.start) .button-right:empty {
	display: none;
}
body.tcf-lms #popup-content .lp-button.start {
	padding: 12px 26px;
}
body.tcf-lms #popup-content .lp-button.start::after {
	content: "\2192";
	margin-left: 10px;
}

/* Start screen order: label, title, description, info blocks, "Before you
   begin", start bar. The quiz app's wrappers are made layout-transparent so
   its parts can be ordered alongside the theme's; nothing is moved in the DOM. */
body.tcf-lms #content-item-quiz:has(.quiz-intro) {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}
body.tcf-lms #content-item-quiz:has(.quiz-intro) #learn-press-quiz-app,
body.tcf-lms #content-item-quiz:has(.quiz-intro) #learn-press-quiz-app > div {
	display: contents;
}
body.tcf-lms #content-item-quiz:has(.quiz-intro) .tcf-quiz-before {
	order: 1;
}
body.tcf-lms #content-item-quiz:has(.quiz-intro) #learn-press-quiz-app > div > :not(.quiz-intro) {
	order: 2;
}
body.tcf-lms .tcf-quiz-before[hidden],
body.tcf-lms .tcf-quiz-desc[hidden] {
	display: none !important;
}


/* ---------- Footer bar (Prev / Complete / Next) ---------- */
body.tcf-lms #popup-footer {
	background: #fff;
	border-top: 1px solid var(--tcf-lms-line);
}
body.tcf-lms #popup-footer .course-item-nav .prev a,
body.tcf-lms #popup-footer .course-item-nav .next a {
	color: var(--tcf-primary, #5b3b60);
	font-weight: 500;
}
body.tcf-lms #popup-footer .course-item-nav .prev a::before,
body.tcf-lms #popup-footer .course-item-nav .next a::before {
	border-color: var(--tcf-lms-line);
	border-radius: 10px;
	color: var(--tcf-primary, #5b3b60);
}
body.tcf-lms #popup-footer .course-item-nav .prev:hover a::before,
body.tcf-lms #popup-footer .course-item-nav .next:hover a::before {
	background: var(--tcf-primary, #5b3b60);
	border-color: var(--tcf-primary, #5b3b60);
	color: #fff;
}

/* Spacing inside lesson/quiz text: no extra space above the first heading or
   paragraph of a block, or below the last one, so the description sits close
   to the title above it and to the quiz blocks below it. */
body.tcf-lms #popup-content .content-item-summary :is(h2, h4, p):first-child {
	margin-top: 0;
}
body.tcf-lms #content-item-quiz :is(p, ul, ol):last-child {
	margin-bottom: 0;
}

/* Body text in the content card: medium weight (500) */
body.tcf-lms #popup-content .content-item-wrap,
body.tcf-lms #popup-content .content-item-wrap :is(p, li, dd, dt, td, th, blockquote, figcaption) {
	font-weight: 500;
}
body.tcf-lms #popup-content .content-item-wrap :is(strong, b) {
	font-weight: 700;
}

/* ---------- Embedded videos and PDFs in lessons ----------
   Sized here so they always fit the screen between the header and the
   Prev/Complete/Next bar, whatever height is typed into the lesson.
   --tcf-lms-media-offset is the space taken by everything else on screen
   (header, card margins, title, footer bar); change it in one place. */
body.tcf-lms {
	--tcf-lms-media-offset: 270px;
}
body.tcf-lms.admin-bar {
	--tcf-lms-media-offset: 302px; /* + WordPress toolbar for logged-in editors */
}

/* Bunny Stream (and other video iframes): 16:9, but never taller than the screen allows */
body.tcf-lms #popup-content iframe[src*="mediadelivery.net"],
body.tcf-lms #popup-content iframe[src*="b-cdn.net"],
body.tcf-lms #popup-content iframe[src*="youtube"],
body.tcf-lms #popup-content iframe[src*="vimeo"] {
	display: block;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 9;
	max-height: calc(100vh - var(--tcf-lms-media-offset)) !important;
	max-height: calc(100dvh - var(--tcf-lms-media-offset)) !important;
	min-height: 220px;
	border: 0;
	border-radius: 12px;
	background: #000;
}

/* PDF Embedder inside <div class="tcf-lesson-pdf">: fill the visible height,
   pages scroll inside the viewer */
body.tcf-lms #popup-content .tcf-lesson-pdf {
	width: 100%;
}
body.tcf-lms #popup-content .tcf-lesson-pdf .pdfemb-viewer,
body.tcf-lms #popup-content .tcf-lesson-pdf iframe,
body.tcf-lms #popup-content .tcf-lesson-pdf object,
body.tcf-lms #popup-content .tcf-lesson-pdf embed {
	width: 100% !important;
	height: calc(100vh - var(--tcf-lms-media-offset)) !important;
	height: calc(100dvh - var(--tcf-lms-media-offset)) !important;
	min-height: 420px;
	max-width: 100% !important;
	box-sizing: border-box;
}

/* Headings inside lesson/quiz text: smaller than the page title (1.5rem),
   larger than body text (1.05rem) */
body.tcf-lms #popup-content .content-item-wrap h2:not(.course-item-title) {
	font-size: 1.35rem !important;
	line-height: 1.3 !important;
}
body.tcf-lms #popup-content .content-item-wrap h3:not(.course-item-title) {
	font-size: 1.25rem !important;
	line-height: 1.3 !important;
}
body.tcf-lms #popup-content .content-item-wrap h4:not(.course-item-title) {
	font-size: 1.15rem !important;
	line-height: 1.35 !important;
}
body.tcf-lms #popup-content .content-item-wrap :is(h5, h6):not(.course-item-title) {
	font-size: 1.08rem !important;
	line-height: 1.4 !important;
}
body.tcf-lms #popup-content .content-item-wrap .tcf-quiz-before h3 {
	font-size: 1.15rem !important;
}

/* ---------- "Congrats! You have completed…" and other notices ----------
   Float in the top-right corner instead of pushing the lesson down, and fade
   out on their own after a few seconds (errors stay until clicked). */
body.tcf-lms #popup-content .learn-press-message:not(#learn-press-quiz-app *):not(.tcf-lesson-complete *) {
	position: fixed;
	top: calc(var(--lp-popup-header-height, 80px) + 16px);
	right: 24px;
	z-index: 1000;
	max-width: min(460px, calc(100vw - 48px));
	margin: 0 !important;
	padding: 14px 44px 14px 18px;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(43, 20, 44, 0.18);
	cursor: pointer;
	animation: tcf-toast-in 0.3s ease-out both;
}
body.tcf-lms.admin-bar #popup-content .learn-press-message:not(#learn-press-quiz-app *):not(.tcf-lesson-complete *) {
	top: calc(var(--lp-popup-header-height, 80px) + 48px);
}
body.tcf-lms #popup-content .learn-press-message:not(#learn-press-quiz-app *):not(.tcf-lesson-complete *)::after {
	content: "\00d7";
	position: absolute;
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
	font-size: 1.3rem;
	line-height: 1;
	opacity: 0.6;
}
body.tcf-lms #popup-content .learn-press-message.success:not(#learn-press-quiz-app *):not(.tcf-lesson-complete *),
body.tcf-lms #popup-content .learn-press-message.info:not(#learn-press-quiz-app *):not(.tcf-lesson-complete *),
body.tcf-lms #popup-content .learn-press-message:not(.error):not(.warning):not(#learn-press-quiz-app *):not(.tcf-lesson-complete *) {
	animation: tcf-toast-in 0.3s ease-out both, tcf-toast-out 0.5s ease-in 5s forwards;
}
body.tcf-lms #popup-content .learn-press-message.tcf-toast-closed {
	animation: tcf-toast-out 0.25s ease-in forwards !important;
}
@keyframes tcf-toast-in {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: none; }
}
@keyframes tcf-toast-out {
	to { opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none; }
}
@media (max-width: 768px) {
	body.tcf-lms #popup-content .learn-press-message:not(#learn-press-quiz-app *):not(.tcf-lesson-complete *) {
		right: 12px;
		left: 12px;
		max-width: none;
	}
}
