/**
 * Wellspring Vocational Training Registration - front end.
 *
 * Palette defaults match the iteach theme already running on the site
 * (indigo #525fe1, accent #fec923). Every colour is a custom property, so a
 * child theme can restyle the whole widget by redefining them on .wsvt.
 */

.wsvt {
	--wsvt-primary: #525fe1;
	--wsvt-primary-dark: #3a48d4;
	--wsvt-accent: #fec923;
	--wsvt-ink: #140342;
	--wsvt-muted: #6c6c89;
	--wsvt-line: #e3e3f2;
	--wsvt-soft: #f7f7ff;
	--wsvt-surface: #ffffff;
	--wsvt-success: #1a7f52;
	--wsvt-danger: #c02626;
	--wsvt-radius: 14px;
	--wsvt-shadow: 0 2px 4px rgba(20, 3, 66, .04), 0 12px 28px rgba(20, 3, 66, .07);
	--wsvt-gap: 28px;

	box-sizing: border-box;
	color: var(--wsvt-ink);
}

.wsvt *,
.wsvt *::before,
.wsvt *::after {
	box-sizing: inherit;
}

/* ---------------------------------------------------------------- layout */

.wsvt-courses__header {
	margin-bottom: 32px;
	text-align: center;
}

.wsvt-courses__heading {
	margin: 0 0 8px;
	font-size: clamp(1.6rem, 3vw, 2.35rem);
	line-height: 1.2;
	color: var(--wsvt-ink);
}

.wsvt-courses__subheading {
	margin: 0 auto;
	max-width: 62ch;
	color: var(--wsvt-muted);
	font-size: 1.02rem;
}

.wsvt-grid {
	display: grid;
	gap: var(--wsvt-gap);
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 600px) {
	.wsvt-cols-2,
	.wsvt-cols-3,
	.wsvt-cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.wsvt-cols-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.wsvt-cols-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.wsvt-courses__more {
	margin: 36px 0 0;
	text-align: center;
}

.wsvt-empty {
	padding: 32px;
	border: 1px dashed var(--wsvt-line);
	border-radius: var(--wsvt-radius);
	background: var(--wsvt-soft);
	color: var(--wsvt-muted);
	text-align: center;
}

/* ------------------------------------------------------------------ card */

.wsvt-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--wsvt-line);
	border-radius: var(--wsvt-radius);
	background: var(--wsvt-surface);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.wsvt-card:hover,
.wsvt-card:focus-within {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: var(--wsvt-shadow);
}

.wsvt-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 11;
	background: var(--wsvt-soft);
}

.wsvt-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.wsvt-card:hover .wsvt-card__img {
	transform: scale(1.05);
}

.wsvt-card__img--placeholder {
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, var(--wsvt-primary), var(--wsvt-primary-dark));
	color: #fff;
	font-size: 3rem;
	font-weight: 700;
}

.wsvt-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1.4;
}

.wsvt-badge--new {
	background: var(--wsvt-accent);
	color: var(--wsvt-ink);
}

.wsvt-badge--full {
	top: auto;
	bottom: 12px;
	left: 12px;
	background: rgba(20, 3, 66, .88);
	color: #fff;
}

.wsvt-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px 22px;
}

.wsvt-card__cat {
	margin: 0;
	color: var(--wsvt-primary);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.wsvt-card__title {
	margin: 0;
	font-size: 1.22rem;
	line-height: 1.3;
}

.wsvt-card__title a {
	color: inherit;
	text-decoration: none;
}

.wsvt-card__title a:hover,
.wsvt-card__title a:focus {
	color: var(--wsvt-primary);
}

.wsvt-card__excerpt {
	margin: 0;
	color: var(--wsvt-muted);
	font-size: .93rem;
	line-height: 1.6;
}

.wsvt-card__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 6px;
}

.wsvt-card__details {
	color: var(--wsvt-muted);
	font-size: .88rem;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.wsvt-card__details:hover,
.wsvt-card__details:focus {
	color: var(--wsvt-primary);
}

/* Full groups stay on the page, visibly closed rather than silently missing. */
.wsvt-card.is-full {
	background: var(--wsvt-soft);
}

.wsvt-card.is-full .wsvt-card__media {
	filter: grayscale(1);
	opacity: .55;
}

.wsvt-card.is-full .wsvt-card__title,
.wsvt-card.is-full .wsvt-card__excerpt,
.wsvt-card.is-full .wsvt-card__cat {
	color: var(--wsvt-muted);
}

.wsvt-card.is-full:hover {
	transform: none;
	box-shadow: none;
	border-color: var(--wsvt-line);
}

/* ----------------------------------------------------------------- meter */

.wsvt-meter {
	position: relative;
	overflow: hidden;
	height: 7px;
	border-radius: 999px;
	background: var(--wsvt-line);
}

.wsvt-meter__bar {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--wsvt-primary), var(--wsvt-primary-dark));
	transition: width .4s ease;
}

.wsvt-card.is-full .wsvt-meter__bar,
.wsvt-single.is-full .wsvt-meter__bar {
	background: var(--wsvt-muted);
}

.wsvt-card__seats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--wsvt-muted);
	font-size: .88rem;
}

.wsvt-card__seats strong {
	color: var(--wsvt-ink);
	font-weight: 700;
}

.wsvt-seats__sep {
	opacity: .5;
}

/* --------------------------------------------------------------- buttons */

.wsvt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 1px solid var(--wsvt-primary);
	border-radius: 999px;
	background: var(--wsvt-primary);
	color: #fff;
	font-size: .93rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.wsvt-btn:hover,
.wsvt-btn:focus {
	background: var(--wsvt-primary-dark);
	border-color: var(--wsvt-primary-dark);
	color: #fff;
}

.wsvt-btn:focus-visible {
	outline: 3px solid rgba(82, 95, 225, .35);
	outline-offset: 2px;
}

.wsvt-btn--ghost {
	background: transparent;
	color: var(--wsvt-primary);
}

.wsvt-btn--ghost:hover,
.wsvt-btn--ghost:focus {
	background: var(--wsvt-primary);
	color: #fff;
}

.wsvt-btn.is-disabled,
.wsvt-btn[disabled] {
	border-color: var(--wsvt-line);
	background: var(--wsvt-line);
	color: var(--wsvt-muted);
	cursor: not-allowed;
	pointer-events: none;
}

.wsvt-btn--primary {
	padding: 13px 30px;
	font-size: 1rem;
}

/* ------------------------------------------------------------------ form */

.wsvt-form-wrap {
	max-width: 760px;
	margin: 0 auto;
}

.wsvt-form__heading {
	margin: 0 0 20px;
	font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.wsvt-form {
	padding: 28px;
	border: 1px solid var(--wsvt-line);
	border-radius: var(--wsvt-radius);
	background: var(--wsvt-surface);
}

.wsvt-form__intro {
	margin: 0 0 22px;
	padding: 14px 16px;
	border-left: 3px solid var(--wsvt-accent);
	border-radius: 0 8px 8px 0;
	background: var(--wsvt-soft);
	color: var(--wsvt-muted);
	font-size: .92rem;
}

.wsvt-fieldset {
	margin: 0 0 26px;
	padding: 0;
	border: 0;
}

.wsvt-fieldset legend {
	padding: 0;
	margin-bottom: 14px;
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--wsvt-ink);
}

.wsvt-row {
	display: grid;
	gap: 0 18px;
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 620px) {
	.wsvt-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.wsvt-field {
	margin: 0 0 18px;
}

.wsvt-field label {
	display: block;
	margin-bottom: 6px;
	font-size: .9rem;
	font-weight: 600;
}

.wsvt-req {
	color: var(--wsvt-danger);
}

.wsvt-field input[type="text"],
.wsvt-field input[type="email"],
.wsvt-field input[type="tel"],
.wsvt-field select,
.wsvt-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wsvt-line);
	border-radius: 10px;
	background: #fff;
	color: var(--wsvt-ink);
	font: inherit;
	font-size: .96rem;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.wsvt-field input:focus,
.wsvt-field select:focus,
.wsvt-field textarea:focus {
	border-color: var(--wsvt-primary);
	box-shadow: 0 0 0 3px rgba(82, 95, 225, .15);
	outline: none;
}

.wsvt-field select option[disabled] {
	color: #9a9ab0;
}

.wsvt-field.has-error input,
.wsvt-field.has-error select,
.wsvt-field.has-error textarea {
	border-color: var(--wsvt-danger);
}

.wsvt-field__error {
	display: block;
	margin-top: 6px;
	color: var(--wsvt-danger);
	font-size: .85rem;
	font-weight: 600;
}

.wsvt-help {
	display: block;
	margin-top: 6px;
	color: var(--wsvt-muted);
	font-size: .84rem;
}

.wsvt-field--check label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	font-size: .92rem;
	line-height: 1.5;
}

.wsvt-field--check input {
	margin-top: 3px;
	flex: 0 0 auto;
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.wsvt-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wsvt-form__submit {
	margin: 8px 0 0;
}

.wsvt-form__submit .wsvt-btn {
	width: 100%;
}

@media (min-width: 620px) {
	.wsvt-form__submit .wsvt-btn {
		width: auto;
	}
}

.wsvt-form.is-busy {
	opacity: .65;
	pointer-events: none;
}

/* -------------------------------------------------------- notices/result */

.wsvt-form__errors,
.wsvt-notice {
	margin: 0 0 22px;
	padding: 14px 16px;
	border-radius: 10px;
	border-left: 4px solid var(--wsvt-danger);
	background: #fdf2f2;
	color: #7d1d1d;
	font-size: .94rem;
	line-height: 1.55;
}

.wsvt-notice--setup {
	display: block;
	border-left-color: var(--wsvt-accent);
	background: #fffbe9;
	color: #6b4e00;
	font-size: .9rem;
}

.wsvt-notice--info {
	border-left-color: var(--wsvt-primary);
	background: var(--wsvt-soft);
	color: var(--wsvt-ink);
}

.wsvt-form__errors ul {
	margin: 8px 0 0;
	padding-left: 20px;
}

.wsvt-form__success {
	padding: 30px 28px;
	border: 1px solid rgba(26, 127, 82, .3);
	border-radius: var(--wsvt-radius);
	background: #f2fbf6;
}

.wsvt-success__title {
	margin: 0 0 10px;
	color: var(--wsvt-success);
	font-size: 1.4rem;
}

.wsvt-success__message {
	margin: 0 0 8px;
	font-size: 1.02rem;
	line-height: 1.6;
}

.wsvt-success__ref {
	margin: 0 0 20px;
	color: var(--wsvt-muted);
	font-size: .9rem;
}

.wsvt-success__ref code {
	padding: 2px 8px;
	border-radius: 6px;
	background: rgba(20, 3, 66, .07);
	font-size: .92em;
}

/* ---------------------------------------------------- course details page */

.wsvt-single-page__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 48px 20px 64px;
}

.wsvt-single__hero {
	display: grid;
	gap: 32px;
	align-items: center;
	margin-bottom: 48px;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 880px) {
	.wsvt-single__hero {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	}
}

.wsvt-single__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--wsvt-radius);
	background: var(--wsvt-soft);
	aspect-ratio: 16 / 11;
}

.wsvt-single__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wsvt-single__cat {
	margin: 0 0 10px;
	color: var(--wsvt-primary);
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.wsvt-single__title {
	margin: 0 0 14px;
	font-size: clamp(1.9rem, 4vw, 2.9rem);
	line-height: 1.15;
}

.wsvt-single__note {
	margin: 0 0 18px;
	padding: 10px 14px;
	border-left: 3px solid var(--wsvt-accent);
	border-radius: 0 8px 8px 0;
	background: var(--wsvt-soft);
	color: var(--wsvt-muted);
	font-size: .92rem;
}

.wsvt-single__stats {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 24px;
	max-width: 420px;
}

.wsvt-single__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.wsvt-single__body {
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 880px) {
	.wsvt-single__body {
		grid-template-columns: minmax(0, 1fr) 320px;
	}
}

.wsvt-single__content {
	font-size: 1.02rem;
	line-height: 1.75;
	color: #3d3d5c;
}

.wsvt-single__content > *:first-child {
	margin-top: 0;
}

.wsvt-single__aside {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wsvt-panel {
	padding: 22px 24px;
	border: 1px solid var(--wsvt-line);
	border-radius: var(--wsvt-radius);
	background: var(--wsvt-surface);
}

.wsvt-panel--rules {
	background: var(--wsvt-soft);
}

.wsvt-panel__title {
	margin: 0 0 14px;
	font-size: 1.05rem;
	font-weight: 700;
}

.wsvt-facts {
	margin: 0;
}

.wsvt-fact {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 9px 0;
	border-bottom: 1px solid var(--wsvt-line);
}

.wsvt-fact:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.wsvt-fact dt {
	margin: 0;
	color: var(--wsvt-muted);
	font-size: .88rem;
}

.wsvt-fact dd {
	margin: 0;
	font-size: .92rem;
	font-weight: 700;
	text-align: right;
}

.wsvt-rules {
	margin: 0;
	padding-left: 20px;
	color: var(--wsvt-muted);
	font-size: .9rem;
	line-height: 1.65;
}

.wsvt-rules li + li {
	margin-top: 8px;
}

.wsvt-single__related {
	margin-top: 64px;
	padding-top: 44px;
	border-top: 1px solid var(--wsvt-line);
}

.wsvt-single__related-title {
	margin: 0 0 28px;
	font-size: 1.5rem;
}

/* ------------------------------------------------------------- utilities */

.wsvt .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.wsvt *,
	.wsvt *::before,
	.wsvt *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
