/* Shared course-template components (rendered by CourseComponents): menu,
   progress, chapters, lesson cards and grid, done/favorite buttons, hero pieces,
   lesson meta + downloads, prev/next navigation, filters and locked states.
   Every template gets this file (enqueued by Course::enqueueTemplateAssets);
   the template's own template.css adds only the layout skeleton (menu
   positioning, content width, responsive frame). Everything themes off the
   --course-* variables the template root sets inline. */
.mw_course {
	--course-main: #2e5b41;
	--course-light: #dceae1;
	--course-bg: #ffffff;
	--course-accent: #4e8c68;
	--course-radius: 20px;
	--course-width: 1200px; /* content width; aligns with the site header */

	/* fixed base font size — course pages must not inherit the appearance font SIZE, only the family:
	   heading + text font come from the global appearance variables (set on body by printBodyStyles) */
	font-size: 15px;
	font-family: var(--mw-font-text, inherit);
}

/* corner radius by the corner style (Course::getCornersClass) */
.mw_course.mw_course_corners_sharp {
	--course-radius: 0;
}

.mw_course.mw_course_corners_rounded {
	--course-radius: 10px;
}

.mw_course.mw_course_corners_extra_round {
	--course-radius: 30px;
}

.mw_course_hero_title,
.mw_course_section_title,
.mw_course_card_title,
.mw_course_files_title,
.mw_course_file_name {
	font-family: var(--mw-font-title, inherit);
}

/* content is centred like the site header (.fix_width: width 90%, capped);
   backgrounds stay full width. The template adds its own side paddings. */
.mw_course_inner {
	box-sizing: border-box;
	width: 90%;
	max-width: var(--course-width);
	margin: 0 auto;
}

/* ---------- left menu: floats over the strip, the only shadow ---------- */
/* At least full height (min-height), but grows with its content and never
   scrolls internally — the whole menu is always visible. */
.mw_course_menu {
	box-sizing: border-box;
	width: 300px;
	flex: 1 1 auto;
	pointer-events: auto;
	background: var(--course-bg);
	border-radius: var(--course-radius);
	box-shadow: 0 26px 55px -30px rgba(20, 40, 30, .45);
	padding: 22px 16px;
}

.mw_course_progress {
	padding: 4px 10px 0;
}

/* mobile-only controls (shown in the responsive block below) */
.mw_course_menu_bar,
.mw_course_menu_toggle,
.mw_course_menu_close {
	display: none;
}

.mw_course_progress_label {
	font-size: 14px;
	line-height: 16px;
	font-weight: 700;
	color: #191919;
	margin-bottom: 10px;
}

.mw_course_progress_bar {
	height: 8px;
	border-radius: 999px;
	background: #e8eaed;
	overflow: hidden;
}

.mw_course_progress_fill {
	height: 100%;
	border-radius: 999px;
	background: var(--course-accent);
	transition: width .3s ease;
}

.mw_course_menu_divider {
	height: 1px;
	background: #eef0ee;
	/* negative side margins cancel the menu padding for a full-width line */
	margin: 18px -16px 26px;
}

/* chapter = collapsible <details>; summary is the header */
.mw_course_menu_chapter_head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
	list-style: none;
	font-size: 11px;
	line-height: 15px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #a7b0a8;
	padding: 26px 10px 8px;
}

.mw_course_menu_chapter_head::-webkit-details-marker {
	display: none;
}

/* the chevron's visual mass sits off the square's centre, so each state shifts
   the box the opposite way to keep the arrow itself vertically centred */
.mw_course_menu_chapter_head:hover {
	color: #7c867e;
}

.mw_course_menu_chapter_head::after {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(2px) rotate(-135deg);
	transition: transform .2s ease;
}

.mw_course_menu_chapter[open] > .mw_course_menu_chapter_head::after {
	transform: translateY(-2px) rotate(45deg);
}

.mw_course_menu_lesson {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 8px 10px;
	border-radius: var(--course-radius);
	text-decoration: none;
	color: #565b57;
}

.mw_course_menu_lesson:hover {
	background: #f2f3f5;
}

/* specificity must beat the theme's a:not(.ve_content_button):hover link colour */
.mw_course_menu .mw_course_menu_lesson:hover {
	color: #1e2933;
}

.mw_course_menu_lesson.is-active {
	background: var(--course-light);
}

.mw_course_menu_lesson.is-active .mw_course_menu_lesson_name {
	font-weight: 700;
	color: var(--course-main);
}

.mw_course_menu_lesson_name {
	font-size: 14px;
	line-height: 20px;
}

.mw_course_menu_icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #98a3a6;
}

.mw_course_menu_icon svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

.mw_course_menu_lesson.is-active .mw_course_menu_icon {
	color: var(--course-main);
}

/* completed lesson: the type icon becomes a green circle with a white check */
.mw_course_menu_lesson.is-done .mw_course_menu_icon {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--course-accent);
	color: #fff;
}

.mw_course_menu_lesson.is-done .mw_course_menu_icon svg {
	display: none;
}

.mw_course_menu_lesson.is-done .mw_course_menu_icon::after {
	content: "";
	width: 4px;
	height: 8px;
	margin-top: -2px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* ---------- hero strip: full-width background, content in the centred inner ---------- */
/* position: relative anchors the absolute intro settings gear (itemSettingButton) */
.mw_course_hero {
	position: relative;
	background: var(--course-light);
	padding: 70px 0;
}

/* intro settings gear: larger offset from the hero corner than the 5px default */
/* the edit (settings) button stays hidden until the hero block is hovered */
.mw_course_hero .ve_open_object_setting {
	top: 10px;
	right: 10px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s ease;
}

.mw_course_hero:hover .ve_open_object_setting {
	opacity: 1;
	pointer-events: auto;
}

.mw_course_hero_head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.mw_course_hero_chapter {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--course-main);
	margin-bottom: 6px;
}

/* intro call-to-action: a filled button in the course main colour, below the text */
.mw_course_hero_cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 32px;
	padding: 13px 26px;
	background: var(--course-main);
	border-radius: var(--course-radius);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: box-shadow .15s ease;
}

/* the round corner styles turn the button into a pill (sharp / rounded
   keep the shared --course-radius) */
.mw_course_corners_round .mw_course_hero_cta,
.mw_course_corners_extra_round .mw_course_hero_cta {
	border-radius: 999px;
}

.mw_course_hero_cta_arrow {
	display: inline-flex;
	transition: transform .15s ease;
}

.mw_course_hero_cta_arrow svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* beat the theme's a:not(.ve_content_button) link colour, in both states */
.mw_course_hero .mw_course_hero_cta,
.mw_course_hero .mw_course_hero_cta:hover {
	color: #fff;
}

.mw_course_hero_cta:hover {
	box-shadow: 0 16px 34px -14px color-mix(in srgb, var(--course-main) 65%, transparent);
}

.mw_course_hero_cta:hover .mw_course_hero_cta_arrow {
	transform: translateX(3px);
}

/* ---------- mark-as-done button ---------- */
.mw_course_done {
	position: relative;
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	height: 40px; /* radius 20px makes the button fully round */
	padding: 0 16px 0 9px;
	background: var(--course-bg);
	border: 1px solid #d3ddd6;
	border-radius: var(--course-radius);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #191919;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.mw_course_done:hover {
	border-color: var(--course-accent);
	background: var(--course-bg);
}

.mw_course_done_ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	color: var(--course-accent);
	transition: background .15s ease, color .15s ease;
}

.mw_course_done_ico svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.mw_course_done.is-done .mw_course_done_ico {
	background: var(--course-accent);
	color: #fff;
}

.mw_course_done_tip {
	position: absolute;
	bottom: calc(100% + 10px);
	right: 0;
	white-space: nowrap;
	background: #191919;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	padding: 8px 12px;
	border-radius: var(--course-radius);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.mw_course_done_tip::after {
	content: "";
	position: absolute;
	top: 100%;
	right: 18px;
	border: 6px solid transparent;
	border-top-color: #191919;
}

.mw_course_done:hover .mw_course_done_tip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* the button state class decides which label + tooltip is shown */
.mw_course_done_txt_done,
.mw_course_done_tip_done {
	display: none;
}

.mw_course_done.is-done .mw_course_done_txt_todo,
.mw_course_done.is-done .mw_course_done_tip_todo {
	display: none;
}

.mw_course_done.is-done .mw_course_done_txt_done,
.mw_course_done.is-done .mw_course_done_tip_done {
	display: inline;
}

.mw_course_hero_title {
	margin: 0;
	font-size: 42px;
	line-height: 1.05;
	font-weight: 800;
	color: #191919;
}

.mw_course_media {
	margin-top: 30px;
	border-radius: var(--course-radius);
	overflow: hidden;
}

.mw_course_media_audio {
	border-radius: 0;
}

.mw_course_media_audio audio {
	width: 100%;
}

.mw_course_media_audio .mw_audio_container iframe {
	max-width: 100% !important;
}

/* course theming for the audio player component (via its custom class) */
.mw_course_audio {
	--mwap-accent: var(--course-main);
	--mwap-radius: var(--course-radius);
}

/* on the dark player the accent must read against the dark surface, so use the light course colour */
.mw_course_audio.mw_audio_player_dark {
	--mwap-accent: var(--course-light);
}

/* ---------- white section: full-width background, content in the centred inner ---------- */
.mw_course_section {
	padding: 44px 0 52px;
}

.mw_course_section_title {
	margin: 0 0 24px;
	font-size: 28px;
	font-weight: 800;
	color: #191919;
}

/* ---------- lesson grid (intro) ---------- */
.mw_course_grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.mw_course_card {
	position: relative; /* the state badges anchor here (they sit outside the media) */
	display: block;
	text-decoration: none;
	background: var(--course-bg);
	border: 1px solid #ebeeeb;
	border-radius: var(--course-radius);
	overflow: hidden;
	transition: box-shadow .15s ease;
}

.mw_course_card:hover {
	box-shadow: 0 10px 30px -12px rgba(20, 40, 30, .25);
}

.mw_course_card_media {
	position: relative;
	container-type: inline-size; /* lets the placeholder number scale with the media (cqw) */
	aspect-ratio: 16 / 10;
	background: var(--course-light);
	background-size: cover;
	background-position: center;
}

/* no-image placeholder: the lesson number in a solid circle, surrounded by
   concentric rings in the course main colour that fade out (all on the light bg) */
.mw_course_card_ph {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at center,
		transparent 0 47.5%,
		color-mix(in srgb, var(--course-main) 38%, transparent) 47.5% 48.6%,
		transparent 48.6% 72%,
		color-mix(in srgb, var(--course-main) 22%, transparent) 72% 72.9%,
		transparent 72.9%);
}

.mw_course_card_ph_num {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 27%;
	aspect-ratio: 1;
	border: 2px solid var(--course-main);
	border-radius: 50%;
	color: var(--course-main);
	font-weight: 800;
	line-height: 1;
	font-size: 16px; /* fallback */
	font-size: 11cqw;
}

.mw_course_card_badges {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	gap: 8px;
}

.mw_course_card_badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: #fff;
}

.mw_course_card_badge svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.mw_course_card_badge_done {
	background: var(--course-accent);
}

.mw_course_card_body {
	padding: 18px 20px 22px;
}

.mw_course_card_meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.mw_course_card_num {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #a7b0a8;
}

.mw_course_card_time {
	font-size: 12px;
	color: #a7b0a8;
	white-space: nowrap;
}

.mw_course_card_title {
	margin-top: 4px;
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
	color: #191919;
}

.mw_course_card_desc {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.5;
	color: #6b7472;
}

/* ---------- lesson content + files ---------- */
.mw_course_lesson_body {
	display: flex;
	align-items: flex-start;
	gap: 48px;
}

.mw_course_lesson_content {
	flex: 1;
	min-width: 0;
}

/* content media (images, video) follows the course corner setting */
.mw_course_lesson_content .mw_cb_image img {
	border-radius: var(--course-radius);
}

.mw_course_lesson_content .mw_video_frame {
	border-radius: var(--course-radius);
	overflow: hidden;
}

/* blockquotes use the course light colour instead of the rich-text blue accent */
.mw_course_lesson_content .mw_richtext blockquote {
	border-left-color: var(--course-light);
}

/* links in the lesson content use the course main colour instead of the rich-text blue accent */
.mw_course_lesson_content .mw_richtext a {
	color: var(--course-main);
}

/* infobox blocks and list markers use the two course appearance colours:
   light background / main colour (consumed by content-builder.css) */
.mw_course_lesson_content {
	--cb-box-light: var(--course-light);
	--cb-box-dark: var(--course-main);
	--cb-list-marker: var(--course-main);
	--cb-list-marker-bg: var(--course-light);
}

.mw_course_lesson_content .mw_cb_infobox {
	border-radius: var(--course-radius);
}

/* on the main-colour (dark) background a main-colour link would disappear —
   inherit the block's white text instead (the infobox body allows no lists) */
.mw_course_lesson_content .mw_cb_infobox_dark .mw_richtext a {
	color: inherit;
}

.mw_course_lesson_side {
	flex: none;
	width: 320px;
}

.mw_course_files {
	margin-top: 32px;
	border-radius: var(--course-radius);
	background: var(--course-light);
	padding: 20px 22px;
	scroll-margin-top: 20px;
}

.mw_course_files_title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
	font-weight: 800;
	color: #191919;
	margin-bottom: 14px;
}

.mw_course_files_title svg {
	flex: none;
	width: 20px;
	height: 20px;
	fill: var(--course-main);
}

.mw_course_file {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 12px 16px;
	border-radius: var(--course-radius);
	background: #fff;
	text-decoration: none;
}

.mw_course_file + .mw_course_file {
	margin-top: 10px;
}

.mw_course_file:hover .mw_course_file_name {
	color: var(--course-main);
}

.mw_course_file_ext {
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: var(--course-radius);
	background: var(--course-light);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	color: var(--course-main);
}

.mw_course_file_name {
	flex: 1;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #191919;
}

/* ---------- prev / finish / next: one row ---------- */
/* fixed columns, so each item keeps its side even when another one is missing
   (no previous lesson, finish button hidden for a done lesson) */
.mw_course_nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 20px;
	margin-top: 32px;
}

.mw_course_nav_link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 600;
	color: rgba(0, 0, 0, .45);
	text-decoration: none;
	transition: color .15s ease;
}

/* scoped by the parent to outweigh the global a:not(.ve_content_button):hover link colour */
.mw_course_nav .mw_course_nav_link:hover {
	color: var(--course-main);
}

.mw_course_nav_arrow {
	flex: none;
	display: inline-flex;
}

.mw_course_nav_arrow svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.mw_course_nav_prev {
	grid-column: 1;
	justify-self: start;
}

.mw_course_nav_next {
	grid-column: 3;
	justify-self: end;
}

/* like .mw_course_done_tip the arrow is part of the bubble, so it never lands under a rounded
   corner; the bubble runs inwards from the link's edge so a long name stays on screen */
.mw_course_nav_tip {
	position: absolute;
	bottom: calc(100% + 10px);
	white-space: nowrap;
	background: #191919;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	padding: 8px 12px;
	border-radius: var(--course-radius);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
	pointer-events: none;
}

.mw_course_nav_tip::after {
	content: "";
	position: absolute;
	top: 100%;
	border: 6px solid transparent;
	border-top-color: #191919;
}

.mw_course_nav_prev .mw_course_nav_tip {
	left: -14px;
}

.mw_course_nav_prev .mw_course_nav_tip::after {
	left: 18px;
}

.mw_course_nav_next .mw_course_nav_tip {
	right: -14px;
}

.mw_course_nav_next .mw_course_nav_tip::after {
	right: 18px;
}

.mw_course_nav_link:hover .mw_course_nav_tip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mw_course_nav_link.is-locked,
.mw_course_nav .mw_course_nav_link.is-locked:hover {
	cursor: default;
	color: rgba(0, 0, 0, .25);
}

/* ---------- responsive: component internals (the template adds its frame) ---------- */
@media (max-width: 980px) {
	/* the padding sits on the toggle, so the whole collapsed box is clickable */
	.mw_course_menu {
		width: auto;
		flex: 0 0 auto;
		padding: 0;
	}

	/* the menu collapses to just the Lekce toggle; it expands the lesson list below,
	   with the progress at its top */
	.mw_course_menu_toggle {
		display: flex;
		align-items: center;
		gap: 8px;
		width: 100%;
		padding: 16px;
		background: none;
		border: 0;
		font-family: inherit;
		font-size: 14px;
		font-weight: 600;
		color: #191919;
		cursor: pointer;
	}

	.mw_course_menu_toggle svg {
		width: 16px;
		height: 16px;
		fill: currentColor;
	}

	/* the hero bar looks like the collapsed menu of the default template */
	.mw_course_menu_bar {
		display: block;
		margin-bottom: 30px;
		background: var(--course-bg);
		border-radius: var(--course-radius);
		box-shadow: 0 26px 55px -30px rgba(20, 40, 30, .45);
	}

	.mw_course_menu_list {
		display: none;
	}

	/* the overlay can't out-z-index the header from its stacking context, so hide the
	   header and lock the page scroll while the menu is open */
	html.mw_course_menu_open,
	body.mw_course_menu_open {
		overflow: hidden;
	}

	body.mw_course_menu_open #header {
		display: none;
	}

	/* full-screen overlay (over the header too); only the content scrolls, under the fixed
	   close bar (its height is the top padding). overscroll-behavior stops the scroll from
	   chaining to the page at the end */
	.mw_course_menu.is-open .mw_course_menu_list {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 100000;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		padding: 56px 16px 16px;
		background: var(--course-bg);
	}

	.mw_course_menu.is-open .mw_course_menu_close {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 100001;
		min-height: 56px;
		padding: 0 14px;
		background: var(--course-bg);
		border: 0;
		color: #191919;
		cursor: pointer;
	}

	.mw_course_menu_close svg {
		width: 26px;
		height: 26px;
		fill: currentColor;
	}

	.mw_course_menu_list .mw_course_progress {
		padding: 0;
	}

	.mw_course_hero {
		padding: 50px 0 50px;
	}

	/* hero: title full width, the two action buttons drop below it */
	.mw_course_hero_head {
		flex-direction: column;
		align-items: flex-start;
	}

	.mw_course_test_result {
		align-self: stretch;
	}

	.mw_course_test_result .mw_test_result_box {
		width: 100%;
	}

	.mw_course_section {
		padding: 36px 0 44px;
	}

	.mw_course_grid {
		grid-template-columns: 1fr 1fr;
	}

	/* stacked column: stretch, else the content shrinks to its longest line
	   (the desktop row layout uses align-items: flex-start) */
	.mw_course_lesson_body {
		flex-direction: column;
		align-items: stretch;
	}

	.mw_course_lesson_side {
		width: 100%;
	}

	.mw_course_nav {
		gap: 12px;
	}
}

@media (max-width: 560px) {
	.mw_course_hero {
		padding: 50px 0;
	}

	.mw_course_hero_title {
		font-size: 32px;
	}

	.mw_course_section {
		padding: 28px 0 36px;
	}

	/* stack and centre the lessons heading and the Vše / Oblíbené filter */
	.mw_course_section_head {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.mw_course_grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- favorites ---------- */
.mw_course_actions {
	flex: none;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 12px;
}

.mw_course_fav {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 40px;
	height: 40px; /* radius 20px makes the button fully round */
	border: 1px solid #d3ddd6;
	border-radius: var(--course-radius);
	background: var(--course-bg);
	color: #8a9691;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.mw_course_fav svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.mw_course_fav:hover {
	border-color: #e2626b;
	color: #e2626b;
}

.mw_course_fav.is-fav {
	color: #e2626b;
}

.mw_course_fav.is-fav svg {
	fill: currentColor;
}

/* section head: title + "Vše / Oblíbené" filter */
.mw_course_section_head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 24px;
}

.mw_course_section_head .mw_course_section_title {
	margin: 0;
}

.mw_course_filter {
	flex: none;
	display: inline-flex;
	padding: 4px;
	border-radius: 999px;
	background: var(--course-light);
}

.mw_course_filter_btn {
	border: 0;
	border-radius: 999px;
	padding: 7px 18px;
	background: transparent;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	/* semi-transparent, so the inactive tab tints into the course-light track */
	color: rgba(25, 25, 25, .5);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.mw_course_filter_btn:hover {
	color: rgba(25, 25, 25, .8);
}

.mw_course_filter_btn.is-active {
	background: var(--course-bg);
	color: var(--course-main);
	box-shadow: 0 2px 6px rgba(20, 40, 30, .12);
}

/* favorite heart indicator on a lesson card */
.mw_course_card_fav {
	background: #e2626b;
}

/* "Oblíbené" filter hides non-favorite cards */
.mw_course_grid_fav .mw_course_card:not(.is-fav),
.mw_course_grid_fav .mw_course_grid_chapter:not(:has(.mw_course_card.is-fav)) {
	display: none;
}

/* shown only when the "Oblíbené" filter is on and nothing is favorited */
.mw_course_grid_empty {
	display: none;
	grid-column: 1 / -1;
	margin: 0;
	padding: 32px 0;
	text-align: center;
	color: #7c867e;
}

.mw_course_grid_fav:not(:has(.mw_course_card.is-fav)) .mw_course_grid_empty {
	display: block;
}

/* heart tooltip — mirrors .mw_course_done_tip */
.mw_course_fav_tip {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translate(-50%, 4px);
	white-space: nowrap;
	background: #191919;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	padding: 8px 12px;
	border-radius: var(--course-radius);
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.mw_course_fav_tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -6px;
	border: 6px solid transparent;
	border-top-color: #191919;
}

.mw_course_fav:hover .mw_course_fav_tip {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.mw_course_fav_tip_remove {
	display: none;
}

.mw_course_fav.is-fav .mw_course_fav_tip_add {
	display: none;
}

.mw_course_fav.is-fav .mw_course_fav_tip_remove {
	display: inline;
}

/* ---------- lesson meta bar: duration (left) + downloads link (right) ---------- */
.mw_course_meta {
	background: var(--course-bg);
	border-top: 1px solid rgba(0, 0, 0, .08);
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.mw_course_meta_row {
	display: flex;
	align-items: center;
	gap: 20px;
	min-height: 58px;
	padding: 8px 0;
}

.mw_course_meta_duration {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 400;
	color: rgba(0, 0, 0, .6);
}

.mw_course_meta_duration svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.mw_course_files_dd {
	margin-left: auto; /* always right, even when duration is missing */
}

.mw_course_files_link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 400;
	color: #191919;
	text-decoration: none;
	transition: color .15s ease;
}

/* scoped by the parent to outweigh the global a:not(.ve_content_button):hover link colour */
.mw_course_files_dd .mw_course_files_link:hover {
	color: var(--course-main);
}

.mw_course_files_link svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* the download icon always carries the main colour; the label is dark, the count grey */
.mw_course_files_link > svg {
	fill: var(--course-main);
}

.mw_course_file_dl {
	flex: none;
	display: inline-flex;
	color: var(--course-main);
}

.mw_course_file_dl svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}


/* a single digit keeps a circle (padding inside the min-width); more digits
   stretch the pill */
.mw_course_files_count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .06);
	color: rgba(0, 0, 0, .6);
	font-size: 12px;
	font-weight: 700;
}

/* favorite heart: outline when not favorited, solid when favorited */
.mw_course_fav_solid {
	display: none;
}

.mw_course_fav.is-fav .mw_svg {
	display: none;
}

.mw_course_fav.is-fav .mw_course_fav_solid {
	display: block;
}

/* search results empty state */
.mw_course_search_empty {
	font-size: 15px;
	color: #6b7476;
	padding: 8px 0;
}

.mw_course_finish {
	grid-column: 2;
}

.mw_course_finish_btn {
	display: inline-flex;
	flex-direction: column;
	gap: 3px;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 64px;
	padding: 0 32px;
	border: 0;
	border-radius: var(--course-radius);
	background: var(--course-main);
	color: #fff;
	font-family: inherit;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	cursor: pointer;
	transition: box-shadow .15s ease;
}

.mw_course_finish_sub {
	font-size: 13px;
	font-weight: 400;
	opacity: .85;
}

.mw_course_corners_round .mw_course_finish_btn {
	border-radius: 999px;
}

.mw_course_finish_btn:hover {
	box-shadow: 0 10px 30px -12px rgba(20, 40, 30, .35);
}

.mw_course_finish_btn:disabled {
	opacity: .7;
	cursor: default;
}

/* ---------- configurable intro hero: two layout styles ---------- */
.mw_course_hero_layout {
	display: flex;
	flex-direction: column;
}

/* Style A — heading, text and media stacked and centred */
.mw_course_hero_stack .mw_course_hero_layout {
	align-items: center;
	text-align: center;
	gap: 35px;
}

/* media spans the full content width — same as the lesson grid below */
.mw_course_hero_stack .mw_course_hero_media {
	width: 100%;
}

/* the layout gap already spaces the CTA below the media, so drop its in-text margin */
.mw_course_hero_stack .mw_course_hero_layout > .mw_course_hero_cta {
	margin-top: 0;
}

/* Style B — text on the left, media on the right */
.mw_course_hero_split .mw_course_hero_layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 48px;
}

.mw_course_hero_desc {
	margin-top: 30px;
	line-height: 1.6;
	color: #3f4b45;
}

/* the larger intro text is only for the editorial and geometric templates;
   the default keeps the base size */
.mw_course_editorial .mw_course_hero_desc,
.mw_course_geo .mw_course_hero_desc {
	font-size: 17px;
}

.mw_course_hero_desc p:last-child {
	margin-bottom: 0;
}

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

.mw_course_hero_media .mw_video_frame,
.mw_course_hero_media .mw_mejs_container {
	border-radius: var(--course-radius);
	overflow: hidden;
}

@media (max-width: 900px) {
	.mw_course_hero_split .mw_course_hero_layout {
		grid-template-columns: 1fr;
		text-align: center;
	}
}

/* ---------- locked lessons (release restrictions) ---------- */
/* menu: a padlock replaces the type icon; the unlock info uses the universal tooltip */
.mw_course_menu_lesson.is-locked {
	position: relative;
	cursor: default;
}

.mw_course_menu .mw_course_menu_lesson.is-locked,
.mw_course_menu .mw_course_menu_lesson.is-locked:hover {
	color: #98a3a6;
}

/* ---------- universal hover/tap tooltip ---------- */
/* Add data-tooltip="text" (+ optional data-tooltip-pos="right|left", default top). Hover on
   desktop, tap on touch (.is-tooltip-open via components.js). Side variants apply only on wide
   screens, so on mobile it stays on top. */
[data-tooltip] {
	position: relative;
}

[data-tooltip]::after,
[data-tooltip]::before {
	position: absolute;
	z-index: 20;
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease, visibility .15s;
	pointer-events: none;
}

[data-tooltip]::after {
	content: attr(data-tooltip);
	white-space: nowrap;
	background: #191919;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	padding: 8px 12px;
	border-radius: var(--course-radius);
}

[data-tooltip]::before {
	content: "";
	border-style: solid;
	border-color: transparent;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before,
[data-tooltip].is-tooltip-open::after,
[data-tooltip].is-tooltip-open::before {
	opacity: 1;
	visibility: visible;
}

/* top (default): bubble above, arrow points down and protrudes below the bubble */
[data-tooltip]::after {
	left: 50%;
	bottom: calc(100% + 10px);
	transform: translateX(-50%);
}

[data-tooltip]::before {
	left: 50%;
	bottom: calc(100% + 4px);
	margin-left: -6px;
	border-width: 6px 6px 0 6px;
	border-top-color: #191919;
}

/* side variants need horizontal room, so they only kick in above the mobile-menu width */
@media (min-width: 981px) {
	/* right: bubble to the right, arrow points left */
	[data-tooltip-pos="right"]::after {
		left: calc(100% + 10px);
		bottom: auto;
		top: 50%;
		transform: translateY(-50%);
	}

	[data-tooltip-pos="right"]::before {
		left: calc(100% + 4px);
		bottom: auto;
		top: 50%;
		margin-left: 0;
		margin-top: -6px;
		border-width: 6px 6px 6px 0;
		border-top-color: transparent;
		border-right-color: #191919;
	}

	/* left: bubble to the left, arrow points right */
	[data-tooltip-pos="left"]::after {
		right: calc(100% + 10px);
		left: auto;
		bottom: auto;
		top: 50%;
		transform: translateY(-50%);
	}

	[data-tooltip-pos="left"]::before {
		right: calc(100% + 4px);
		left: auto;
		bottom: auto;
		top: 50%;
		margin-left: 0;
		margin-top: -6px;
		border-width: 6px 0 6px 6px;
		border-top-color: transparent;
		border-left-color: #191919;
	}
}

/* card: a dark overlay with a padlock and the unlock info over the image */
.mw_course_card.is-locked {
	cursor: default;
}

.mw_course_card.is-locked:hover {
	box-shadow: none;
}

.mw_course_card_lock {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px;
	background: rgba(18, 24, 21, .5);
	color: #fff;
	text-align: center;
}

.mw_course_card_lock_icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	color: #8a9691;
}

.mw_course_card_lock_icon svg {
	width: 20px;
	height: 20px;
}

.mw_course_card_lock_info {
	font-size: 13px;
	line-height: 1.4;
}

.mw_course_card_lock_info strong {
	display: block;
	font-size: 14px;
}

/* ---------- embedded course-lesson test (lesson media = test) ---------- */
/* Scoped to .mw_course_lesson_test, whose .X (0-2-0) beats the exam's own 0-1-0 rules: drop the
   exam name + member name (the lesson shows the title) and take the course colours. */
.mw_course_lesson_test .mw_test_container {
	--mw-exam-main-color: var(--course-main);
	--mw_popup_button_color: var(--course-main);
}

/* a.ve_content_button (0-2-x) beats the exam's own custom_button rules (0-1-x / equal on :hover) */
.mw_course_lesson_test a.ve_content_button {
	background-color: var(--course-main);
	background-image: none;
	border-color: var(--course-main);
	color: #fff;
	transition: box-shadow .15s ease;
}

/* hover unified with the course buttons: only a shadow lift, colours kept (the exam's custom_button
   style otherwise darkens the text/icon — fill: currentColor — on hover) */
.mw_course_lesson_test a.ve_content_button:hover {
	background-color: var(--course-main);
	border-color: var(--course-main);
	color: #fff;
	box-shadow: 0 10px 30px -12px rgba(20, 40, 30, .35);
}

/* the exam name and the member name are redundant here; the question list stays */
.mw_course_lesson_test .mw_test_header h3,
.mw_course_lesson_test .mw_test_user {
	display: none;
}

/* once the name and user are gone the header holds only the question list (step mode); drop it otherwise */
.mw_course_lesson_test .mw_test_header:not(:has(.mw_test_questions_list)) {
	display: none;
}

/* the start button lives in the hero, so the exam's own start view is hidden inside the content */
.mw_course_lesson_test .mw_test_info {
	display: none;
}

/* content shown, test wrapper hidden until it runs (components.js toggles .is-running; the server
   pre-sets it for an in-progress test) */
.mw_course_test_body .mw_course_lesson_test {
	display: none;
}

.mw_course_test_body.is-running .mw_course_test_richtext {
	display: none;
}

.mw_course_test_body.is-running .mw_course_lesson_test {
	display: block;
}

/* hero "Spustit test" button, left under the title; the last-result box sits on the hero's right */
.mw_course_test_start {
	margin-top: 24px;
}

.mw_course_test_result {
	flex: none;
}

/* the hero sits outside the exam's mw_test_corners_* wrapper, so the box follows the
   course corners instead (the Splněno / Nesplněno mark stays a pill either way) */
.mw_course_test_result .mw_test_result_box {
	border-radius: var(--course-radius);
}

.mw_course_test_start_btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 56px;
	padding: 0 44px;
	border: 0;
	border-radius: var(--course-radius);
	background: var(--course-main);
	color: #fff;
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: box-shadow .15s ease;
}

.mw_course_test_start_btn:hover {
	box-shadow: 0 16px 34px -14px color-mix(in srgb, var(--course-main) 65%, transparent);
}

.mw_course_test_start_btn svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

/* on a main-colour hero strip the filled button would vanish: invert to a white button */
.mw_course_strip_main .mw_course_test_start_btn,
.mw_course_strip_main .mw_course_test_start_btn:hover {
	background: #fff;
	color: var(--course-main);
}

/* ---------- hero strip colour variant ---------- */
/* appearance setting "Barva pruhu" = main colour: inverted text on the dark strip */
.mw_course_strip_main .mw_course_hero {
	background: var(--course-main);
}

.mw_course_strip_main .mw_course_hero_title {
	color: #fff;
}

.mw_course_strip_main .mw_course_hero_chapter {
	color: var(--course-light);
}

.mw_course_strip_main .mw_course_hero_desc {
	color: rgba(255, 255, 255, .88);
}

/* on a main-colour strip the filled button would vanish: invert to a white button */
.mw_course_strip_main .mw_course_hero .mw_course_hero_cta,
.mw_course_strip_main .mw_course_hero .mw_course_hero_cta:hover {
	background: #fff;
	color: var(--course-main);
}

/* Meta bar on narrow / single-column layouts. This block sits after the base
   .mw_course_meta_row / .mw_course_files_dd rules on purpose: they have the same
   specificity, so it must come later in the source to win when the query matches. */
@media (max-width: 980px) {
	/* duration above the downloads button, centred; symmetric padding gives a single
	   item equal top/bottom room, the small gap keeps the two items close */
	.mw_course_meta_row {
		flex-direction: column;
		align-items: center;
		gap: 10px;
		min-height: 0;
		padding: 20px 0;
	}

	.mw_course_files_dd {
		margin-left: 0;
	}
}

/* Lesson nav on phones. Like the meta bar block above, it sits after the base
   .mw_course_finish / .mw_course_finish_btn rules on purpose: same specificity,
   so it must come later in the source to win when the query matches. */
@media (max-width: 560px) {
	/* no fixed rows: with the finish button hidden, prev / next move up without an empty gap */
	.mw_course_nav {
		grid-template-columns: 1fr 1fr;
		row-gap: 24px;
	}

	.mw_course_finish {
		grid-column: 1 / -1;
		order: -1;
	}

	.mw_course_finish_btn {
		width: 100%;
		height: auto;
		min-height: 64px;
		padding: 8px 20px;
		text-align: center;
	}

	.mw_course_nav_next {
		grid-column: 2;
	}
}
