/* Phase H (0.2.31): Fluent Forms in the CRELALA look – loaded only on pages with a form (inc/setup.php).
   One place for all forms (also forms added later in Fluent Forms); no per-form CSS. Colours = theme.json palette,
   radius/shadow from CRELALA Modern when active (--cm-*), square in the original look.
   0.2.66: field, label, card and button values from CRELALA Modern's form tokens (--cm-field-*, --cm-form-*, Modern 0.6.28)
   when active – the same look as the WooCommerce forms; without Modern the fallbacks = the look before. */

body .fluentform {
	--cf-box: #323232;
	--cf-text: #ebebeb;
	--cf-label: #f2f2f2;
	--cf-muted: #bdbdbd;
	--cf-red: #e30613;
	--cf-red-dark: #c30511;
	--cf-gold: #ffd700;
	--cf-error: #ff9b9b;
	--cf-ok: #3fbf55;
	max-width: 760px;
	margin: 24px 0 40px;
	padding: var(--cm-form-pad, 28px 30px 30px);
	background: var(--cm-form-card, var(--cf-box));
	border: 1px solid var(--cm-form-line, transparent);
	color: var(--cf-text);
	border-radius: var(--cm-radius, 0);
	box-shadow: var(--cm-shadow, 0 0 10px rgba(0, 0, 0, 0.1));
	box-sizing: border-box;
	font-size: 16px;
	line-height: 1.5;
}
body .fluentform * { box-sizing: border-box; }
body .fluentform .ff-el-group { margin-bottom: 20px; }

/* labels: always visible above the field (no placeholder-only fields) */
body .fluentform .ff-el-input--label label,
body .fluentform .ff-el-input--label {
	color: var(--cm-field-label, var(--cf-label));
	font-weight: bold;
	font-size: var(--cm-field-label-size, 16px);
	line-height: 1.4;
	letter-spacing: 0.01em;
	margin-bottom: 8px;
}
body .fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label::after { color: var(--cm-red, var(--cf-error)); margin-left: 4px; }

/* text fields: like the shop fields of CRELALA Modern (white, thin border) */
body .fluentform .ff-el-form-control {
	width: 100%;
	min-height: var(--cm-field-h, 46px);
	padding: 11px 14px;
	font: inherit;
	font-size: 16px;                       /* no zoom on phones */
	color: var(--cm-field-text, #323232);
	background: var(--cm-field-bg, #ffffff);
	border: 1px solid var(--cm-field-line, #bdbdbd);
	border-radius: var(--cm-radius-sm, 2px);
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
body .fluentform textarea.ff-el-form-control { min-height: 140px; resize: vertical; }
body .fluentform .ff-el-form-control::placeholder { color: var(--cm-field-hint, #757575); opacity: 1; }
body .fluentform .ff-el-form-control:hover:not(:focus) { border-color: var(--cm-field-line-hover, #bdbdbd); background: var(--cm-field-bg-hover, #ffffff); }
body .fluentform .ff-el-form-control:focus {
	border-color: var(--cf-red);
	outline: var(--cm-field-focus-outline, 3px solid var(--cf-gold));
	outline-offset: 2px;
	box-shadow: var(--cm-field-ring, none);
}

/* radio buttons / checkbox */
body .fluentform .ff-el-form-check { margin-bottom: 6px; }
body .fluentform .ff-el-form-check-ff_list_inline { display: inline-block; margin-right: 26px; }
body .fluentform .ff-el-form-check-label { color: var(--cf-text); font-weight: normal; cursor: pointer; display: inline-flex; gap: 10px; align-items: flex-start; }
body .fluentform .ff-el-form-check-input {
	width: 18px;
	height: 18px;
	margin: 3px 0 0;
	flex: 0 0 auto;
	accent-color: var(--cf-red);
	cursor: pointer;
}
body .fluentform .ff-el-form-check-input:focus-visible { outline: 3px solid var(--cf-gold); outline-offset: 2px; }
body .fluentform .ff-el-tc label.ff_tc_label { display: flex; gap: 12px; align-items: flex-start; }
body .fluentform .ff-el-tc label.ff_tc_label > span,
body .fluentform .ff-el-tc label.ff_tc_label > div { display: block; padding: 0 !important; width: auto; }
body .fluentform .ff-el-tc .ff-el-form-check-input { top: 0; }
body .fluentform .ff_t_c { color: var(--cf-text); }

/* links (privacy policy) in the original gold */
body .fluentform a { color: var(--cf-gold); text-decoration: underline; text-underline-offset: 2px; }
body .fluentform a:hover { color: #ffffff; }
body .fluentform a:focus-visible { outline: 3px solid var(--cf-gold); outline-offset: 2px; }

body .fluentform .crelala-form-note { margin: 0; font-size: 14px; color: var(--cf-muted); }
body .fluentform .ff-el-help-message { color: var(--cf-muted); font-size: 14px; }

/* submit: the CRELALA button */
body .fluentform .ff-btn-submit,
body .fluentform .ff-btn-submit:not(.ff_btn_no_style) {
	display: inline-block;
	min-height: var(--cm-field-h, 46px);
	min-width: 220px;
	padding: 13px 34px;
	background: var(--cf-red);
	color: #ffffff;
	border: 0;
	border-radius: var(--cm-radius-sm, 0);
	font-family: inherit;
	font-size: var(--cm-form-btn-size, 14px);
	font-weight: bold;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	opacity: 1;
	transition: background-color 0.2s ease, transform 0.2s ease;
}
body .fluentform .ff-btn-submit:hover { background: var(--cf-red-dark); color: #ffffff; opacity: 1; }
body .fluentform .ff-btn-submit:focus-visible { outline: 3px solid var(--cf-gold); outline-offset: 3px; }

/* errors: readable on the dark box */
body .fluentform .ff-el-is-error .ff-el-form-control { border-color: #ff6b6b; border-width: 2px; }
body .fluentform .ff-el-is-error .text-danger,
body .fluentform .error.text-danger { color: var(--cf-error); font-size: 14px; margin-top: 6px; }
body .ff-errors-in-stack { color: var(--cf-error); }

/* success message (replaces the form) */
body .ff-message-success {
	max-width: 760px;
	margin: 24px 0 40px;
	padding: 18px 22px;
	background: #2b2b2b;
	color: #ffffff;
	border: 0;
	border-left: 4px solid var(--cf-ok, #3fbf55);
	border-radius: var(--cm-radius-sm, 0);
	box-shadow: none;
	font-size: 17px;
}
body .ff-message-success p { margin: 0 0 6px; }
body .ff-message-success p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
	body .fluentform { padding: 20px 16px 22px; margin: 16px 0 28px; }
	body .fluentform .ff-btn-submit { width: 100%; }
	body .fluentform .ff-el-form-check-ff_list_inline { display: block; margin-right: 0; }
}
