/*
 * Pathway Tracker design: shared styles for the restructure.
 * Mobile first: base rules are for phones; min-width queries add to them.
 */

:root {
	--pwt-navy: #0B1F3A;
	--pwt-ink: #1E293B;
	--pwt-muted: #4A5568;
	--pwt-line: #DCE3EC;
	--pwt-line-strong: #CBD5E1;
	--pwt-bg: #F5F8FC;
	--pwt-tint: #EAF2FF;
	--pwt-purple: #5B4BD5;
	--pwt-green: #047857;
	--pwt-band-short: #047857;
	--pwt-band-award: #5B4BD5;
	--pwt-band-qual: #0B1F3A;
	--pwt-band-bundle: #5B4BD5;
	--pwt-radius: 10px;
	--pwt-tap: 44px;
	--pwt-font: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
	--pwt-head: Sora, Nunito, system-ui, sans-serif;
}

/* Screen-reader-only text. */
.pwt-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Buttons. */
.pwt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border: 2px solid transparent;
	border-radius: 999px;
	font: 800 16px/1.2 var(--pwt-font);
	text-decoration: none;
	cursor: pointer;
}
.pwt-btn--primary { background: var(--pwt-purple); color: #FFFFFF; }
.pwt-btn--primary:hover, .pwt-btn--primary:focus-visible { background: #4A3BC0; color: #FFFFFF; }
.pwt-btn--outline { border-color: var(--pwt-navy); color: var(--pwt-navy); background: #FFFFFF; }
.pwt-btn--outline:hover, .pwt-btn--outline:focus-visible { background: var(--pwt-navy); color: #FFFFFF; }

/* Cards. Give a course card its type colour with a pwt-band-* class. */
.pwt-card {
	background: #FFFFFF;
	border: 1px solid var(--pwt-line);
	border-radius: var(--pwt-radius);
}
.pwt-band-short { --pwt-band: var(--pwt-band-short); }
.pwt-band-award { --pwt-band: var(--pwt-band-award); }
.pwt-band-qual { --pwt-band: var(--pwt-band-qual); }
.pwt-band-bundle { --pwt-band: var(--pwt-band-bundle); }
.pwt-card.pwt-band-short, .pwt-card.pwt-band-award, .pwt-card.pwt-band-qual, .pwt-card.pwt-band-bundle,
.e-loop-item.pwt-band-short, .e-loop-item.pwt-band-award, .e-loop-item.pwt-band-qual, .e-loop-item.pwt-band-bundle {
	border-top: 5px solid var(--pwt-band);
}

/* Course type label: [pwt_course_type]. */
.pwt-type {
	display: inline-block;
	font: 800 12px/1.3 var(--pwt-font);
	letter-spacing: .05em;
	text-transform: uppercase;
}
.pwt-type--short { color: var(--pwt-band-short); }
.pwt-type--award { color: var(--pwt-band-award); }
.pwt-type--qual { color: var(--pwt-band-qual); }
.pwt-type--bundle { color: var(--pwt-band-bundle); }

/* Small coloured square for a course type. */
.pwt-mark {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--pwt-line-strong);
}
.pwt-mark--short { background: var(--pwt-band-short); }
.pwt-mark--award { background: var(--pwt-band-award); }
.pwt-mark--qual { background: var(--pwt-band-qual); }
.pwt-mark--bundle { background: var(--pwt-band-bundle); }

/* ---------- Course search: [pwt_course_search] ---------- */
.pwt-cs {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: var(--pwt-tap);
	padding: 0 4px 0 14px;
	border: 1px solid var(--pwt-line-strong);
	border-radius: 999px;
	background: #FFFFFF;
	font-family: var(--pwt-font);
}
.pwt-cs:focus-within { border-color: var(--pwt-purple); box-shadow: 0 0 0 2px rgba(91, 75, 213, .25); }
.pwt-cs__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 42px;
	border: 0 !important;
	outline: 0;
	background: transparent !important;
	box-shadow: none !important;
	font: 400 16px var(--pwt-font); /* 16px stops iPhones zooming in. */
	color: var(--pwt-ink);
	padding: 0 !important;
}
.pwt-cs__input::-webkit-search-cancel-button { display: none; }
.pwt-cs__go {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--pwt-purple);
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.pwt-cs__list {
	position: absolute;
	z-index: 1000;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #FFFFFF;
	border: 1px solid var(--pwt-line);
	border-radius: var(--pwt-radius);
	box-shadow: 0 12px 28px rgba(11, 31, 58, .14);
	max-height: 60vh;
	overflow-y: auto;
}
.pwt-cs__list[hidden] { display: none; }
.pwt-cs__opt a {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: var(--pwt-tap);
	padding: 8px 14px;
	color: var(--pwt-ink);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.3;
	box-sizing: border-box;
}
.pwt-cs__opt + .pwt-cs__opt { border-top: 1px solid #EEF2F7; }
.pwt-cs__opt[aria-selected="true"] a, .pwt-cs__opt a:hover { background: #EEF2FF; }
.pwt-cs__title { flex: 1 1 auto; }
.pwt-cs__title mark { background: none; color: inherit; font-weight: 800; }
.pwt-cs__price { font-weight: 800; color: var(--pwt-navy); white-space: nowrap; }
.pwt-cs__opt--all a { font-weight: 800; color: var(--pwt-purple); }

/* ---------- Desktop Courses menu: [pwt_courses_menu] ---------- */
.pwt-cm { position: static; font-family: var(--pwt-font); }
/* Let the drop-down position itself against the header row, not the small
   widget box Elementor wraps the shortcode in. */
.elementor-widget:has(.pwt-cm), .elementor-widget-container:has(.pwt-cm), .elementor-shortcode:has(.pwt-cm) { position: static; }
.pwt-cm__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: var(--pwt-tap);
	padding: 0 16px;
	border: 0;
	border-radius: 8px;
	background: var(--pwt-navy);
	color: #FFFFFF;
	font: 700 16px var(--pwt-font);
	cursor: pointer;
}
.pwt-cm__chev { transition: transform .15s; }
.pwt-cm.is-open .pwt-cm__chev { transform: rotate(180deg); }
.pwt-cm__panel {
	position: absolute;
	z-index: 999;
	left: 50%;
	transform: translateX(-50%);
	width: min(1248px, calc(100vw - 32px));
	margin-top: 10px;
	display: flex;
	background: #FFFFFF;
	border-radius: 0 0 12px 12px;
	box-shadow: 0 18px 40px rgba(11, 31, 58, .18);
	overflow: hidden;
	text-align: left;
}
.pwt-cm__panel[hidden] { display: none; }
.pwt-cm__side {
	flex: 0 0 280px;
	box-sizing: border-box;
	padding: 24px;
	background: var(--pwt-bg);
	border-right: 1px solid #E2E8F0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.pwt-cm a { color: var(--pwt-ink); text-decoration: none; }
.pwt-cm a:hover { color: var(--pwt-purple); }
.pwt-cm__all {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: var(--pwt-tap);
	padding: 0 14px;
	border-radius: 8px;
	background: var(--pwt-navy);
	color: #FFFFFF !important;
	font-weight: 800;
}
.pwt-cm__h, .pwt-mm__h {
	margin: 0 0 8px;
	font: 800 12px var(--pwt-font);
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--pwt-muted);
}
.pwt-cm ul, .pwt-mm ul, .pwt-cm li, .pwt-mm li { list-style: none; margin: 0; padding: 0; }
.pwt-cm li::marker, .pwt-mm li::marker { content: none; }
.pwt-cm__types a { display: flex; align-items: center; gap: 8px; min-height: 32px; font-weight: 700; }
.pwt-cm__types a { font-size: 15px; }
.pwt-cm__types a > span:nth-child(2) { flex: 1; white-space: nowrap; }
.pwt-cm__range { color: var(--pwt-muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.pwt-cm__pills, .pwt-mm__pills { display: flex; flex-wrap: wrap; gap: 8px; }
/* Desktop drop-down: the three delivery pills sit on one line. */
.pwt-cm__pills { flex-wrap: nowrap; gap: 6px; }
.pwt-cm__pills a { padding: 0 10px; font-size: 13px; white-space: nowrap; }
.pwt-cm__pills a, .pwt-mm__pills a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid var(--pwt-line-strong);
	border-radius: 999px;
	font-weight: 700;
	font-size: 14px;
}
.pwt-cm__bundles {
	position: relative;
	overflow: hidden;
	margin-top: auto;
	min-height: 132px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 6px;
	padding: 14px;
	border-radius: 10px;
	background-color: var(--pwt-navy);
	background-repeat: no-repeat;
	background-position: 0% 18%;
	background-size: auto 220%;
	color: #FFFFFF !important;
}
/* Navy fade so the text stays readable over the photo. */
.pwt-cm__bundles::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(11, 31, 58, .95) 0%, rgba(11, 31, 58, .8) 45%, rgba(11, 31, 58, .1) 100%);
}
.pwt-cm__bundles > * { position: relative; }
.pwt-cm__bundles strong {
	align-self: flex-start;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--pwt-purple);
	color: #FFFFFF;
	font-size: 13px;
}
.pwt-cm__bundles span { max-width: 62%; font-size: 14px; line-height: 1.4; color: #FFFFFF; }
.pwt-cm__bundles:hover strong, .pwt-cm__bundles:focus-visible strong { background: #4A3BC0; }
.pwt-cm__grid {
	flex: 1 1 auto;
	min-width: 0;
	padding: 24px 28px;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
}
.pwt-cm__cat { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.pwt-cm__catname {
	font: 700 15px/1.3 var(--pwt-head);
	color: var(--pwt-navy) !important;
	overflow-wrap: break-word;
}
.pwt-cm__cat ul { display: flex; flex-direction: column; gap: 9px; }
.pwt-cm__course { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.35; min-width: 0; }
/* Long course titles wrap; the colour marker stays level with the first line. */
.pwt-cm__course > :first-child { flex: none; margin-top: calc((1.35em - 8px) / 2); }
.pwt-cm__course span:last-child { min-width: 0; overflow-wrap: break-word; }
.pwt-cm__more { margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 800; color: var(--pwt-purple) !important; }

/* Below desktop width the drop-down becomes a simple stacked panel. */
@media (max-width: 1023px) {
	.pwt-cm__panel { flex-direction: column; max-height: 80vh; overflow-y: auto; }
	.pwt-cm__side { flex-basis: auto; border-right: 0; }
	.pwt-cm__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
}

/* ---------- Phone menu: [pwt_mobile_menu] ---------- */
.pwt-mm { font-family: var(--pwt-font); }
.pwt-mm__open, .pwt-mm__close {
	width: var(--pwt-tap);
	height: var(--pwt-tap);
	border: 0;
	border-radius: 10px;
	background: var(--pwt-navy);
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.pwt-mm__dialog {
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: #FFFFFF;
	color: var(--pwt-ink);
}
.pwt-mm__dialog::backdrop { background: rgba(11, 31, 58, .5); }
.pwt-mm-open, .pwt-mm-open body { overflow: hidden; }
.pwt-mm__top {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 12px 8px 16px;
	background: #FFFFFF;
	border-bottom: 1px solid #E2E8F0;
}
.pwt-mm__home { font: 700 18px var(--pwt-head); color: var(--pwt-navy); text-decoration: none; }
.pwt-mm__body { padding: 16px 16px 32px; display: flex; flex-direction: column; }
.pwt-mm__body > .pwt-cs { margin-bottom: 8px; }
.pwt-mm .pwt-mm__h { margin: 24px 0 8px; }
.pwt-mm .pwt-cs + .pwt-mm__h { margin-top: 16px; }
.pwt-cm .pwt-cm__h { margin: 0 0 8px; }
.pwt-mm__row, .pwt-mm__more a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 52px;
	border-top: 1px solid #E2E8F0;
	font-weight: 800;
	color: var(--pwt-navy);
	text-decoration: none;
}
.pwt-mm__row--all {
	padding: 0 14px;
	border: 0;
	border-radius: var(--pwt-radius);
	background: var(--pwt-navy);
	color: #FFFFFF;
	margin-bottom: 6px;
}
.pwt-mm__n { color: var(--pwt-muted); font-weight: 600; }
.pwt-mm__more ul { list-style: none; margin: 0; padding: 0; }
.pwt-mm__pills a { color: var(--pwt-ink); text-decoration: none; min-height: 40px; }
.pwt-mm__me { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pwt-mm__me .pwt-btn { width: 100%; box-sizing: border-box; gap: 8px; white-space: nowrap; }

/* Order confirmation: Start your course. */
.pwt-next { margin: 0 0 28px; padding: 22px 24px; border: 1px solid #DCE3EC; border-radius: 8px; background: #FFFFFF; }
.pwt-next__h { margin: 0 0 8px; font-size: 22px; color: var(--pwt-navy); }
.pwt-next__p { margin: 0 0 16px; color: #334155; }

/* Header: My account icon and My courses button ([pwt_account_links]). */
.pwt-al { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.pwt-al__acc { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #CBD5E1; color: var(--pwt-navy) !important; background: #FFFFFF; }
.pwt-al__acc:hover, .pwt-al__acc:focus-visible { border-color: var(--pwt-purple); color: var(--pwt-purple) !important; }
.pwt-al__cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--pwt-purple); color: #FFFFFF !important; font-weight: 800; text-decoration: none !important; }
.pwt-al__cta:hover, .pwt-al__cta:focus-visible { background: #4A3BC0; color: #FFFFFF !important; }
@media (max-width: 767px) {
	.pwt-al { display: none; }
}

/* ---------- Phone buy bar on course pages ---------- */
.pwt-buybar { display: none; }
@media (max-width: 767px) {
	.pwt-buybar {
		position: fixed;
		z-index: 900;
		left: 0;
		right: 0;
		bottom: 0;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		background: #FFFFFF;
		border-top: 1px solid var(--pwt-line);
		box-shadow: 0 -6px 18px rgba(11, 31, 58, .10);
		font-family: var(--pwt-font);
		transition: transform .2s ease;
	}
	.pwt-buybar.is-waiting { transform: translateY(110%); visibility: hidden; }
	.pwt-buybar__price { margin: 0; display: flex; flex-direction: column; line-height: 1.1; }
	.pwt-buybar__price strong { font: 700 22px var(--pwt-head); color: var(--pwt-navy); }
	.pwt-buybar__price span { font-size: 13px; color: var(--pwt-muted); }
	.pwt-buybar form { flex: 1; margin: 0; }
	.pwt-buybar .pwt-btn { width: 100%; }
	body.pwt-buybar-on { padding-bottom: 84px; }
	/* Keep the scroll-to-top button clear of the bar. */
	body.pwt-buybar-on #pt-scroll-top { bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
	.pwt-buybar, .pwt-cm__chev { transition: none; }
}

/* ---------- Category tiles: [pwt_category_tiles] ---------- */
.pwt-tiles { font-family: var(--pwt-font); }
.pwt-tiles__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.pwt-tiles__grid li { margin: 0; padding: 0; }
.pwt-tiles__grid li::marker { content: none; }
.pwt-tile {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	text-decoration: none;
	color: var(--pwt-navy);
	transition: box-shadow .15s, transform .15s;
}
.pwt-tile:hover, .pwt-tile:focus-visible { box-shadow: 0 8px 20px rgba(11, 31, 58, .12); transform: translateY(-2px); }
/* img.class and a parent class so the theme's img { height: auto } can't win. */
.pwt-tiles img.pwt-tile__img, .pwt-cc img.pwt-tile__img, .pwt-tile__img--none {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 84px;
	object-fit: cover;
	background: var(--pwt-tint);
}
.pwt-tile__body {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 10px 12px 12px;
	border-top: 3px solid var(--pwt-purple);
	flex: 1;
}
.pwt-tile__name { font-weight: 800; font-size: 15px; line-height: 1.25; }
.pwt-tile__count { font-size: 13px; color: var(--pwt-muted); white-space: nowrap; }
.pwt-tiles__extra { display: none; }
.pwt-tiles__more { width: 100%; margin-top: 12px; box-sizing: border-box; }
@media (min-width: 768px) {
	.pwt-tiles__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
	.pwt-tiles__extra { display: block; }
	.pwt-tiles__more { display: none; }
	.pwt-tiles img.pwt-tile__img, .pwt-tiles .pwt-tile__img--none { height: 140px; }
	.pwt-tile__name { font-size: 17px; }
}

/* ---------- Course cards: [pwt_course_cards], [pwt_bundle_cards] ---------- */
.pwt-cc { font-family: var(--pwt-font); }
.pwt-cc__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pwt-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--pwt-line-strong);
	border-radius: 999px;
	background: #FFFFFF;
	color: var(--pwt-navy);
	font: 700 14px var(--pwt-font);
	cursor: pointer;
}
.pwt-chip[aria-pressed="true"] { background: var(--pwt-navy); border-color: var(--pwt-navy); color: #FFFFFF; }
.pwt-cc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}
.pwt-cc__item { margin: 0; padding: 0; }
.pwt-cc__item::marker { content: none; }
.pwt-cc__item[hidden] { display: none; }
.pwt-cc__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	text-decoration: none;
	color: var(--pwt-ink);
	border-top: 5px solid var(--pwt-band, var(--pwt-purple));
	transition: box-shadow .15s;
}
.pwt-cc__card:hover, .pwt-cc__card:focus-visible { box-shadow: 0 8px 20px rgba(11, 31, 58, .12); }
.pwt-cc img.pwt-tile__img, .pwt-cc .pwt-tile__img--none { height: 130px; }
.pwt-cc__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.pwt-cc__title { font-weight: 800; font-size: 16px; line-height: 1.3; color: var(--pwt-navy); }
.pwt-cc__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 6px; }
.pwt-cc__meta { font-size: 14px; color: var(--pwt-muted); }
.pwt-cc__price { font: 700 18px var(--pwt-head); color: var(--pwt-navy); white-space: nowrap; }

/* Phones: one row that scrolls sideways, next card peeking in. */
@media (max-width: 767px) {
	.pwt-cc--swipe .pwt-cc__list {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		gap: 12px;
		padding-bottom: 8px;
		margin-right: -16px;
		padding-right: 16px;
		-webkit-overflow-scrolling: touch;
	}
	.pwt-cc--swipe .pwt-cc__item { flex: 0 0 78%; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
	.pwt-tile, .pwt-cc__card { transition: none; }
	.pwt-tile:hover { transform: none; }
}
