/*
 * Fluent Forms (PT intake: one page, four headed sections).
 * Matches the prototype's enquiry panel: chips for multi-choice, option cards for single choice,
 * uppercase burgundy labels, rose focus ring, full-width primary submit.
 */

html:root {
	--fluentform-primary: var(--sgc-brand);
	--fluentform-secondary: var(--sgc-muted);
	--fluentform-danger: var(--sgc-warn);
	--fluentform-border-color: var(--sgc-line);
	--fluentform-border-radius: var(--sgc-radius-field);
}

/* The form sits in a cream-light panel. */
.fluentform.ff-default {
	background: var(--sgc-surface);
	border: 1px solid var(--sgc-line);
	border-radius: var(--sgc-radius-card);
	padding: 26px;
	box-shadow: var(--sgc-card-shadow);
	color: var(--sgc-ink);
	font-family: var(--sgc-font-body);
}
@media (max-width: 600px) { .fluentform.ff-default { padding: 20px 16px; } }

/* Section headings ("1. Your goals"). */
.fluentform .ff-el-section-break { margin: 28px 0 14px; }
.fluentform .ff-el-group:first-child.ff-el-section-break,
.fluentform .ff-el-section-break:first-of-type { margin-top: 0; }
.fluentform .ff-el-section-title {
	font-family: var(--sgc-font-display) !important;
	font-weight: 700 !important;
	font-size: 1.4rem !important;
	line-height: 1.2;
	color: var(--sgc-heading) !important;
	margin: 0 0 4px !important;
}
.fluentform .ff-el-section-break .ff-section_break_desk { color: var(--sgc-muted); font-size: .9rem; }
.fluentform .ff-el-section-break hr { border-color: var(--sgc-line); margin-top: 14px; }

/* Labels: small uppercase, burgundy. */
.fluentform .ff-el-input--label label {
	font-weight: 700 !important;
	font-size: .7rem !important;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--sgc-heading) !important;
}
.fluentform .ff-el-is-required.asterisk-right label::after { color: var(--sgc-brand); }

/* Text inputs. */
.fluentform .ff-el-form-control {
	border-radius: var(--sgc-radius-field) !important;
	border: 1.5px solid var(--sgc-line) !important;
	background: var(--sgc-surface) !important;
	color: var(--sgc-ink) !important;
	padding: 12px 14px !important;
	font-size: 1rem !important;
}
.fluentform .ff-el-form-control:focus {
	border-color: var(--sgc-brand) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sgc-brand) 45%, transparent) !important;
}

/* Multi-choice checkboxes as chips (prototype goal chips). */
.fluentform .ff-el-input--content:has(input.ff-el-form-check-checkbox) {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.fluentform .ff-el-form-check:has(input.ff-el-form-check-checkbox) { margin: 0 !important; }
.fluentform .ff-el-form-check:has(input.ff-el-form-check-checkbox) .ff-el-form-check-label {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border: 1px solid var(--sgc-line);
	border-radius: 12px;
	background: var(--sgc-bg);
	color: var(--sgc-heading);
	font-size: .78rem;
	font-weight: 700;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}
.fluentform .ff-el-form-check:has(input.ff-el-form-check-checkbox) .ff-el-form-check-label:hover { background: var(--sgc-accent-soft); }
.fluentform input.ff-el-form-check-checkbox {
	position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
}
.fluentform .ff-el-form-check:has(input.ff-el-form-check-checkbox:checked) .ff-el-form-check-label {
	background: var(--sgc-brand);
	border-color: var(--sgc-brand);
	color: var(--sgc-on-brand);
}
.fluentform .ff-el-form-check:has(input.ff-el-form-check-checkbox:focus-visible) .ff-el-form-check-label { outline: 3px solid var(--sgc-brand); outline-offset: 2px; }

/* Single-choice radios as option cards (prototype .opt). */
.fluentform .ff-el-input--content:has(input.ff-el-form-check-radio) { display: grid; gap: 10px; }
.fluentform .ff-el-form-check:has(input.ff-el-form-check-radio) { margin: 0 !important; }
.fluentform .ff-el-form-check:has(input.ff-el-form-check-radio) .ff-el-form-check-label {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 14px 16px;
	border: 1.5px solid var(--sgc-line);
	border-radius: 14px;
	background: var(--sgc-surface);
	font-weight: 700;
	color: var(--sgc-ink);
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}
.fluentform .ff-el-form-check:has(input.ff-el-form-check-radio:checked) .ff-el-form-check-label {
	border-color: var(--sgc-brand);
	background: var(--sgc-accent-soft);
}
.fluentform input.ff-el-form-check-radio { accent-color: var(--sgc-brand); margin: 0; }

/* Consent checkboxes (PDPA, health data). */
.fluentform .ff-el-tc .ff_tc_label,
.fluentform .ff_gdpr_field + label,
.fluentform .ff-el-tc label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: .9rem;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: var(--sgc-ink);
}
.fluentform .ff_tc_checkbox input, .fluentform .ff-el-tc input[type="checkbox"] { margin-top: 3px; accent-color: var(--sgc-brand); flex-shrink: 0; }

/* Errors. */
.fluentform .ff-el-is-error .ff-el-form-control { border-color: var(--sgc-warn) !important; }
.fluentform .error.text-danger, .fluentform .ff-el-is-error .text-danger { color: var(--sgc-warn); font-size: .82rem; font-weight: 550; }

/* Submit: full-width primary. */
.fluentform .ff_submit_btn_wrapper { margin-top: 22px; }
.fluentform .ff-btn-submit,
.fluentform .ff-btn-submit:not(.ff_btn_no_style) {
	width: 100%;
	padding: 13px 22px !important;
	border-radius: var(--sgc-radius-btn) !important;
	background: var(--sgc-brand) !important;
	border: 0 !important;
	color: var(--sgc-on-brand) !important;
	font-weight: 700 !important;
	font-size: .78rem !important;
	text-transform: uppercase;
	letter-spacing: .05em;
	box-shadow: var(--sgc-btn-shadow);
}
.fluentform .ff-btn-submit:hover { background: var(--sgc-brand-hover) !important; opacity: 1 !important; }

/* Confirmation message. */
.ff-message-success {
	border: 0 !important;
	border-radius: var(--sgc-radius-card) !important;
	background: var(--sgc-ok-soft) !important;
	color: var(--sgc-ok-ink) !important;
	box-shadow: none !important;
}

/* Section breaks: palette line colour, not Fluent's grey. */
.fluentform hr, .fluentform .ff-el-section-break hr { background: var(--sgc-line) !important; border-color: var(--sgc-line) !important; }

/* Training-format options show their package price underneath (prototype). */
.fluentform .sgc-opt-price { display: block; font-weight: 400; font-size: .85rem; color: var(--sgc-muted); margin-top: 2px; }
.fluentform .ff-el-form-check:has(input.ff-el-form-check-radio) .ff-el-form-check-label:has(.sgc-opt-price) { align-items: flex-start; }
.fluentform .sgc-opt-sep { display: none; }
