/* assets/css/forms.css
 * Shared Fluent Forms styling. Brand tokens scoped to the Fluent Forms wrapper
 * (.frm-fluent-form) so every form on the site — contact, partners, and any
 * future form — renders as one system instead of drifting into separate styles.
 * Loaded by inc/setup.php on any page that renders a Fluent Form (the contact
 * shortcode, or a content-page config block carrying a form_id).
 *
 * CONTEXT: a shared form can land on a LIGHT page (/contact uses page.php, a
 * white body) or a DARK band (/partners' CTA is .sec-surface). So the COLOUR
 * treatment has two modes:
 *   - BASE  = light context (navy labels, light fill) — the default, because
 *             the plain white body carries no .sec-* class to key off.
 *   - DARK  = .sec-dark / .sec-surface ancestor (near-white labels, dark fill).
 * The structural rules (layout, box-model, button shape) are colour-free and
 * shared by both. Field treatment mirrors the native signup form in
 * get-started.css.
 *
 * Fluent Forms free-plugin defaults overridden here: label colour, the plugin
 * font stack (-> inherit = self-hosted Space Grotesk), control borders/
 * background/radius, focus ring, placeholder, and the default blue submit
 * button. The submit button's FF colour rule is suppressed at source by setting
 * each form's button_style to "no_style", so this stylesheet wins without
 * !important.
 */

/* ============================================================= *
 *  STRUCTURE (colour-free, shared by light and dark contexts)
 * ============================================================= */

/* Measure: keep forms to a readable column; centre inside the centred CTA band
   on /partners (the contact page keeps its own left-aligned container). */
.frm-fluent-form { max-width: 560px; }
.cp-cta-form { margin-top: 26px; }
.cp-cta-form .frm-fluent-form { margin: 0 auto; text-align: left; }

/* Field-group rhythm. */
.frm-fluent-form .ff-el-group { margin-bottom: 18px; }
.frm-fluent-form .ff-el-group:last-of-type { margin-bottom: 0; }

/* Labels. */
.frm-fluent-form .ff-el-input--label label {
	display: block;
	margin-bottom: 7px;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
}

/* Controls — input, select, textarea. font:inherit pulls in Space Grotesk. */
.frm-fluent-form input.ff-el-form-control,
.frm-fluent-form select.ff-el-form-control,
.frm-fluent-form textarea.ff-el-form-control {
	box-sizing: border-box;
	width: 100%;
	padding: 13px 15px;
	font: inherit;
	font-size: 16px;
	border-width: 1.5px;
	border-style: solid;
	border-radius: 10px;
	transition: border-color .12s, box-shadow .12s;
}
.frm-fluent-form textarea.ff-el-form-control { min-height: 120px; resize: vertical; }
.frm-fluent-form select.ff-el-form-control { cursor: pointer; }
.frm-fluent-form .ff-el-form-control::placeholder { opacity: 1; }

.frm-fluent-form input.ff-el-form-control:focus,
.frm-fluent-form select.ff-el-form-control:focus,
.frm-fluent-form textarea.ff-el-form-control:focus {
	outline: none;
	border-color: var(--accent, #19C37D);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #19C37D) 28%, transparent);
}

/* Two-column rows (email|phone, company|size) and the name First|Last, which
   use the same FF container. Real FF columns; stack to one column on phones. */
.frm-fluent-form .ff-t-container { display: flex; gap: 16px; }
.frm-fluent-form .ff-t-container > .ff-t-cell { flex: 1 1 0; min-width: 0; }
@media (max-width: 560px) {
	.frm-fluent-form .ff-t-container { flex-direction: column; gap: 0; }
}

/* Submit — brand green, navy label, hover shade. Same on light and dark; the
   button carries its own fill. Replaces FF's default blue. */
.frm-fluent-form .ff-btn-submit {
	display: inline-block;
	padding: 15px 30px;
	font: inherit;
	font-weight: 600;
	font-size: 16px;
	color: var(--navy, #0A1533);
	background: var(--accent, #19C37D);
	border: 1.5px solid transparent;
	border-radius: 10px;
	box-shadow: none;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.frm-fluent-form .ff-btn-submit:hover {
	background: var(--accent2, #14A56A);
	color: var(--navy, #0A1533);
}
.frm-fluent-form .ff-btn-submit:focus-visible {
	outline: 3px solid var(--accent2, #14A56A);
	outline-offset: 3px;
}

/* On-page confirmation after submit (samePage / hide_form). */
.ff-message-success {
	padding: 18px 20px;
	font-size: 15px;
	line-height: 1.5;
	border: 1px solid var(--accent, #19C37D);
	border-radius: 12px;
}

/* ============================================================= *
 *  BASE COLOURS — light context (white body, e.g. /contact)
 * ============================================================= */

.frm-fluent-form .ff-el-input--label label { color: var(--navy, #0A1533); }
.frm-fluent-form .ff-el-is-required.asterisk-right label:after,
.frm-fluent-form .ff-el-is-required.asterisk-left label:before { color: var(--accent2, #14A56A); }

.frm-fluent-form input.ff-el-form-control,
.frm-fluent-form select.ff-el-form-control,
.frm-fluent-form textarea.ff-el-form-control {
	color: var(--navy, #0A1533);
	background: var(--lightsurface, #F5F7FA);
	border-color: var(--lightline, #E4E8F0);
}
.frm-fluent-form .ff-el-form-control::placeholder { color: var(--ink2, #5D6C86); }
.frm-fluent-form select.ff-el-form-control option { color: var(--navy, #0A1533); background: #FFFFFF; }

.frm-fluent-form .ff-el-form-control.has-error,
.frm-fluent-form .ff-el-is-error input.ff-el-form-control,
.frm-fluent-form .ff-el-is-error select.ff-el-form-control,
.frm-fluent-form .ff-el-is-error textarea.ff-el-form-control { border-color: #C0392B; }
.frm-fluent-form .error,
.frm-fluent-form .text-danger,
.frm-fluent-form .ff-el-is-error-message { margin-top: 6px; font-size: 13px; color: #C0392B; }

.ff-message-success {
	color: var(--navy, #0A1533);
	background: color-mix(in srgb, var(--accent, #19C37D) 10%, #FFFFFF);
}

/* ============================================================= *
 *  DARK OVERRIDE — .sec-dark / .sec-surface bands (e.g. /partners)
 * ============================================================= */

.sec-dark .frm-fluent-form .ff-el-input--label label,
.sec-surface .frm-fluent-form .ff-el-input--label label { color: var(--text, #F4F7FF); }

.sec-dark .frm-fluent-form input.ff-el-form-control,
.sec-dark .frm-fluent-form select.ff-el-form-control,
.sec-dark .frm-fluent-form textarea.ff-el-form-control,
.sec-surface .frm-fluent-form input.ff-el-form-control,
.sec-surface .frm-fluent-form select.ff-el-form-control,
.sec-surface .frm-fluent-form textarea.ff-el-form-control {
	color: var(--text, #F4F7FF);
	background: var(--surface, #101E42);
	border-color: rgba(244, 247, 255, .16);
}
.sec-dark .frm-fluent-form .ff-el-form-control::placeholder,
.sec-surface .frm-fluent-form .ff-el-form-control::placeholder { color: var(--text2, #97A3C2); }
.sec-dark .frm-fluent-form select.ff-el-form-control option,
.sec-surface .frm-fluent-form select.ff-el-form-control option { color: var(--text, #F4F7FF); background: var(--surface, #101E42); }

.sec-dark .frm-fluent-form .error,
.sec-dark .frm-fluent-form .text-danger,
.sec-dark .frm-fluent-form .ff-el-is-error-message,
.sec-surface .frm-fluent-form .error,
.sec-surface .frm-fluent-form .text-danger,
.sec-surface .frm-fluent-form .ff-el-is-error-message { color: #FFB4AE; }

.sec-dark .ff-message-success,
.sec-surface .ff-message-success {
	color: var(--text, #F4F7FF);
	background: color-mix(in srgb, var(--accent, #19C37D) 12%, transparent);
}
