/* Fahrlehrer Bestellformular – frontend styles */
.fbf-form-wrap {
	/* Akzentfarbe = CI der Website: nutzt automatisch die Elementor-
	   Global-Akzent-/Primärfarbe, sonst den Fallback. Kann per Plugin-
	   Einstellung oder Elementor-Style-Tab überschrieben werden. */
	--fbf-accent: var(--e-global-color-accent, var(--e-global-color-primary, #1f6feb));
	--fbf-accent-text: #ffffff;
	--fbf-border: #d9dee4;
	--fbf-muted: #6a7280;
	--fbf-danger: #c0392b;
	--fbf-ok: #1e7e34;
	max-width: 880px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
	color: #1f2430;
}

.fbf-notice {
	padding: 14px 16px;
	border-radius: 6px;
	margin-bottom: 20px;
	border: 1px solid transparent;
}
.fbf-notice-success { background: #eaf7ee; border-color: #bfe3c8; color: var(--fbf-ok); }
.fbf-notice-error { background: #fdecea; border-color: #f3c0b8; color: var(--fbf-danger); }

.fbf-empty { padding: 16px; background: #f6f7f9; border-radius: 6px; }

.fbf-table-scroll { overflow-x: auto; }

table.fbf-products {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 18px;
}
table.fbf-products th,
table.fbf-products td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--fbf-border);
	text-align: left;
	vertical-align: middle;
}
table.fbf-products thead th {
	background: #f2f4f7;
	font-weight: 600;
	font-size: 0.92em;
}
.fbf-col-price, .fbf-col-qty, .fbf-col-line { text-align: right; white-space: nowrap; }
.fbf-col-qty { width: 100px; text-align: center; }

.fbf-title { display: block; font-weight: 600; }
.fbf-note { display: block; font-size: 0.8em; color: var(--fbf-muted); margin-top: 2px; }

.fbf-row.fbf-unavailable { color: var(--fbf-danger); background: #fdf3f2; }
.fbf-unavailable-label {
	display: block;
	font-size: 0.82em;
	font-weight: 600;
	color: var(--fbf-danger);
	margin-top: 3px;
}
.fbf-price-na, .fbf-qty-na { color: var(--fbf-danger); }

input.fbf-qty {
	width: 72px;
	padding: 6px 8px;
	text-align: center;
	border: 1px solid var(--fbf-border);
	border-radius: 5px;
	font-size: 1em;
}

table.fbf-products tfoot th,
table.fbf-products tfoot td {
	border-top: 2px solid #c2c8d0;
	border-bottom: none;
	font-size: 1.1em;
	font-weight: 700;
	padding-top: 14px;
}
.fbf-grand-label { text-align: right; }
.fbf-grand-total { text-align: right; color: var(--fbf-accent); white-space: nowrap; }

.fbf-vat-note {
	font-size: 0.85em;
	color: var(--fbf-muted);
	background: #f6f7f9;
	padding: 10px 12px;
	border-radius: 6px;
	margin-bottom: 22px;
}

fieldset.fbf-address {
	border: 1px solid var(--fbf-border);
	border-radius: 8px;
	padding: 18px 20px 6px;
	margin: 0 0 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
}
fieldset.fbf-address legend { font-weight: 600; padding: 0 6px; }
.fbf-field { display: flex; flex-direction: column; margin: 0 0 14px; }
.fbf-field-salutation, .fbf-field-message, .fbf-field:nth-child(2) { grid-column: 1 / -1; }
.fbf-field-message { grid-column: 1 / -1; }
.fbf-field label { font-size: 0.9em; font-weight: 600; margin-bottom: 5px; }
.fbf-field input,
.fbf-field select,
.fbf-field textarea {
	padding: 9px 11px;
	border: 1px solid var(--fbf-border);
	border-radius: 6px;
	font-size: 1em;
	width: 100%;
	box-sizing: border-box;
}
.fbf-field input:focus,
.fbf-field select:focus,
.fbf-field textarea:focus {
	outline: 2px solid var(--fbf-accent);
	outline-offset: 1px;
	border-color: var(--fbf-accent);
}
.fbf-req { color: var(--fbf-danger); }

.fbf-consent { flex-direction: row; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.fbf-consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.95em; }
.fbf-consent input { width: auto; margin-top: 3px; }

/* Honeypot – hidden from humans, present for bots */
.fbf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fbf-submit-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
button.fbf-submit {
	background: var(--fbf-accent);
	color: var(--fbf-accent-text);
	border: none;
	padding: 13px 30px;
	font-size: 1.05em;
	font-weight: 600;
	border-radius: 7px;
	cursor: pointer;
	transition: filter 0.15s ease, opacity 0.15s ease;
}
button.fbf-submit:disabled { opacity: 0.45; cursor: progress; }
button.fbf-submit:hover { filter: brightness(0.92); }
/* Looks inactive while required fields are missing, but stays clickable so a
   click can surface which field is wrong. */
button.fbf-submit.is-incomplete { opacity: 0.5; }
button.fbf-submit.is-incomplete:hover { filter: none; }
.fbf-submit-hint { font-size: 0.85em; color: var(--fbf-muted); }
.fbf-submit-row.fbf-ready .fbf-submit-hint { display: none; }

/* Per-field validation */
.fbf-error-msg {
	display: block;
	color: var(--fbf-danger);
	font-size: 0.82em;
	font-weight: 600;
	margin-top: 4px;
}
.fbf-field.fbf-has-error input,
.fbf-field.fbf-has-error select,
.fbf-field.fbf-has-error textarea {
	border-color: var(--fbf-danger);
	outline-color: var(--fbf-danger);
}
.fbf-consent.fbf-has-error { outline: 1px dashed var(--fbf-danger); outline-offset: 4px; border-radius: 4px; }

.fbf-form-error {
	color: var(--fbf-danger);
	background: #fdecea;
	border: 1px solid #f3c0b8;
	border-radius: 6px;
	padding: 10px 14px;
	font-weight: 600;
	margin: 0 0 14px;
}

@media (max-width: 600px) {
	fieldset.fbf-address { grid-template-columns: 1fr; }
	.fbf-field-salutation, .fbf-field:nth-child(2) { grid-column: auto; }
}
