/**
 * Brakenhoff Offerteformulier
 * Pas de kleuren aan via de variabelen hieronder.
 */

.bh-offerte_wrapper,
form.bh-offerte {
	--bh-accent: #3d0605;
	--bh-accent-tekst: #ffffff;
	--bh-rand: #ddd6d2;
	--bh-vlak: #ffffff;
	--bh-vlak-zacht: #f6f3f1;
	--bh-tekst: inherit;
	--bh-radius: 0;

	/* Orbital-thema van Gravity Forms (best effort, onbekende variabelen worden genegeerd) */
	--gf-color-primary: var(--bh-accent);
	--gf-color-primary-contrast: var(--bh-accent-tekst);
	--gf-radius: var(--bh-radius);
}

/* ------------------------------------------------------------------ stappenteller */

.bh-offerte .bh-stappen {
	margin: 0 0 24px;
}

.bh-offerte .bh-stappen.bh-verborgen {
	display: none;
}

.bh-offerte .bh-stappen__tekst {
	font-size: 0.875em;
	font-weight: 600;
	margin-bottom: 8px;
	letter-spacing: 0.02em;
}

.bh-offerte .bh-stappen__balk {
	height: 4px;
	background: var(--bh-rand);
	overflow: hidden;
}

.bh-offerte .bh-stappen__balk span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--bh-accent);
	transition: width 0.3s ease;
}

/* ------------------------------------------------------------------ ruimtes (accordeon) */

.bh-offerte .gsection.kamer {
	cursor: pointer;
	margin: 8px 0 0;
	padding: 16px 20px;
	border: 1px solid var(--bh-rand);
	border-radius: var(--bh-radius);
	background: var(--bh-vlak);
	transition: border-color 0.2s ease, background-color 0.2s ease;
	user-select: none;
}

.bh-offerte .gsection.kamer:hover,
.bh-offerte .gsection.kamer:focus-visible {
	border-color: var(--bh-accent);
}

.bh-offerte .gsection.kamer:focus-visible {
	outline: 2px solid var(--bh-accent);
	outline-offset: 2px;
}

.bh-offerte .gsection.kamer.bh-open {
	background: var(--bh-vlak-zacht);
	border-color: var(--bh-accent);
}

.bh-offerte .gsection.kamer .gsection_title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1.1em;
	line-height: 1.3;
}

.bh-offerte .gsection.kamer .gsection_title::after {
	content: "";
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	margin-left: 4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.2s ease;
}

.bh-offerte .gsection.kamer.bh-open .gsection_title::after {
	transform: translateY(2px) rotate(-135deg);
}

.bh-offerte .bh-badge {
	margin-left: auto;
	padding: 3px 10px;
	font-size: 0.8em;
	font-weight: 600;
	white-space: nowrap;
	background: var(--bh-accent);
	color: var(--bh-accent-tekst);
	border-radius: var(--bh-radius);
}

.bh-offerte .bh-badge:empty {
	display: none;
}

.bh-offerte .bh-dicht {
	display: none !important;
}

/* ------------------------------------------------------------------ items */

.bh-offerte .inboedel-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 16px 12px;
	text-align: center;
	border: 1px solid var(--bh-rand);
	border-radius: var(--bh-radius);
	background: var(--bh-vlak);
	transition: border-color 0.2s ease;
}

.bh-offerte .inboedel-item.bh-gekozen {
	border-color: var(--bh-accent);
	box-shadow: inset 0 0 0 1px var(--bh-accent);
}

.bh-offerte .inboedel-item .bh-icoon {
	display: block;
	width: 64px;
	height: 64px;
	margin: 0 auto 8px;
	object-fit: contain;
}

.bh-offerte .inboedel-item .gfield_label {
	display: block;
	margin: 0 0 10px;
	font-weight: 500;
}

.bh-offerte .inboedel-item .ginput_container {
	margin-top: auto;
}

.bh-offerte .bh-teller {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--bh-rand);
	border-radius: var(--bh-radius);
	background: var(--bh-vlak);
}

.bh-offerte .bh-stap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--bh-accent);
	font-size: 22px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}

.bh-offerte .bh-stap:hover,
.bh-offerte .bh-stap:focus-visible {
	background: var(--bh-accent);
	color: var(--bh-accent-tekst);
}

.bh-offerte .bh-teller input[type="number"],
.bh-offerte .bh-teller input[type="text"] {
	width: 56px !important;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 !important;
	text-align: center;
	font-weight: 600;
	border: 0 !important;
	border-left: 1px solid var(--bh-rand) !important;
	border-right: 1px solid var(--bh-rand) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent;
	-moz-appearance: textfield;
	appearance: textfield;
}

.bh-offerte .bh-teller input::-webkit-outer-spin-button,
.bh-offerte .bh-teller input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Bereik-instructie (0 tot 50) niet onder elk item tonen; foutmeldingen blijven zichtbaar. */
.bh-offerte .inboedel-item .instruction {
	display: none;
}

.bh-offerte .inboedel-item .gfield_validation_message,
.bh-offerte .inboedel-item .validation_message {
	flex-basis: 100%;
	margin-top: 8px;
}

/* ------------------------------------------------------------------ totaal */

.bh-offerte .bh-totaal-sectie {
	margin-top: 24px;
}

.bh-offerte .inboedel-totaal input {
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	font-size: 1.6em;
	font-weight: 700;
	color: var(--bh-accent);
}

/* ------------------------------------------------------------------ mobiel */

@media (max-width: 640px) {
	.bh-offerte .inboedel-item {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 12px;
		padding: 10px 12px;
		text-align: left;
	}

	.bh-offerte .inboedel-item .bh-icoon {
		width: 40px;
		height: 40px;
		margin: 0;
	}

	.bh-offerte .inboedel-item .gfield_label {
		flex: 1 1 0;
		min-width: 0;
		margin: 0;
	}

	.bh-offerte .inboedel-item .ginput_container {
		margin: 0;
	}

	.bh-offerte .bh-stap {
		width: 40px;
		height: 40px;
	}

	.bh-offerte .bh-teller input[type="number"],
	.bh-offerte .bh-teller input[type="text"] {
		width: 44px !important;
		height: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bh-offerte .bh-stappen__balk span,
	.bh-offerte .gsection.kamer,
	.bh-offerte .gsection.kamer .gsection_title::after {
		transition: none;
	}
}
