/**
 * BRWK Core – dunkles Theme für alle Fluent Forms
 * ------------------------------------------------
 * Gilt automatisch für jedes Formular auf der Seite (kein Styler pro Formular nötig).
 * Farben/Abstände zentral über die Variablen unten anpassen.
 */

.fluentform {
	--ffd-text: #f2eef7;          /* Eingaben, Labels */
	--ffd-muted: #a9a3b2;         /* Hilfetexte, Platzhalter */
	--ffd-field: rgba(30, 28, 40, 0.62);       /* dunkles Glas: trägt auf Farbe und Bild */
	--ffd-field-hover: rgba(38, 36, 50, 0.7);
	--ffd-field-focus: rgba(40, 38, 54, 0.8);
	--ffd-border: rgba(255, 255, 255, 0.14);
	--ffd-border-hover: rgba(255, 255, 255, 0.26);
	--ffd-accent: #9c3fab;        /* Primärfarbe (Divi) */
	--ffd-accent-hi: #d879e7;     /* Primär 400 – Fokus, Sternchen */
	--ffd-accent-glow: rgba(156, 63, 171, 0.38);
	--ffd-surface: rgba(20, 20, 29, 0.72); /* Boxen, Tabellen */
	--ffd-error: #ff8f8f;
	--ffd-success: #4ade80;
	--ffd-warn: #ffc107;
	--ffd-radius: 12px;
	--ffd-font: "Sans Flex 300", "Sans Flex Regular", Helvetica, Arial, sans-serif;
	color: var(--ffd-text);
	font-family: var(--ffd-font);
}

/* ---------- Abstände & Labels ---------- */

body .fluentform .ff-el-group {
	margin-bottom: 22px;
}

body .fluentform .ff-el-input--label {
	margin-bottom: 8px;
}

body .fluentform .ff-el-input--label label,
body .fluentform .ff-el-input--label {
	color: var(--ffd-text);
	font-family: var(--ffd-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.2px;
}

body .fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label::after,
body .fluentform .ff-el-input--label.ff-el-is-required.asterisk-left label::before {
	color: var(--ffd-accent-hi);
}

body .fluentform .ff-el-help-message,
body .fluentform .ff-el-help-message p {
	color: var(--ffd-muted);
	font-size: 14px;
	font-style: normal;
	line-height: 1.5;
	margin-top: 6px;
}

/* ---------- Eingabefelder ---------- */

body .fluentform .ff-el-form-control,
body .fluentform input[type="text"],
body .fluentform input[type="email"],
body .fluentform input[type="tel"],
body .fluentform input[type="number"],
body .fluentform input[type="url"],
body .fluentform input[type="date"],
body .fluentform input[type="password"],
body .fluentform textarea,
body .fluentform select,
body .fluentform .StripeElement,
body .fluentform .choices__inner {
	background-color: var(--ffd-field);
	border: 1px solid var(--ffd-border);
	border-radius: var(--ffd-radius);
	box-shadow: none;
	color: var(--ffd-text);
	font-family: var(--ffd-font);
	font-size: 16px;
	line-height: 1.5;
	padding: 13px 16px;
	min-height: 50px;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-text-fill-color: var(--ffd-text);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

body .fluentform textarea.ff-el-form-control {
	min-height: 130px;
	resize: vertical;
}

body .fluentform .ff-el-form-control:hover,
body .fluentform .StripeElement:hover {
	background-color: var(--ffd-field-hover);
	border-color: var(--ffd-border-hover);
}

body .fluentform .ff-el-form-control:focus,
body .fluentform .StripeElement--focus {
	background-color: var(--ffd-field-focus);
	border-color: var(--ffd-accent-hi);
	box-shadow: 0 0 0 3px var(--ffd-accent-glow);
	outline: none;
}

body .fluentform .ff-el-form-control::placeholder {
	color: var(--ffd-muted);
	opacity: 0.8;
	-webkit-text-fill-color: var(--ffd-muted);
}

/* Autofill des Browsers nicht hell einfärben */
body .fluentform input:-webkit-autofill,
body .fluentform input:-webkit-autofill:hover,
body .fluentform input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--ffd-text);
	box-shadow: 0 0 0 1000px #1b1a24 inset;
	transition: background-color 9999s ease-out;
}

/* Auswahlfelder mit eigenem Pfeil */
body .fluentform select.ff-el-form-control {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d879e7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 44px;
}

body .fluentform select.ff-el-form-control option {
	background-color: #1b1a24;
	color: var(--ffd-text);
}

/* Zahlenfelder: Pfeile hell */
body .fluentform input[type="number"] {
	color-scheme: dark;
}

/* ---------- Checkboxen & Radios ---------- */

body .fluentform .ff-el-form-check {
	margin-bottom: 10px;
}

body .fluentform .ff-el-form-check-label,
body .fluentform .ff_t_c,
body .fluentform .ff-el-tc label {
	color: var(--ffd-text);
	font-size: 16px;
	line-height: 1.55;
}

body .fluentform input.ff-el-form-check-input,
body .fluentform .ff-el-tc input[type="checkbox"],
body .fluentform .ff_gdpr_field input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	min-width: 20px;
	margin: 2px 10px 0 0;
	vertical-align: top;
	background-color: var(--ffd-field);
	border: 1.5px solid var(--ffd-border-hover);
	border-radius: 6px;
	cursor: pointer;
	position: relative;
	transition: all 0.15s ease;
}

body .fluentform input.ff-el-form-check-input[type="radio"] {
	border-radius: 50%;
}

body .fluentform input.ff-el-form-check-input:hover,
body .fluentform .ff-el-tc input[type="checkbox"]:hover {
	border-color: var(--ffd-accent-hi);
}

body .fluentform input.ff-el-form-check-input:focus-visible,
body .fluentform .ff-el-tc input[type="checkbox"]:focus-visible {
	box-shadow: 0 0 0 3px var(--ffd-accent-glow);
	outline: none;
}

body .fluentform input.ff-el-form-check-input[type="checkbox"]:checked,
body .fluentform .ff-el-tc input[type="checkbox"]:checked,
body .fluentform .ff_gdpr_field input[type="checkbox"]:checked {
	background-color: var(--ffd-accent);
	border-color: var(--ffd-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-size: 14px;
	background-position: center;
	background-repeat: no-repeat;
}

body .fluentform input.ff-el-form-check-input[type="radio"]:checked {
	border-color: var(--ffd-accent-hi);
	background-color: transparent;
	background-image: radial-gradient(circle, var(--ffd-accent-hi) 0 45%, transparent 50%);
}

/* Ausgewählte Option dezent hervorheben */
body .fluentform .ff-el-form-check.ff_item_selected .ff-el-form-check-label {
	color: #fff;
}

/* Info-Symbol neben Labels */
body .fluentform .ff-el-tooltip svg,
body .fluentform .ff-el-tooltip svg path {
	fill: var(--ffd-accent-hi);
}

/* Links in Checkbox-/Datenschutztexten */
body .fluentform .ff-el-form-check-label a,
body .fluentform .ff_t_c a,
body .fluentform .ff-el-help-message a {
	color: var(--ffd-accent-hi);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Net Promoter Score (Skala 0–10) ---------- */

body .fluentform .ff_net_table {
	border: 0;
	background: transparent;
}

body .fluentform .ff_net_table tbody tr td {
	border: 1px solid var(--ffd-border);
	background: var(--ffd-field);
	color: var(--ffd-text);
	transition: background-color 0.15s ease;
}

body .fluentform .ff_net_table tbody tr td:hover {
	background: var(--ffd-field-hover);
}

body .fluentform .ff_net_table tbody tr td label {
	color: var(--ffd-text);
}

body .fluentform .ff_net_table tbody tr td input:checked + label,
body .fluentform .ff_net_table tbody tr td.ff-checked,
body .fluentform .ff_net_table tbody tr td label.active {
	background: var(--ffd-accent);
	border-color: var(--ffd-accent-hi) !important;
	box-shadow: none;
	color: #fff;
}

body .fluentform .ff_net_table tbody tr td input:checked + label::after {
	border-color: var(--ffd-accent-hi);
}

body .fluentform .ff_net_table thead th,
body .fluentform .ff_net_table .ff_net_label {
	color: var(--ffd-muted);
	background: transparent;
	border: 0;
}

/* ---------- Buttons ---------- */

body .fluentform .ff-btn-submit,
body .fluentform button.ff-btn-submit,
body .fluentform .ff_submit_btn_wrapper .ff-btn {
	/* !important nötig: Fluent Forms setzt die Buttonfarbe als Inline-Style */
	background-color: var(--ffd-accent) !important;
	background-image: linear-gradient(135deg, #a855a8 0%, #9c3fab 55%, #7a2d88 100%) !important;
	border: 1px solid rgba(216, 121, 231, 0.55) !important;
	border-radius: 999px;
	color: #fff !important;
	cursor: pointer;
	font-family: var(--ffd-font);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 1px;
	line-height: 1.2;
	padding: 16px 36px;
	box-shadow: 0 8px 24px -10px var(--ffd-accent-glow);
	transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
	opacity: 1;
}

body .fluentform .ff-btn-submit:hover,
body .fluentform .ff-btn-submit:focus-visible {
	filter: brightness(1.12);
	box-shadow: 0 10px 30px -8px rgba(216, 121, 231, 0.55);
	transform: translateY(-1px);
	color: #fff;
	outline: none;
}

body .fluentform .ff-btn-submit:active {
	transform: translateY(0);
}

body .fluentform .ff-btn-submit.disabled,
body .fluentform .ff-btn-submit[disabled],
body .fluentform .ff-working .ff-btn-submit {
	filter: grayscale(0.4) brightness(0.8);
	cursor: progress;
	transform: none;
}

/* Nebenbuttons (Datei-Upload, Weiter/Zurück in Schritt-Formularen) */
body .fluentform .ff_upload_btn.ff-btn,
body .fluentform .ff-btn-secondary,
body .fluentform .step-nav .ff-btn,
body .fluentform .ff-btn-prev,
body .fluentform .ff-btn-next {
	background: transparent;
	border: 1px solid var(--ffd-accent);
	border-radius: 999px;
	color: #fff;
	font-family: var(--ffd-font);
	font-weight: 600;
	letter-spacing: 1px;
	padding: 10px 24px;
}

body .fluentform .ff_upload_btn.ff-btn:hover,
body .fluentform .ff-btn-secondary:hover,
body .fluentform .ff-btn-prev:hover,
body .fluentform .ff-btn-next:hover {
	background: rgba(156, 63, 171, 0.18);
	color: #fff;
}

body .fluentform .ff-uploaded-list .ff-upload-preview {
	background: var(--ffd-surface);
	border-color: var(--ffd-border);
	color: var(--ffd-text);
}

/* ---------- Fehler & Erfolg ---------- */

body .fluentform .ff-el-is-error .ff-el-form-control,
body .fluentform .ff-el-is-error .StripeElement {
	border-color: var(--ffd-error);
	box-shadow: 0 0 0 3px rgba(255, 143, 143, 0.15);
}

body .fluentform .ff-el-is-error .text-danger,
body .fluentform .error.text-danger,
body .fluentform .ff-el-is-error .error,
body .fluentform .ff_card-errors,
body .ff-errors-in-stack .error {
	color: var(--ffd-error);
	font-size: 14px;
	margin-top: 6px;
}

body .ff-errors-in-stack {
	background: rgba(255, 143, 143, 0.08);
	border-left: 3px solid var(--ffd-error);
	border-radius: 8px;
	padding: 12px 16px;
}

body .ff-message-success,
body .fluentform .ff-message-success {
	background: rgba(74, 222, 128, 0.08);
	border: 1px solid rgba(74, 222, 128, 0.35);
	border-left: 4px solid var(--ffd-success);
	border-radius: var(--ffd-radius);
	box-shadow: none;
	color: var(--ffd-text);
	font-size: 17px;
	line-height: 1.6;
	padding: 20px 24px;
}

body .ff-message-success p,
body .ff-message-success h1,
body .ff-message-success h2,
body .ff-message-success h3 {
	color: var(--ffd-text);
}

/* ---------- Zahlung (Gutschein) ---------- */

body .fluentform .ff_payment_summary {
	overflow-x: auto;
}

body .fluentform .ff_payment_summary table,
body .fluentform .ff-table,
body .fluentform table.table {
	background: var(--ffd-surface);
	border: 1px solid var(--ffd-border);
	border-collapse: separate;
	border-radius: var(--ffd-radius);
	border-spacing: 0;
	color: var(--ffd-text);
	overflow: hidden;
	width: 100%;
}

body .fluentform .ff_payment_summary table th,
body .fluentform .ff_payment_summary table td {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--ffd-border);
	color: var(--ffd-text);
	padding: 12px 16px;
}

body .fluentform .ff_payment_summary table thead {
	background: rgba(255, 255, 255, 0.04);
}

body .fluentform .ff_payment_summary table thead th {
	color: var(--ffd-muted);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.5px;
}

body .fluentform .ff_payment_summary table tfoot th {
	border-bottom: 0;
	font-weight: 600;
}

body .fluentform .ff_payment_summary table tfoot tr:last-child th {
	color: #fff;
	font-size: 18px;
}

body .fluentform .ff_payment_summary .vat_row th {
	color: var(--ffd-muted);
	font-weight: 400;
}

/* Preis-Anzeige bei Produkt-Auswahl */
body .fluentform .ff_item_price_wrapper,
body .fluentform .ff_product_price {
	color: var(--ffd-accent-hi);
}

/* Menge (Gutschein) */
body .fluentform #ff_19_menge {
	width: 110px;
}

body .voucher-booking .ff-el-form-control {
	font-size: 15px;
}

body .voucher-booking input[type="number"]::-webkit-inner-spin-button,
body .voucher-booking input[type="number"]::-webkit-outer-spin-button {
	transform: scale(1.5);
	margin: 2px;
	padding: 10px 2px;
}

/* Stripe-Kartenfeld (Inhalt wird per PHP-Filter hell eingefärbt) */
body .fluentform .StripeElement {
	padding: 15px 16px;
}

body .fluentform .ff_payment_method .ff-el-form-check,
body .fluentform .ff-el-payment-method {
	color: var(--ffd-text);
}

/* ---------- Hinweis- und Preis-Boxen im Formular ---------- */

body .fluentform .myform-hinweis,
body .fluentform .hinweis {
	background: rgba(255, 193, 7, 0.07);
	border: 1px solid rgba(255, 193, 7, 0.22);
	border-left: 3px solid var(--ffd-warn);
	border-radius: var(--ffd-radius);
	color: var(--ffd-text);
	padding: 18px 22px;
}

body .fluentform .myform-preis {
	background: rgba(74, 222, 128, 0.07);
	border: 1px solid rgba(74, 222, 128, 0.22);
	border-left: 3px solid var(--ffd-success);
	border-radius: var(--ffd-radius);
	color: var(--ffd-text);
	padding: 12px 22px;
}

body .fluentform .myform-hinweis p:last-child,
body .fluentform .hinweis p:last-child,
body .fluentform .myform-preis p:last-child {
	padding-bottom: 0;
	margin-bottom: 0;
}

body .fluentform .whitebg {
	background: transparent;
}

/* Freitext-Blöcke im Formular */
body .fluentform .ff-custom_html,
body .fluentform .ff-custom_html p,
body .fluentform .ff-custom_html li {
	color: var(--ffd-text);
}

body .fluentform .ff-custom_html a {
	color: var(--ffd-accent-hi);
}

body .fluentform hr,
body .fluentform .ff-el-section-break hr {
	border: 0;
	border-top: 1px solid var(--ffd-border);
}

/* ---------- Such-Auswahl (Choices.js) & Datumsauswahl ---------- */

body .fluentform .choices__list--dropdown,
body .fluentform .choices__list[aria-expanded] {
	background: #1b1a24;
	border-color: var(--ffd-border);
	color: var(--ffd-text);
}

body .fluentform .choices__list--dropdown .choices__item--selectable.is-highlighted {
	background: rgba(156, 63, 171, 0.3);
}

body .fluentform .choices__input {
	background: transparent;
	color: var(--ffd-text);
}

.flatpickr-calendar {
	background: #1b1a24;
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7);
	color: #f2eef7;
}

.flatpickr-calendar .flatpickr-months .flatpickr-month,
.flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-calendar span.flatpickr-weekday,
.flatpickr-calendar .flatpickr-day,
.flatpickr-calendar .numInputWrapper input {
	background: transparent;
	color: #f2eef7;
	fill: #f2eef7;
}

.flatpickr-calendar .flatpickr-prev-month svg,
.flatpickr-calendar .flatpickr-next-month svg {
	fill: #f2eef7;
}

.flatpickr-calendar .flatpickr-day:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: transparent;
}

.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.selected:hover {
	background: #9c3fab;
	border-color: #9c3fab;
	color: #fff;
}

.flatpickr-calendar .flatpickr-day.flatpickr-disabled,
.flatpickr-calendar .flatpickr-day.prevMonthDay,
.flatpickr-calendar .flatpickr-day.nextMonthDay {
	color: rgba(242, 238, 247, 0.3);
}

/* ---------- Mobil ---------- */

@media (max-width: 767px) {
	body .fluentform .ff-btn-submit {
		width: 100%;
	}

	body .fluentform .ff-el-form-control,
	body .fluentform select {
		font-size: 16px; /* verhindert Zoom auf iOS */
	}
}
