/* Tacho E-learning: cursusomgeving en bestelformulier.
   Lettertypes komen van het thema, kleuren uit de plugin-instellingen. */

.tel-wrap {
	--tel-primary: #0f172a;
	--tel-accent: #f59e0b;
	--tel-text: #0f172a;
	--tel-muted: #5b6678;
	--tel-line: #dfe3ea;
	--tel-soft: #f4f6f9;
	--tel-card: #ffffff;
	--tel-good: #15803d;
	--tel-good-bg: #ecfdf3;
	--tel-bad: #b91c1c;
	--tel-bad-bg: #fef2f2;
	--tel-radius: 12px;

	color: var(--tel-text);
	max-width: 880px;
	margin: 0 auto;
	padding: 8px 16px 48px;
	font-size: 16px;
	line-height: 1.6;
	text-align: left;
	box-sizing: border-box;
}

.tel-wrap *,
.tel-wrap *::before,
.tel-wrap *::after {
	box-sizing: border-box;
}

.tel-wrap a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tel-wrap :focus-visible {
	outline: 3px solid var(--tel-accent);
	outline-offset: 2px;
}

/* Tekst */

.tel-title {
	margin: 0 0 8px;
	font-size: clamp(1.6rem, 4vw, 2.2rem);
	line-height: 1.15;
	color: var(--tel-primary);
}

.tel-h2 {
	margin: 0 0 12px;
	font-size: clamp(1.3rem, 3vw, 1.6rem);
	line-height: 1.2;
	color: var(--tel-primary);
}

.tel-h3 {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
	color: var(--tel-primary);
}

.tel-lead {
	margin: 0 0 16px;
	color: var(--tel-muted);
	max-width: 68ch;
}

.tel-muted {
	color: var(--tel-muted);
	font-size: 0.92rem;
}

.tel-center {
	text-align: center;
}

.tel-center .tel-lead {
	margin-left: auto;
	margin-right: auto;
}

/* Kaarten en secties */

.tel-card {
	background: var(--tel-card);
	border: 1px solid var(--tel-line);
	border-radius: var(--tel-radius);
	padding: clamp(20px, 4vw, 32px);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
}

.tel-card--narrow {
	max-width: 520px;
	margin: 24px auto;
}

.tel-section {
	margin-top: 40px;
	scroll-margin-top: 96px;
}

/* Kop van de cursusomgeving */

.tel-header {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
	align-items: flex-start;
	justify-content: space-between;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--tel-line);
}

.tel-header > div:first-child {
	flex: 1 1 320px;
}

.tel-header .tel-lead {
	margin-bottom: 0;
}

.tel-session {
	display: flex;
	flex-direction: column;
	gap: 2px;
	align-items: flex-start;
	padding: 12px 16px;
	background: var(--tel-soft);
	border-radius: var(--tel-radius);
	font-size: 0.92rem;
}

.tel-session-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--tel-primary);
}

.tel-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--tel-accent);
	color: #111827;
	font-size: 0.82rem;
	font-weight: 700;
}

.tel-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 20px;
}

.tel-wrap .tel-nav a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--tel-line);
	border-radius: 999px;
	background: var(--tel-card);
	color: var(--tel-primary);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
}

.tel-wrap .tel-nav a:hover {
	border-color: var(--tel-primary);
}

.tel-nav span {
	min-width: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--tel-soft);
	color: var(--tel-muted);
	font-size: 0.8rem;
	text-align: center;
}

/* Video's */

.tel-videos,
.tel-questions {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tel-video {
	margin: 0 0 24px;
	padding: clamp(16px, 3vw, 24px);
	background: var(--tel-card);
	border: 1px solid var(--tel-line);
	border-radius: var(--tel-radius);
}

.tel-video-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.tel-num {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--tel-primary);
	color: #ffffff;
	font-weight: 700;
	font-size: 0.95rem;
}

.tel-summary {
	color: var(--tel-muted);
	margin-bottom: 14px;
}

.tel-summary p {
	margin: 0 0 8px;
}

.tel-player {
	position: relative;
	background: #000000;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.tel-player video {
	display: block;
	width: 100%;
	height: 100%;
	background: #000000;
}

/* Formulieren */

.tel-form {
	display: block;
	margin: 0;
}

.tel-label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--tel-primary);
}

.tel-wrap .tel-input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #b8c0cc;
	border-radius: 8px;
	background: #ffffff;
	color: var(--tel-text);
	font: inherit;
	line-height: 1.4;
}

.tel-wrap .tel-input:focus {
	border-color: var(--tel-primary);
}

.tel-wrap .tel-input[readonly] {
	background: var(--tel-soft);
	color: var(--tel-muted);
}

.tel-wrap .tel-input--code {
	margin-bottom: 16px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.tel-hint {
	display: block;
	margin-top: 6px;
	color: var(--tel-muted);
	font-size: 0.88rem;
}

.tel-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 20px 0;
}

.tel-field--wide {
	grid-column: 1 / -1;
}

.tel-form--inline {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	margin-bottom: 8px;
}

.tel-form--inline .tel-field {
	flex: 1 1 260px;
}

.tel-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tel-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 20px 0;
	font-size: 0.95rem;
	cursor: pointer;
}

.tel-check input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 3px 0 0;
	accent-color: var(--tel-primary);
}

/* Knoppen */

.tel-wrap .tel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid var(--tel-accent);
	border-radius: 8px;
	background: var(--tel-accent);
	color: #111827;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.05s ease;
}

.tel-wrap .tel-btn:hover {
	filter: brightness(0.95);
}

.tel-wrap .tel-btn:active {
	transform: translateY(1px);
}

.tel-wrap .tel-btn--ghost {
	background: transparent;
	border-color: var(--tel-primary);
	color: var(--tel-primary);
}

.tel-wrap .tel-btn--wide {
	width: 100%;
}

.tel-card--narrow .tel-form > .tel-btn {
	width: 100%;
}

.tel-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0 0;
}

.tel-link {
	font-weight: 600;
}

/* Meldingen */

.tel-notice {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: 8px;
	border: 1px solid transparent;
	font-size: 0.95rem;
}

.tel-notice--error {
	background: var(--tel-bad-bg);
	border-color: #fecaca;
	color: #7f1d1d;
}

.tel-notice--info {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1e3a8a;
}

/* Toets */

.tel-scoreline {
	margin: 0 0 16px;
	padding: 12px 16px;
	background: var(--tel-soft);
	border-radius: 8px;
}

.tel-q {
	margin: 0 0 16px;
	padding: clamp(16px, 3vw, 22px);
	background: var(--tel-card);
	border: 1px solid var(--tel-line);
	border-radius: var(--tel-radius);
}

.tel-q fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.tel-q-text {
	display: block;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.4;
	color: var(--tel-primary);
}

.tel-q-num {
	color: var(--tel-muted);
	font-variant-numeric: tabular-nums;
}

.tel-q-image {
	display: block;
	max-width: min(100%, 360px);
	height: auto;
	margin: 0 0 12px;
	border-radius: 8px;
	border: 1px solid var(--tel-line);
}

.tel-option {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0 0 8px;
	padding: 12px 14px;
	border: 1px solid var(--tel-line);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.tel-option:hover {
	border-color: #94a3b8;
}

.tel-option:has(input:checked) {
	border-color: var(--tel-primary);
	background: var(--tel-soft);
}

.tel-option input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 3px 0 0;
	accent-color: var(--tel-primary);
}

.tel-quiz > .tel-btn {
	margin-top: 8px;
}

/* Resultaat */

.tel-result {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
	margin: 0 0 24px;
	padding: clamp(18px, 3vw, 26px);
	border-radius: var(--tel-radius);
	border: 1px solid var(--tel-line);
}

.tel-result p {
	margin: 6px 0 0;
}

.tel-result--pass {
	background: var(--tel-good-bg);
	border-color: #bbf7d0;
}

.tel-result--fail {
	background: var(--tel-bad-bg);
	border-color: #fecaca;
}

.tel-result-score {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 104px;
	height: 104px;
	padding: 0 12px;
	border-radius: 50%;
	background: #ffffff;
	font-size: 1.7rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.tel-result--pass .tel-result-score {
	color: var(--tel-good);
	box-shadow: inset 0 0 0 4px var(--tel-good);
}

.tel-result--fail .tel-result-score {
	color: var(--tel-bad);
	box-shadow: inset 0 0 0 4px var(--tel-bad);
}

.tel-result > div:last-child {
	flex: 1 1 260px;
}

.tel-q--right {
	border-left: 4px solid var(--tel-good);
}

.tel-q--wrong {
	border-left: 4px solid var(--tel-bad);
}

.tel-mark {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 10px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	vertical-align: middle;
}

.tel-q--right .tel-mark {
	background: var(--tel-good-bg);
	color: var(--tel-good);
}

.tel-q--wrong .tel-mark {
	background: var(--tel-bad-bg);
	color: var(--tel-bad);
}

.tel-review {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.tel-review li {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	justify-content: space-between;
	margin: 0 0 6px;
	padding: 10px 14px;
	border: 1px solid var(--tel-line);
	border-radius: 8px;
}

.tel-review em {
	font-style: normal;
	font-weight: 700;
	font-size: 0.85rem;
	white-space: nowrap;
}

.tel-review .is-correct {
	background: var(--tel-good-bg);
	border-color: #86efac;
}

.tel-review .is-correct em {
	color: var(--tel-good);
}

.tel-review .is-wrong {
	background: var(--tel-bad-bg);
	border-color: #fca5a5;
}

.tel-review .is-wrong em {
	color: var(--tel-bad);
}

.tel-explain {
	padding: 12px 14px;
	background: var(--tel-soft);
	border-radius: 8px;
	font-size: 0.95rem;
}

.tel-explain strong {
	display: block;
	margin-bottom: 2px;
	color: var(--tel-primary);
}

.tel-explain p {
	margin: 0 0 6px;
}

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

/* Bestellen */

.tel-totals {
	width: 100%;
	margin: 8px 0 0;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.tel-wrap .tel-totals th,
.tel-wrap .tel-totals td {
	padding: 8px 0;
	border: 0;
	border-bottom: 1px solid var(--tel-line);
	background: none;
	font-weight: 400;
	text-align: left;
}

.tel-wrap .tel-totals td {
	text-align: right;
	white-space: nowrap;
}

.tel-wrap .tel-totals-sum th,
.tel-wrap .tel-totals-sum td {
	border-bottom: 0;
	padding-top: 12px;
	font-weight: 800;
	font-size: 1.15rem;
	color: var(--tel-primary);
}

.tel-codebox {
	margin: 0 0 10px;
	padding: 14px 16px;
	border: 1px dashed #94a3b8;
	border-radius: 8px;
	background: var(--tel-soft);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--tel-primary);
	user-select: all;
	overflow-wrap: anywhere;
}

.tel-codebox + p {
	margin-top: 20px;
}

@media (max-width: 600px) {
	.tel-grid {
		grid-template-columns: 1fr;
	}

	.tel-session {
		width: 100%;
	}

	.tel-result {
		flex-direction: column;
		align-items: flex-start;
	}

	.tel-form--inline .tel-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tel-wrap * {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	.tel-player,
	.tel-nav,
	.tel-session a {
		display: none;
	}
}

/* Watermerk en eigen volledig scherm (zodat het watermerk ook dan zichtbaar blijft) */

.tel-wm {
	position: absolute;
	z-index: 2;
	left: 6%;
	top: 10%;
	max-width: 88%;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.4);
	font-size: clamp(11px, 1.7vw, 17px);
	font-weight: 700;
	letter-spacing: 0.05em;
	white-space: nowrap;
	text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
	pointer-events: none;
	user-select: none;
	transition: left 1.5s ease, top 1.5s ease;
}

.tel-wrap .tel-fs {
	position: absolute;
	z-index: 3;
	top: 8px;
	right: 8px;
	padding: 6px 10px;
	border: 0;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.55);
	color: #ffffff;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	opacity: 0.85;
}

.tel-wrap .tel-fs:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.8);
}

.tel-player:fullscreen {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	border-radius: 0;
}

.tel-player:-webkit-full-screen {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	border-radius: 0;
}

.tel-player:fullscreen video,
.tel-player:-webkit-full-screen video {
	object-fit: contain;
}
