/* OliForms. Aan te passen met CSS-variabelen op .olf of :root. */
.olf {
	--olf-ink: var(--color-ink, #1f2733);
	--olf-accent: var(--color-accent, #2d3952);
	--olf-on-accent: #fff;
	--olf-line: #b9bec7;
	--olf-field-bg: #fff;
	--olf-muted: #4a5670;
	--olf-error: #a4262c;
	--olf-radius: 2px;
	--olf-gap: 20px;
	color: var(--olf-ink);
	font-family: var(--font-body, inherit);
	font-size: 16px;
	line-height: 1.5;
}
.olf *, .olf *::before, .olf *::after { box-sizing: border-box; }
.olf [hidden] { display: none !important; }

.olf-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--olf-gap); }
.olf-field { grid-column: span 6; min-width: 0; margin: 0; }
.olf-w-half { grid-column: span 3; }
.olf-w-third { grid-column: span 2; }
@media (max-width: 640px) {
	.olf-w-half, .olf-w-third { grid-column: span 6; }
}

.olf-label, .olf legend.olf-label { display: block; margin: 0 0 6px; padding: 0; font-weight: 600; font-size: 15px; }
.olf-req { color: var(--olf-error); }
.olf-choices { border: 0; margin: 0; padding: 0; min-width: 0; }

.olf .olf-input {
	display: block; width: 100%; min-height: 48px; padding: 10px 12px;
	font: inherit; color: inherit; background: var(--olf-field-bg);
	border: 1px solid var(--olf-line); border-radius: var(--olf-radius);
}
.olf .olf-file { padding: 10px; min-height: 0; cursor: pointer; }
.olf .olf-file::file-selector-button {
	margin-right: 12px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;
	color: var(--olf-accent); background: transparent; border: 1px solid var(--olf-accent); border-radius: var(--olf-radius);
}
.olf textarea.olf-input { min-height: 120px; resize: vertical; }
.olf .olf-input:focus-visible, .olf .olf-choice input:focus-visible, .olf .olf-submit:focus-visible {
	outline: 3px solid var(--olf-accent); outline-offset: 2px;
}

.olf-choices-list { display: grid; gap: 8px; }
.olf-choice { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.olf-choice input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--olf-accent); }
.olf-choice-text small { display: block; color: var(--olf-muted); font-size: 14px; }

/* Drie klassen diep, zodat de alineastijl van een thema of paginabouwer (p { font-size, margin }) dit niet overschrijft. */
.olf .olf-form .olf-help { margin: 6px 0 0; color: var(--olf-muted); font-size: 14px; line-height: 1.45; }
.olf .olf-form .olf-error { margin: 6px 0 0; color: var(--olf-error); font-size: 14px; line-height: 1.45; font-weight: 600; }
.olf-error:empty { display: none; }
.olf-has-error .olf-input { border-color: var(--olf-error); border-width: 2px; }

.olf-message { margin: 0 0 var(--olf-gap); padding: 12px 14px; border-left: 4px solid var(--olf-error); background: #fbeceb; color: var(--olf-error); font-weight: 600; }
.olf-message:empty { display: none; }
.olf-success { padding: 18px 20px; border-left: 4px solid var(--olf-accent); background: rgba(0, 0, 0, .04); }
.olf-success p { margin: 0 0 .6em; }
.olf-success p:last-child { margin-bottom: 0; }

.olf-actions { margin-top: var(--olf-gap); }
.olf-turnstile { margin-top: var(--olf-gap); }
.olf .olf-submit {
	min-height: 48px; padding: 12px 26px; font: inherit; font-weight: 600; cursor: pointer;
	color: var(--olf-on-accent); background: var(--olf-accent); border: 0; border-radius: var(--olf-radius);
}
.olf .olf-submit:hover { filter: brightness(1.12); color: var(--olf-on-accent); background: var(--olf-accent); }
.olf-form.is-busy .olf-submit { opacity: .6; cursor: progress; }

/* Lokveld: onzichtbaar voor bezoekers, ook met een schermlezer. */
.olf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Tussenkop en toelichting in een lang formulier. */
.olf .olf-form .olf-sectie { margin: 12px 0 0; padding-top: 18px; border-top: 1px solid var(--olf-line); font-family: var(--font-heading, inherit); font-size: 20px; line-height: 1.3; font-weight: 700; }
.olf .olf-form .olf-noot { margin: 0; padding: 12px 14px; border-left: 4px solid var(--olf-accent); background: rgba(0, 0, 0, .04); font-size: 15px; line-height: 1.5; }

/* Keuze als tegels (bijvoorbeeld de soort inzending bovenaan). */
.olf-tegels .olf-choices-list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.olf-tegels .olf-choice { position: relative; padding: 16px 16px 14px; border: 1px solid var(--olf-line); border-radius: var(--olf-radius); background: var(--olf-field-bg); }
.olf-tegels .olf-choice:has(input:checked) { border-color: var(--olf-accent); box-shadow: inset 0 0 0 1px var(--olf-accent); }
.olf-tegels .olf-choice-text { font-weight: 600; }
.olf-tegels .olf-choice-text small { font-weight: 400; margin-top: 2px; }
