/*
 * STEM Boekbestelling – opmaak.
 * Sluit aan op de huisstijl (Open Sans, blauw #2A7BC4, navy #051D53, geel #FFD243).
 * Alles is gescoped onder .stem-boek zodat de pagina later een eigen stijl kan krijgen.
 */
.stem-boek {
	--sb-blue: #2a7bc4;
	--sb-blue-dark: #1d5f9c;
	--sb-navy: #051d53;
	--sb-ink: #123554;
	--sb-yellow: #ffd243;
	--sb-mist: #eef5fb;
	--sb-line: #cbd9e7;
	--sb-muted: #52657a;
	--sb-error: #b42318;
	--sb-radius: 10px;
	--sb-sticky-top: 120px;
	color: var(--sb-ink);
	font-size: 1rem;
	line-height: 1.55;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.75rem;
	width: 100%;
}
.stem-boek *,
.stem-boek *::before,
.stem-boek *::after { box-sizing: border-box; }
.stem-boek [hidden],
.stem-boek-bar[hidden] { display: none !important; }
.stem-boek .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.stem-boek a { color: var(--sb-blue); }

/* Gefocuste velden niet onder de sticky header of de vaste balk laten vallen. */
:root:has(.stem-boek) { scroll-padding-top: 120px; }
:root:has(.stem-boek-bar:not([hidden])) { scroll-padding-bottom: 110px; }

/* ---------- Layout ---------- */
.stem-boek__aside { display: grid; gap: 1.25rem; align-content: start; order: 1; }
.stem-boek__main { order: 2; }
.stem-boek__aside .stem-boek-event--card,
.stem-boek__aside .stem-boek-summary { display: none; }
/* Desktop-layout staat onderaan dit bestand, zodat het de basisregels overschrijft. */

/* ---------- Presentatie (het ene opvallende element) ---------- */
.stem-boek-event {
	background: var(--sb-navy);
	color: #fff;
	border-radius: var(--sb-radius);
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1.25rem;
	align-items: start;
}
.stem-boek-event--card { padding: 1.75rem 1.5rem; }
.stem-boek-event--strip { padding: 1rem 1.1rem; gap: 1rem; align-items: center; }
.stem-boek-event__date {
	display: flex; flex-direction: column; align-items: center;
	color: var(--sb-yellow); line-height: 1; min-width: 3.5rem;
}
.stem-boek-event__day { font-size: 3.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stem-boek-event__month { font-size: 1rem; font-weight: 600; margin-top: .35rem; }
.stem-boek-event--strip .stem-boek-event__day { font-size: 2.25rem; }
.stem-boek-event--strip .stem-boek-event__month { font-size: .85rem; }
.stem-boek-event .stem-boek-event__title { color: #fff; font-size: 1.15rem; font-weight: 700; margin: 0 0 .35rem; line-height: 1.3; }
.stem-boek-event p { margin: 0 0 .6rem; color: #dce7f3; font-size: .95rem; }
.stem-boek-event p:last-child { margin-bottom: 0; }
.stem-boek-event__time { color: #fff; font-weight: 600; }
.stem-boek-event--strip .stem-boek-event__title { font-size: 1rem; margin-bottom: .15rem; }
.stem-boek-event--strip p { font-size: .9rem; margin-bottom: .2rem; }
.stem-boek-event .stem-boek-event__route a { color: var(--sb-yellow); font-weight: 600; text-underline-offset: 3px; }
.stem-boek-event__note { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: .75rem; margin-top: .9rem !important; }

/* ---------- Overzicht ---------- */
.stem-boek-summary {
	background: var(--sb-mist);
	border-radius: var(--sb-radius);
	padding: 1.25rem 1.4rem;
}
.stem-boek-summary .stem-boek-summary__title { font-size: 1rem; font-weight: 700; color: var(--sb-navy); margin: 0 0 .6rem; }
.stem-boek-summary__empty { margin: 0; color: var(--sb-muted); font-size: .95rem; }
.stem-boek-summary__table { width: 100%; border-collapse: collapse; margin: 0; border: 0; }
.stem-boek-summary__table tr,
.stem-boek-summary__table tbody > tr:nth-child(odd) > * { background: transparent !important; }
.stem-boek-summary__table th,
.stem-boek-summary__table td { border: 0; padding: .35rem 0; background: transparent; font-size: .95rem; }
.stem-boek-summary__table th { text-align: left; font-weight: 400; }
.stem-boek-summary__table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stem-boek-summary__table tfoot th,
.stem-boek-summary__table tfoot td { font-weight: 700; font-size: 1.05rem; color: var(--sb-navy); border-top: 1px solid var(--sb-line); padding-top: .65rem; }
.stem-boek-summary__kwf { margin: .6rem 0 0; font-size: .88rem; color: var(--sb-muted); }

/* ---------- KWF-teller (opvallend kader, bovenaan de zijbalk) ---------- */
.stem-kwf-teller {
	border: 2px solid var(--sb-blue, #2a7bc4);
	border-radius: var(--sb-radius, 10px);
	background: #fff;
	padding: 1.25rem 1.4rem 1.2rem;
	text-align: center;
	box-shadow: 0 8px 24px rgba(5, 29, 83, .08);
}
.stem-kwf-teller p { margin: 0; }
.stem-kwf-teller__logo { display: block; max-width: 150px; max-height: 64px; width: auto; height: auto; margin: 0 auto .9rem; }
.stem-kwf-teller__bedrag { font-size: 2.6rem; font-weight: 700; color: var(--sb-navy, #051d53); font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -0.01em; }
.stem-kwf-teller__label { font-weight: 600; color: var(--sb-blue, #2a7bc4); margin-top: .2rem !important; }
.stem-kwf-teller__uitleg { font-size: .85rem; color: var(--sb-muted, #52657a); margin-top: .6rem !important; padding-top: .6rem; border-top: 1px solid var(--sb-line, #cbd9e7); }

/* ---------- Preorder ---------- */
.stem-boek-preorder {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .35rem 1rem;
	align-items: center;
	background: var(--sb-yellow);
	color: var(--sb-navy);
	border-radius: var(--sb-radius);
	padding: 1rem 1.25rem;
	margin: 0 0 2rem;
}
.stem-boek-preorder p { margin: 0; }
.stem-boek-preorder__badge {
	grid-row: 1; grid-column: 1;
	justify-self: start;
	background: var(--sb-navy); color: #fff;
	font-size: .8rem; font-weight: 700; letter-spacing: .02em;
	padding: .2rem .65rem; border-radius: 999px;
}
.stem-boek-preorder__price { grid-row: 1; grid-column: 2; display: flex; align-items: baseline; gap: .6rem; }
.stem-boek-preorder__now { font-size: 1.9rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stem-boek-preorder__was { font-size: 1.05rem; opacity: .7; }
.stem-boek-preorder__text { grid-column: 1 / -1; font-size: .95rem; line-height: 1.45; }
.stem-boek-preorder__text strong { font-weight: 700; }
.stem-boek-preorder__left { white-space: nowrap; }
.stem-boek-form__was { color: var(--sb-muted); font-weight: 400; margin-right: .15rem; }
.stem-boek-form__option-price small { font-weight: 400; color: var(--sb-muted); font-size: .82rem; }
.stem-boek-summary__saving { margin: .6rem 0 0; font-size: .9rem; font-weight: 700; color: var(--sb-navy); background: var(--sb-yellow); border-radius: 6px; padding: .35rem .6rem; }

/* ---------- Formulier ---------- */
.stem-boek-form { max-width: 640px; }
.stem-boek-form fieldset { border: 0; margin: 0 0 2.25rem; padding: 0; min-width: 0; }
.stem-boek-form legend {
	display: flex; align-items: center; gap: .6rem;
	font-size: 1.2rem; font-weight: 700; color: var(--sb-navy);
	margin-bottom: 1rem; padding: 0; width: 100%;
}
.stem-boek-form__num {
	flex: none; display: inline-grid; place-items: center;
	width: 1.75rem; height: 1.75rem; border-radius: 50%;
	background: var(--sb-blue); color: #fff; font-size: .9rem; font-weight: 700;
}
.stem-boek-form__optional { font-weight: 400; font-size: .9rem; color: var(--sb-muted); }

/* Keuzekaarten */
.stem-boek-form__options { display: grid; gap: .65rem; }
.stem-boek-form__option {
	display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center;
	padding: 1rem 1.1rem; min-height: 64px;
	border: 1.5px solid var(--sb-line); border-radius: var(--sb-radius);
	background: #fff; cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.stem-boek-form__option:hover { border-color: var(--sb-blue); }
.stem-boek-form__option:has(input:checked) { border-color: var(--sb-blue); background: var(--sb-mist); box-shadow: inset 0 0 0 1px var(--sb-blue); }
.stem-boek-form__option:has(input:focus-visible) { outline: 3px solid var(--sb-yellow); outline-offset: 2px; }
.stem-boek-form__option input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--sb-blue); }
.stem-boek-form__option-main { display: grid; gap: .15rem; }
.stem-boek-form__option-title { font-weight: 700; color: var(--sb-navy); line-height: 1.3; }
.stem-boek-form__option-desc { font-size: .9rem; color: var(--sb-muted); line-height: 1.4; }
.stem-boek-form__option-price { font-weight: 600; font-size: .92rem; color: var(--sb-navy); text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
	.stem-boek-form__option { grid-template-columns: auto 1fr; }
	.stem-boek-form__option-price { grid-column: 2; text-align: left; white-space: normal; }
}
.stem-boek-form__hint { margin: .75rem 0 0; font-size: .9rem; color: var(--sb-muted); }
.stem-boek-form__info {
	margin: 1rem 0 0; padding: .85rem 1rem .85rem 2.6rem; position: relative;
	background: var(--sb-mist); border-radius: 8px; color: var(--sb-navy); font-size: .93rem; line-height: 1.5;
}
.stem-boek-form__info::before {
	content: "i"; position: absolute; left: .9rem; top: .9rem;
	width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--sb-blue); color: #fff;
	font: 700 .75rem/1.15rem Georgia, serif; text-align: center;
}

/* Velden */
.stem-boek-form__field { margin: 0 0 1.1rem; }
.stem-boek-form__field > label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--sb-navy); }
.stem-boek-form input[type="text"],
.stem-boek-form input[type="email"],
.stem-boek-form input[type="number"],
.stem-boek-form textarea {
	width: 100%;
	min-height: 48px;
	padding: .7rem .85rem;
	border: 1.5px solid var(--sb-line);
	border-radius: 8px;
	background: #fff;
	color: var(--sb-ink);
	font: inherit;
	font-size: 16px; /* voorkomt inzoomen op iOS */
	transition: border-color .15s;
}
.stem-boek-form input:hover,
.stem-boek-form textarea:hover { border-color: #9fb7cf; }
.stem-boek-form input:focus,
.stem-boek-form textarea:focus { outline: 0; border-color: var(--sb-blue); box-shadow: 0 0 0 3px rgba(42, 123, 196, .22); }
.stem-boek-form [aria-invalid="true"] { border-color: var(--sb-error) !important; }
.stem-boek-form textarea { min-height: 88px; resize: vertical; }
.stem-boek-form__help { margin: .35rem 0 0; font-size: .88rem; color: var(--sb-muted); }
.stem-boek-form__row { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
@media (max-width: 420px) { .stem-boek-form__row { grid-template-columns: 1fr; gap: 0; } }
.stem-boek-form__address { margin-top: .25rem; }

/* Aantal */
.stem-boek-form__stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--sb-line); border-radius: 8px; overflow: hidden; background: #fff; }
.stem-boek-form__stepper-btn {
	width: 48px; min-height: 48px; border: 0; background: var(--sb-mist); color: var(--sb-navy);
	font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0;
}
.stem-boek-form__stepper-btn:hover { background: #dfeaf5; }
.stem-boek-form__stepper-btn:focus-visible { outline: 3px solid var(--sb-yellow); outline-offset: -3px; }
.stem-boek-form .stem-boek-form__stepper input[type="number"] {
	width: 4rem; border: 0; border-radius: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield;
}
.stem-boek-form__stepper input::-webkit-outer-spin-button,
.stem-boek-form__stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Bijdrage */
.stem-boek-form__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.stem-boek-form__chip { position: relative; }
.stem-boek-form__chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.stem-boek-form__chip span {
	display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1.1rem;
	border: 1.5px solid var(--sb-line); border-radius: 999px; background: #fff; font-weight: 600; color: var(--sb-navy);
}
.stem-boek-form__chip:hover span { border-color: var(--sb-blue); }
.stem-boek-form__chip input:checked + span { background: var(--sb-blue); border-color: var(--sb-blue); color: #fff; }
.stem-boek-form__chip input:focus-visible + span { outline: 3px solid var(--sb-yellow); outline-offset: 2px; }
.stem-boek-form__field--custom { margin-top: .9rem; max-width: 12rem; }
.stem-boek-form__money { position: relative; }
.stem-boek-form__money span { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--sb-muted); }
.stem-boek-form .stem-boek-form__money input { padding-left: 1.9rem; }

/* Afronden */
.stem-boek-form__finish { display: grid; gap: 1.1rem; }
.stem-boek-form__finish .stem-boek-summary { margin-bottom: .25rem; }
.stem-boek-form__field--check { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; align-items: start; margin: 0; }
.stem-boek-form__field--check input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; accent-color: var(--sb-blue); }
.stem-boek-form__field--check label { font-weight: 400; margin: 0; color: var(--sb-ink); }
.stem-boek-form__field--check .stem-boek-form__error { grid-column: 2; }
.stem-boek-form__error { color: var(--sb-error); font-size: .9rem; font-weight: 600; margin: .35rem 0 0; }
.stem-boek-form__notice {
	border-left: 4px solid var(--sb-error); background: #fdf0ee; color: #7a1a12;
	padding: .85rem 1rem; margin: 0 0 1.75rem; border-radius: 0 8px 8px 0;
}
.stem-boek-form__notice:focus { outline: none; }
.stem-boek-form__finish .stem-boek-form__notice { margin: 0; }
.stem-boek-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.stem-boek-form .cf-turnstile { margin: 0; }
.stem-boek-form .cf-turnstile:empty { display: none; }

.stem-boek-form__button,
.stem-boek-bar .stem-boek-form__button {
	display: inline-flex; align-items: center; justify-content: center;
	width: 100%; min-height: 54px; padding: .85rem 1.5rem;
	border: 0; border-radius: 8px;
	background: var(--sb-navy); color: #fff;
	font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer;
	transition: background-color .15s;
}
.stem-boek-form__button:hover { background: var(--sb-blue-dark); }
.stem-boek-form__button:focus-visible { outline: 3px solid var(--sb-yellow); outline-offset: 2px; }
.stem-boek-form__button:disabled { opacity: .65; cursor: progress; }
@media (min-width: 561px) { .stem-boek-form__finish .stem-boek-form__button { width: auto; justify-self: start; } }
.stem-boek-form__small { font-size: .85rem; color: var(--sb-muted); margin: 0; }

/* Vaste balk onderin op mobiel */
.stem-boek-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
	display: flex; align-items: center; gap: 1rem;
	padding: .75rem 16px calc(.75rem + env(safe-area-inset-bottom));
	background: #fff; border-top: 1px solid #cbd9e7;
	box-shadow: 0 -6px 18px rgba(5, 29, 83, .08);
	font-family: inherit; color: #123554;
}
.stem-boek-bar__total { display: grid; line-height: 1.2; }
.stem-boek-bar__label { font-size: .8rem; color: #52657a; }
.stem-boek-bar__total strong { font-size: 1.2rem; color: #051d53; font-variant-numeric: tabular-nums; }
.stem-boek-bar .stem-boek-bar__button { flex: 1; min-height: 48px; font-size: 1rem; background: #051d53; }

/* Resultaat na betalen */
.stem-boek-result { padding: 1.5rem 1.6rem; border-radius: var(--sb-radius); background: var(--sb-mist); border-left: 5px solid var(--sb-blue); }
.stem-boek-result--pending { background: #fff8e1; border-left-color: #c99a06; }
.stem-boek-result .stem-boek-result__title { margin: 0 0 .5rem; color: var(--sb-navy); font-size: 1.4rem; }
.stem-boek-result p { margin: 0; }

/* ---------- Desktop: formulier links, zijbalk rechts ---------- */
@media (min-width: 960px) {
	.stem-boek { grid-template-columns: minmax(0, 640px) 340px; justify-content: space-between; column-gap: 3rem; align-items: start; }
	.stem-boek > .stem-boek-event--strip { display: none; }
	.stem-boek__main { grid-column: 1; grid-row: 1; }
	.stem-boek__aside { grid-column: 2; grid-row: 1; position: sticky; top: var(--sb-sticky-top); }
	.stem-boek__aside .stem-boek-event--card { display: grid; }
	.stem-boek__aside .stem-boek-summary { display: block; }
	.stem-boek-form__finish .stem-boek-summary { display: none; }
	.stem-boek-bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.stem-boek *, .stem-boek-bar { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Paginakop (Elementor-widgets met deze classes) ---------- */
.elementor-element.stem-boek__intro { max-width: 42rem !important; } /* Elementor zet flex-kinderen op 100%. */

/* ---------- Kop met cover (Elementor-containers met deze classes) ---------- */
.elementor-element.stem-boek-hero { gap: 2rem 4rem; align-items: center; margin-bottom: 2.75rem; }
.elementor-element.stem-boek-hero__text {
	flex: 1 1 auto; min-width: 0;
	/* Never wrap the stacked title/subtitle/intro into a second column (Safari computed a 0 height with flex-basis 0). */
	--flex-wrap: nowrap; flex-wrap: nowrap !important;
}
.elementor-element.stem-boek__subtitle .elementor-heading-title {
	font-size: 1.3rem; font-style: italic; font-weight: 400; color: #051d53; margin: -.25rem 0 .5rem;
}
.elementor-element.stem-boek__cover { flex: 0 0 auto; width: 300px !important; max-width: 300px !important; }
.elementor-element.stem-boek__cover img { display: block; width: 100%; height: auto; }
@media (max-width: 1024px) {
	.elementor-element.stem-boek__cover { width: 240px !important; }
}
@media (max-width: 767px) {
	.elementor-element.stem-boek-hero { gap: 1.5rem; margin-bottom: 2rem; }
	.elementor-element.stem-boek-hero__text { flex: 0 0 auto !important; width: 100% !important; }
	.elementor-element.stem-boek__cover { width: 200px !important; align-self: center; }
}

/* ---------- Cover in het overzicht ---------- */
.stem-boek-summary__head { display: flex; gap: .9rem; align-items: center; margin-bottom: .75rem; }
.stem-boek-summary__cover { flex: none; width: 52px; height: auto; border-radius: 3px; box-shadow: 0 3px 10px rgba(5, 29, 83, .25); }
.stem-boek-summary .stem-boek-summary__title { margin: 0; }
.stem-boek-summary__book { margin: .1rem 0 0; font-size: .85rem; color: var(--sb-muted); line-height: 1.35; }

/* ---------- Over het boek (samenvatting in de kop) ---------- */
.elementor-element.stem-boek__over-kop .elementor-heading-title {
	font-size: 1.15rem; font-weight: 700; color: #051d53; margin: .75rem 0 0;
}
.elementor-element.stem-boek__samenvatting { max-width: 42rem !important; }
.elementor-element.stem-boek__samenvatting p { margin: 0 0 .9em; }
.elementor-element.stem-boek__samenvatting p:last-child { margin-bottom: 0; }
/* Bestelinfo onder de samenvatting: dunne lijn als overgang naar het formulier. */
.elementor-element.stem-boek__intro { border-top: 1px solid #cbd9e7; padding-top: 1.1rem; }
