/* Alltherm aanvraagformulier. Alles is gescoped op .ath-form zodat het thema niet botst. */
.ath-form {
	--ath-accent: #0f5c8c;
	--ath-text: #1f2933;
	--ath-muted: #5b6770;
	--ath-border: #c9d1d8;
	--ath-error: #b42318;
	--ath-tint: rgba(15, 92, 140, .07);
	max-width: 820px;
	margin: 0 auto;
	color: var(--ath-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.ath-form *, .ath-form *::before, .ath-form *::after { box-sizing: inherit; }
.ath-form [hidden] { display: none !important; }
.ath-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.ath-form .ath-step { margin: 0 0 32px; }
.ath-form .ath-step__title {
	display: block;
	width: 100%;
	padding: 0 0 8px;
	margin: 0 0 16px;
	border-bottom: 2px solid var(--ath-accent);
	font-size: 20px;
	font-weight: 700;
	color: var(--ath-text);
}

/* Tegels */
.ath-form .ath-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ath-form .ath-tile { display: block; position: relative; margin: 0; cursor: pointer; }
.ath-form .ath-tile input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ath-form .ath-tile__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 100%;
	min-height: 140px;
	padding: 20px 12px;
	background: #fff;
	border: 2px solid var(--ath-border);
	border-radius: 8px;
	text-align: center;
	transition: border-color .15s, background-color .15s;
}
.ath-form .ath-tile__icon { width: auto; height: 40px; fill: var(--ath-muted); transition: fill .15s; }
.ath-form .ath-tile__label { font-size: 17px; font-weight: 700; }
.ath-form .ath-tile:hover .ath-tile__box { border-color: var(--ath-accent); }
.ath-form .ath-tile input:checked + .ath-tile__box { border-color: var(--ath-accent); background: var(--ath-tint); box-shadow: inset 0 0 0 1px var(--ath-accent); }
.ath-form .ath-tile input:checked + .ath-tile__box .ath-tile__icon { fill: var(--ath-accent); }
.ath-form .ath-tile input:focus-visible + .ath-tile__box { outline: 3px solid var(--ath-accent); outline-offset: 2px; }

/* Velden */
.ath-form .ath-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ath-form .ath-field--full { grid-column: 1 / -1; }
.ath-form .ath-step > .ath-field { margin-bottom: 16px; }
.ath-form .ath-field > label,
.ath-form .ath-choice > legend { display: block; padding: 0; margin: 0 0 6px; font-weight: 600; font-size: 15px; color: var(--ath-text); }
.ath-form .ath-req { color: var(--ath-error); }
.ath-form .ath-hint { margin: 0 0 8px; font-size: 14px; color: var(--ath-muted); }

.ath-form input[type="text"],
.ath-form input[type="tel"],
.ath-form input[type="email"],
.ath-form textarea {
	display: block;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--ath-border);
	border-radius: 6px;
	box-shadow: none;
	color: var(--ath-text);
	font: inherit;
}
.ath-form textarea { resize: vertical; }
.ath-form input:focus-visible,
.ath-form textarea:focus-visible { outline: 2px solid var(--ath-accent); outline-offset: 1px; border-color: var(--ath-accent); }

.ath-form .ath-choice label { display: inline-flex; align-items: center; gap: 8px; margin: 4px 20px 4px 0; font-weight: 400; cursor: pointer; }
.ath-form .ath-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--ath-accent); }

/* Foto's */
.ath-form .ath-file { display: block; width: 100%; padding: 10px; background: #fff; border: 1px dashed var(--ath-border); border-radius: 6px; font: inherit; font-size: 15px; }
.ath-form .ath-files { list-style: none; margin: 12px 0 0; padding: 0; }
.ath-form .ath-files li { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 6px; border: 1px solid var(--ath-border); border-radius: 6px; }
.ath-form .ath-files img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex: none; }
.ath-form .ath-files span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ath-form .ath-files button { flex: none; min-height: 36px; margin: 0; padding: 4px 12px; background: transparent; border: 1px solid var(--ath-border); border-radius: 4px; color: var(--ath-text); font: inherit; font-size: 14px; cursor: pointer; }

/* Akkoord */
.ath-form .ath-consent { margin-top: 20px; }
.ath-form .ath-consent > label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; }
.ath-form .ath-consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ath-accent); }

/* Spamval: onzichtbaar voor bezoekers */
.ath-form .ath-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Meldingen */
.ath-form .ath-error { display: block; margin-top: 6px; color: var(--ath-error); font-size: 14px; font-weight: 600; }
.ath-form [aria-invalid="true"] { border-color: var(--ath-error) !important; }
.ath-form .ath-note { margin: -16px 0 16px; font-size: 14px; color: var(--ath-muted); }
.ath-form .ath-status { margin: 0 0 16px; padding: 12px 14px; background: #fef3f2; border: 1px solid var(--ath-error); border-radius: 6px; color: var(--ath-error); font-weight: 600; }

/* Knop */
.ath-form .ath-submit {
	display: block;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 14px 24px;
	background: var(--ath-accent);
	border: 0;
	border-radius: 6px;
	color: #fff;
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	cursor: pointer;
	transition: filter .15s;
}
.ath-form .ath-submit:hover { filter: brightness(.9); }
.ath-form .ath-submit:focus-visible { outline: 3px solid var(--ath-accent); outline-offset: 2px; }
.ath-form .ath-submit[disabled] { opacity: .65; cursor: wait; }

/* Bevestiging */
.ath-thanks {
	max-width: 820px;
	margin: 0 auto;
	padding: 28px 24px;
	background: #ecfdf3;
	border: 1px solid #1a7f4b;
	border-radius: 8px;
	color: #14532d;
	font-size: 18px;
	font-weight: 600;
	text-align: center;
}
.ath-thanks:focus { outline: none; }

@media (max-width: 640px) {
	.ath-form .ath-tiles { grid-template-columns: 1fr; gap: 10px; }
	.ath-form .ath-tile__box { flex-direction: row; justify-content: flex-start; min-height: 68px; padding: 12px 16px; text-align: left; }
	.ath-form .ath-tile__icon { height: 30px; }
	.ath-form .ath-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.ath-form * { transition: none !important; }
}
