/**
 * SUTRAC child theme: Fluent Forms styling (all forms).
 *
 * The single place for Fluent Forms look and feel. Colours and fonts come from the
 * Elementor Kit globals (Site Settings), with fallbacks if a global is missing:
 *   Primary colour   --e-global-color-primary       #FFCC00  SUTRAC yellow (button, focus ring)
 *   Secondary colour --e-global-color-secondary     #000000  black (button text, hover)
 *   Charcoal         --e-global-color-3962bfa       #262626  labels, field text
 *   Dark grey        --e-global-color-62311e2       #747474  field borders, placeholders (4.6:1 on white)
 *   Red              --e-global-color-37e601a       #B00D0E  required marker, errors (6.9:1 on white)
 *   Fonts: set in fonts.css from the Kit typography globals; not repeated here.
 *
 * Every selector starts with "body .fluentform" so it wins over Fluent's own stylesheets,
 * which load later. No @font-face or font-family here.
 *
 * @package SutracChild
 */

body .fluentform {
	--sutrac-ff-yellow: var(--e-global-color-primary, #ffcc00);
	--sutrac-ff-black: var(--e-global-color-secondary, #000000);
	--sutrac-ff-charcoal: var(--e-global-color-3962bfa, #262626);
	--sutrac-ff-grey: var(--e-global-color-62311e2, #747474);
	--sutrac-ff-light: var(--e-global-color-5a2874c, #eaeaea);
	--sutrac-ff-red: var(--e-global-color-37e601a, #b00d0e);
	--sutrac-ff-radius: 3px;
	--sutrac-ff-ring: 0 0 0 3px rgba(255, 204, 0, 0.55);
}

/* Typography: font families for every form element are set in fonts.css (Kit "Text" and
   "Primary" globals). This file only sets weights and sizes. */

body .fluentform .ff-el-input--label label,
body .fluentform .ff-el-section-title,
body .fluentform .ff-btn-submit {
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * Layout and spacing
 * ------------------------------------------------------------------------- */

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

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

/* ---------------------------------------------------------------------------
 * Labels and required marker
 * ------------------------------------------------------------------------- */

body .fluentform .ff-el-input--label label,
body .fluentform .ff-el-section-title {
	color: var(--sutrac-ff-charcoal);
	font-size: 16px;
	line-height: 1.3;
	letter-spacing: 0.01em;
}

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(--sutrac-ff-red);
}

/* ---------------------------------------------------------------------------
 * Inputs, selects, textareas
 * ------------------------------------------------------------------------- */

body .fluentform .ff-el-form-control {
	background-color: #ffffff;
	border: 1px solid var(--sutrac-ff-grey);
	border-radius: var(--sutrac-ff-radius);
	box-shadow: none;
	color: var(--sutrac-ff-charcoal);
	font-size: 16px; /* 16px stops iOS zooming into the field */
	line-height: 1.4;
	padding: 10px 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Field heights kept from before (44px inputs, 46px selects) so page spacing is unchanged. */
body .fluentform input.ff-el-form-control:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
	min-height: 44px;
}

body .fluentform select.ff-el-form-control {
	min-height: 46px;
	background-color: #ffffff;
	cursor: pointer;
}

/* Date and time pickers are read-only text inputs that open a picker: keep them looking active. */
body .fluentform .ff-el-form-control.flatpickr-input {
	background-color: #ffffff;
	cursor: pointer;
}

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

body .fluentform .ff-el-form-control::placeholder {
	color: var(--sutrac-ff-grey);
	opacity: 1;
}

body .fluentform .ff-el-form-control:hover {
	border-color: var(--sutrac-ff-charcoal);
}

body .fluentform .ff-el-form-control:focus,
body .fluentform .ff-el-form-control:focus-visible {
	border-color: var(--sutrac-ff-black);
	box-shadow: var(--sutrac-ff-ring);
	outline: none;
}

body .fluentform .ff-el-form-control:disabled,
body .fluentform .ff-el-form-control[readonly]:not(.flatpickr-input) {
	background-color: var(--sutrac-ff-light);
	border-color: var(--sutrac-ff-light);
	color: var(--sutrac-ff-grey);
	cursor: not-allowed;
}

/* ---------------------------------------------------------------------------
 * Checkboxes and radio buttons
 * ------------------------------------------------------------------------- */

body .fluentform input[type="checkbox"],
body .fluentform input[type="radio"] {
	accent-color: var(--sutrac-ff-yellow);
	height: 18px;
	width: 18px;
	margin-right: 8px;
	vertical-align: -3px;
	cursor: pointer;
}

body .fluentform input[type="checkbox"]:focus-visible,
body .fluentform input[type="radio"]:focus-visible {
	outline: 2px solid var(--sutrac-ff-black);
	outline-offset: 2px;
}

body .fluentform .ff-el-form-check-label {
	color: var(--sutrac-ff-charcoal);
	font-size: 16px;
	cursor: pointer;
}

/* ---------------------------------------------------------------------------
 * Help text, validation and form messages
 * ------------------------------------------------------------------------- */

body .fluentform .ff-el-help-message {
	color: var(--sutrac-ff-grey);
	font-size: 14px;
	font-style: normal;
}

body .fluentform .ff-el-is-error .ff-el-form-control {
	border-color: var(--sutrac-ff-red);
}

body .fluentform .ff-el-is-error .ff-el-form-control:focus {
	box-shadow: 0 0 0 3px rgba(176, 13, 14, 0.2);
}

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

body .fluentform .ff-errors-in-stack {
	background: #fdf2f2;
	border-left: 4px solid var(--sutrac-ff-red);
	border-radius: var(--sutrac-ff-radius);
	margin-top: 12px;
	padding: 10px 14px;
}

body .fluentform .ff-errors-in-stack:empty {
	display: none;
}

body .fluentform .ff-message-success,
body .ff-message-success {
	background: #fffbea;
	border: 0;
	border-left: 4px solid var(--sutrac-ff-yellow);
	border-radius: var(--sutrac-ff-radius);
	box-shadow: none;
	color: var(--sutrac-ff-charcoal);
	font-size: 17px;
	line-height: 1.5;
	margin-top: 10px;
	padding: 18px 20px;
}

/* ---------------------------------------------------------------------------
 * Submit button (replaces the default light-blue #409EFF)
 * ------------------------------------------------------------------------- */

body .fluentform .ff-btn-submit,
body .fluentform .ff-btn-submit.ff_btn_style,
body .fluentform .ff_btn_style {
	background-color: var(--sutrac-ff-yellow);
	border: 2px solid var(--sutrac-ff-yellow);
	border-radius: var(--sutrac-ff-radius);
	box-shadow: none;
	color: var(--sutrac-ff-black);
	cursor: pointer;
	font-size: 17px;
	letter-spacing: 0.04em;
	line-height: 1.2;
	min-height: 46px;
	min-width: 140px;
	padding: 12px 32px;
	text-transform: uppercase;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	opacity: 1;
}

body .fluentform .ff-btn-submit:hover,
body .fluentform .ff_btn_style:hover {
	background-color: var(--sutrac-ff-black);
	border-color: var(--sutrac-ff-black);
	color: var(--sutrac-ff-yellow);
	opacity: 1;
}

body .fluentform .ff-btn-submit:focus,
body .fluentform .ff_btn_style:focus {
	outline: none;
}

body .fluentform .ff-btn-submit:focus-visible,
body .fluentform .ff_btn_style:focus-visible {
	background-color: var(--sutrac-ff-yellow);
	border-color: var(--sutrac-ff-black);
	color: var(--sutrac-ff-black);
	outline: 3px solid var(--sutrac-ff-black);
	outline-offset: 2px;
}

body .fluentform .ff-btn-submit:active,
body .fluentform .ff_btn_style:active {
	background-color: var(--sutrac-ff-charcoal);
	border-color: var(--sutrac-ff-charcoal);
	color: var(--sutrac-ff-yellow);
	transform: translateY(1px);
}

body .fluentform .ff-btn-submit:disabled,
body .fluentform .ff-btn-submit.disabled {
	background-color: var(--sutrac-ff-light);
	border-color: var(--sutrac-ff-light);
	color: var(--sutrac-ff-grey);
	cursor: not-allowed;
	transform: none;
}

/* Loading state: Fluent adds .ff-working + .disabled while the AJAX request runs. */
body .fluentform .ff-btn-submit.ff-working {
	background-color: var(--sutrac-ff-yellow);
	border-color: var(--sutrac-ff-yellow);
	color: var(--sutrac-ff-black);
	cursor: progress;
	overflow: hidden;
	padding-left: 52px;
	position: relative;
}

body .fluentform .ff-btn-submit.ff-working::before {
	animation: sutrac-ff-spin 0.8s linear infinite;
	border: 2px solid rgba(0, 0, 0, 0.25);
	border-top-color: var(--sutrac-ff-black);
	border-radius: 50%;
	content: "";
	height: 16px;
	left: 24px;
	margin-top: -8px;
	position: absolute;
	top: 50%;
	width: 16px;
}

body .fluentform .ff-btn.ff-working::after {
	background: rgba(0, 0, 0, 0.35);
}

@keyframes sutrac-ff-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	body .fluentform .ff-btn-submit.ff-working::before,
	body .fluentform .ff-btn.ff-working::after {
		animation: none;
	}
}

/* ---------------------------------------------------------------------------
 * Small screens
 * ------------------------------------------------------------------------- */

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