/* Huber Formulare – Frontend. Farben/Maße kommen als CSS-Variablen aus den Einstellungen (:root). */

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

.hf-wrap {
	font-family: var(--hf-font, inherit);
	font-size: var(--hf-font-size, 16px);
	color: var(--hf-text, #00184d);
	line-height: 1.5;
}

.hf-wrap [hidden] {
	display: none !important;
}

/* ---- Raster: Zeile → Spalten → Felder (12er-Raster) ------------------ */
.hf-wrap .hf-row {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--hf-gap, 20px);
}

.hf-wrap .hf-cell {
	grid-column: span var(--hf-span, 12);
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--hf-gap, 20px);
	align-content: start;
	min-width: 0;
}

.hf-wrap .hf-field {
	grid-column: span var(--hf-span, 12);
	position: relative;
	min-width: 0;
	margin: 0 0 var(--hf-gap, 20px);
}

.hf-wrap .hf-field.hf-newline {
	grid-column: 1 / span var(--hf-span, 12);
}

@media (max-width: 680px) {
	.hf-wrap .hf-cell,
	.hf-wrap .hf-field,
	.hf-wrap .hf-field.hf-newline {
		grid-column: 1 / -1;
	}
}

/* ---- Beschriftung -------------------------------------------------- */
.hf-wrap .hf-field {
	display: flex;
	flex-direction: column;
}

.hf-wrap .hf-label-wrap {
	order: 1;
}

.hf-wrap .hf-input-wrap {
	order: 2;
}

.hf-wrap .hf-desc {
	order: 3;
}

.hf-wrap .hf-error {
	order: 4;
}

.hf-wrap .hf-label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: var(--hf-label-size, 16px);
	font-weight: var(--hf-label-weight, 600);
	line-height: 1.3;
	color: var(--hf-label, #052365);
}

.hf-wrap .hf-req {
	color: var(--hf-error, #e80000);
}

.hf-wrap .hf-label-below .hf-label-wrap {
	order: 3;
}

.hf-wrap .hf-label-below .hf-label {
	margin: 8px 0 0;
}

.hf-wrap .hf-label-below .hf-desc {
	order: 4;
}

.hf-wrap .hf-label-below .hf-error {
	order: 5;
}

.hf-wrap .hf-label-left,
.hf-wrap .hf-label-right {
	display: grid;
	grid-template-columns: 35% minmax(0, 1fr);
	column-gap: 2%;
	align-items: start;
}

.hf-wrap .hf-label-left .hf-label-wrap {
	grid-column: 1;
	grid-row: 1;
}

.hf-wrap .hf-label-left .hf-input-wrap {
	grid-column: 2;
	grid-row: 1;
}

.hf-wrap .hf-label-right {
	grid-template-columns: minmax(0, 1fr) 35%;
}

.hf-wrap .hf-label-right .hf-label-wrap {
	grid-column: 2;
	grid-row: 1;
}

.hf-wrap .hf-label-right .hf-input-wrap {
	grid-column: 1;
	grid-row: 1;
}

.hf-wrap .hf-label-left .hf-desc,
.hf-wrap .hf-label-left .hf-error {
	grid-column: 2;
}

.hf-wrap .hf-label-right .hf-desc,
.hf-wrap .hf-label-right .hf-error {
	grid-column: 1;
}

.hf-wrap .hf-type-checkbox.hf-label-right,
.hf-wrap .hf-type-checkbox.hf-label-left {
	display: flex;
	flex-direction: column;
}

.hf-wrap .hf-type-checkbox .hf-input-wrap {
	grid-column: auto;
	grid-row: auto;
}

.hf-wrap .hf-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hf-wrap .hf-desc {
	margin-top: 6px;
	font-size: 14px;
	opacity: 0.85;
}

.hf-wrap .hf-label-above .hf-desc,
.hf-wrap .hf-label-hidden .hf-desc {
	order: 3;
}

/* ---- Eingabefelder ------------------------------------------------- */
.hf-wrap input.hf-input[type="text"],
.hf-wrap input.hf-input[type="email"],
.hf-wrap input.hf-input[type="tel"],
.hf-wrap input.hf-input[type="number"],
.hf-wrap input.hf-input[type="url"],
.hf-wrap input.hf-input[type="time"],
.hf-wrap input.hf-input[type="date"],
.hf-wrap select.hf-input,
.hf-wrap textarea.hf-input {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 8px 12px;
	font-family: inherit;
	font-size: var(--hf-font-size, 16px);
	line-height: 1.4;
	color: var(--hf-text, #00184d);
	background-color: var(--hf-field-bg, #f7f7f7);
	border: 1px solid var(--hf-border, #c4c4c4);
	border-radius: var(--hf-radius, 0);
	box-shadow: none;
	transition: border-color 0.3s, background-color 0.3s;
}

.hf-wrap input.hf-input[type="text"],
.hf-wrap input.hf-input[type="email"],
.hf-wrap input.hf-input[type="tel"],
.hf-wrap input.hf-input[type="number"],
.hf-wrap input.hf-input[type="url"],
.hf-wrap input.hf-input[type="time"],
.hf-wrap input.hf-input[type="date"],
.hf-wrap select.hf-input:not([multiple]) {
	height: var(--hf-input-height, 40px);
}

.hf-wrap textarea.hf-input {
	height: auto;
	min-height: 100px;
	resize: vertical;
}

.hf-wrap select.hf-input[multiple] {
	height: auto;
	min-height: 120px;
}

.hf-wrap .hf-input::placeholder {
	color: var(--hf-text, #00184d);
	opacity: 0.7;
}

.hf-wrap .hf-input:focus {
	background-color: #fff;
	border-color: var(--hf-focus, #919191);
	outline: 0;
	box-shadow: 0 0 0 2px rgba(145, 145, 145, 0.25);
}

.hf-wrap select.hf-input:not([multiple]) {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' fill='none' stroke='%2300184d' stroke-width='2'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px 9px;
}

/* ---- Radio / Checkbox ---------------------------------------------- */
.hf-wrap .hf-options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hf-wrap .hf-options li {
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.hf-wrap .hf-options li:last-child {
	margin-bottom: 0;
}

.hf-wrap .hf-layout-horizontal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.hf-wrap .hf-layout-horizontal li {
	margin: 0;
}

.hf-wrap .hf-option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-weight: 400;
	font-size: var(--hf-font-size, 16px);
	line-height: 1.4;
	color: var(--hf-text, #00184d);
	cursor: pointer;
}

.hf-wrap .hf-option input[type="radio"],
.hf-wrap .hf-option input[type="checkbox"] {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	min-width: 18px;
	margin: 1px 0 0;
	padding: 0;
	background: var(--hf-field-bg, #f7f7f7);
	border: 2px solid var(--hf-border, #c4c4c4);
	cursor: pointer;
	transition: border-color 0.3s;
}

.hf-wrap .hf-option input[type="radio"] {
	border-radius: 50%;
}

.hf-wrap .hf-option input[type="checkbox"] {
	border-width: 1px;
	border-radius: 2px;
}

.hf-wrap .hf-option input[type="radio"]:checked {
	border-color: var(--hf-text, #00184d);
}

.hf-wrap .hf-option input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hf-text, #00184d);
}

.hf-wrap .hf-option input[type="checkbox"]:checked {
	border-color: var(--hf-text, #00184d);
}

.hf-wrap .hf-option input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	top: 1px;
	left: 5px;
	width: 5px;
	height: 10px;
	border: solid var(--hf-text, #00184d);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.hf-wrap .hf-option input:focus-visible {
	outline: 2px solid var(--hf-focus, #919191);
	outline-offset: 2px;
}

/* Einzelne Checkbox (Zustimmung): Text wie eine Beschriftung (in Ninja Forms ebenfalls fett). */
.hf-wrap .hf-type-checkbox .hf-option-text {
	font-size: var(--hf-label-size, 16px);
	font-weight: var(--hf-label-weight, 600);
	color: var(--hf-label, #052365);
	line-height: 1.4;
}

/* ---- Buttons ------------------------------------------------------- */
.hf-wrap .hf-btn {
	display: inline-block;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 12px 18px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--hf-primary-text, #00184d);
	background: var(--hf-primary, #fc7f2b);
	border: 0;
	border-radius: var(--hf-radius, 0);
	box-shadow: none;
	cursor: pointer;
	transition: filter 0.3s, opacity 0.3s;
}

.hf-wrap .hf-btn:hover,
.hf-wrap .hf-btn:focus {
	filter: brightness(0.93);
	color: var(--hf-primary-text, #00184d);
	background: var(--hf-primary, #fc7f2b);
	outline: 0;
}

.hf-wrap .hf-btn:focus-visible {
	outline: 2px solid var(--hf-focus, #919191);
	outline-offset: 2px;
}

.hf-wrap .hf-btn.hf-submit {
	padding: 15px 60px;
	font-size: 16px;
	line-height: 1;
}

.hf-wrap .hf-btn-prev {
	color: var(--hf-prev-color, var(--hf-primary-text, #00184d));
	background: var(--hf-prev-bg, var(--hf-primary, #fc7f2b));
}

.hf-wrap .hf-btn-next {
	color: var(--hf-next-color, var(--hf-primary-text, #00184d));
	background: var(--hf-next-bg, var(--hf-primary, #fc7f2b));
}

.hf-wrap .hf-btn-prev:hover,
.hf-wrap .hf-btn-prev:focus {
	color: var(--hf-prev-color, var(--hf-primary-text, #00184d));
	background: var(--hf-prev-bg, var(--hf-primary, #fc7f2b));
}

.hf-wrap .hf-btn-next:hover,
.hf-wrap .hf-btn-next:focus {
	color: var(--hf-next-color, var(--hf-primary-text, #00184d));
	background: var(--hf-next-bg, var(--hf-primary, #fc7f2b));
}

.hf-wrap .hf-btn.is-loading {
	opacity: 0.65;
	cursor: progress;
}

.hf-wrap .hf-submit-wrap.hf-align-center {
	text-align: center;
}

.hf-wrap .hf-submit-wrap.hf-align-right {
	text-align: right;
}

.hf-wrap .hf-submit-wrap.hf-align-full .hf-btn {
	display: block;
	width: 100%;
}

/* ---- Schritte ------------------------------------------------------ */
.hf-wrap .hf-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 20px 0;
}

.hf-wrap .hf-nav-between .hf-btn-next {
	margin-left: auto;
}

.hf-wrap .hf-nav-left {
	justify-content: flex-start;
}

.hf-wrap .hf-nav-center {
	justify-content: center;
}

.hf-wrap .hf-nav-right {
	justify-content: flex-end;
}

.hf-wrap .hf-step-title {
	margin: 0 0 20px;
}

.hf-wrap .hf-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
}

.hf-wrap .hf-crumb {
	margin: 0;
	padding: 0;
}

.hf-wrap .hf-crumb-btn {
	-webkit-appearance: none;
	appearance: none;
	padding: 12px 18px;
	font: inherit;
	font-size: 16px;
	color: #f7f7f7;
	background: #333;
	border: 0;
	border-radius: var(--hf-radius, 0);
	cursor: pointer;
	transition: background 0.3s, color 0.3s;
}

.hf-wrap .hf-crumb.is-active .hf-crumb-btn {
	color: #787878;
	background: #c4c4c4;
	cursor: default;
}

.hf-wrap .hf-crumb.has-error .hf-crumb-btn {
	color: #fff;
	background: var(--hf-error, #e80000);
}

.hf-wrap .hf-progress {
	height: 14px;
	margin: 0 0 30px;
	background: var(--hf-field-bg, #f7f7f7);
	border: 1px solid var(--hf-border, #c4c4c4);
	border-radius: var(--hf-radius, 0);
	overflow: hidden;
}

.hf-wrap .hf-progress-bar {
	width: 0;
	height: 100%;
	background: var(--hf-primary, #fc7f2b);
	transition: width 0.4s;
}

/* ---- Meldungen ----------------------------------------------------- */
.hf-wrap .hf-error {
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--hf-error, #e80000);
}

.hf-wrap .hf-field.has-error .hf-input:not([type="radio"]):not([type="checkbox"]) {
	border-color: var(--hf-error, #e80000);
}

.hf-wrap .hf-field.has-error .hf-option input[type="radio"],
.hf-wrap .hf-field.has-error .hf-option input[type="checkbox"] {
	border-color: var(--hf-error, #e80000);
}

.hf-wrap .hf-errors {
	margin: 0 0 20px;
	padding: 12px 16px;
	color: var(--hf-error, #e80000);
	border: 1px solid var(--hf-error, #e80000);
}

.hf-wrap .hf-response {
	margin: 0 0 20px;
	padding: 4px 0 4px 16px;
	border-left: 4px solid var(--hf-success, #1a7f37);
}

.hf-wrap .hf-response:focus {
	outline: 0;
}

.hf-wrap .hf-response.is-error {
	border-left-color: var(--hf-error, #e80000);
	color: var(--hf-error, #e80000);
}

.hf-wrap .hf-notice,
.hf-wrap .hf-required-note {
	margin: 0 0 16px;
}

.hf-wrap .hf-required-note {
	font-size: 14px;
	opacity: 0.85;
}

.hf-wrap .hf-title {
	margin: 0 0 20px;
}

.hf-wrap .hf-divider {
	margin: 0;
	border: 0;
	border-top: 1px solid var(--hf-border, #c4c4c4);
}

.hf-wrap .hf-html img {
	max-width: 100%;
	height: auto;
}

.hf-wrap .hf-captcha {
	margin: 0 0 var(--hf-gap, 20px);
}

/* Honeypot: für Menschen unsichtbar, für Bots ein normales Feld */
.hf-wrap .hf-hp {
	position: absolute !important;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hf-wrap.hf-unavailable {
	padding: 12px 0;
}

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