/**
 * Family Forms — registration form.
 *
 * Layout only: no resets, no !important, no font or color opinions beyond the
 * tokens below. Everything inherits from the theme; override the custom
 * properties to restyle.
 *
 * Spacing is a strict 8px scale (--famforms-space-*). Every gap comes from
 * flex/grid `gap` or an explicit padding — never from a default margin — so the
 * rhythm cannot drift and margins can never collapse into each other.
 */

.famforms-form-wrap {
	/*
	 * The accent is a real color, not `currentColor`: a filled button sets its
	 * own `color`, and `currentColor` inside its own `background` would then
	 * resolve to that text color and paint the button invisible. A neutral ink
	 * default sits quietly in any theme; the block's accent attribute (or a
	 * theme override of this token) replaces it.
	 */
	--famforms-accent: #1d2327;
	--famforms-accent-contrast: #ffffff;
	--famforms-gap: 1rem;
	--famforms-radius: 10px;
	--famforms-radius-sm: 8px;
	--famforms-border: rgba(0, 0, 0, 0.2);
	--famforms-error: #b32d2e;
	--famforms-success: #007017;

	/* 8px scale. 1 = 4px, 2 = 8px, 3 = 12px, 4 = 16px, 5 = 24px, 6 = 32px. */
	--famforms-space-1: 0.25rem;
	--famforms-space-2: 0.5rem;
	--famforms-space-3: 0.75rem;
	--famforms-space-4: 1rem;
	--famforms-space-5: 1.5rem;
	--famforms-space-6: 2rem;

	/* Derived rhythm: one name per job, so every gap is a decision. */
	--famforms-pad: var(--famforms-space-6);
	--famforms-section-gap: var(--famforms-space-5);
	--famforms-field-gap: var(--famforms-space-4);
	--famforms-label-gap: var(--famforms-space-2);
	--famforms-control-height: 2.875rem;

	/* Surfaces derived from the inherited text color: theme- and mode-proof. */
	--famforms-surface: transparent;
	--famforms-surface-raised: transparent;
	--famforms-tint: transparent;

	display: flex;
	flex-direction: column;
	gap: var(--famforms-section-gap);
	margin: 0;
}

/*
 * Progressive enhancement: browsers that understand color-mix() get borders and
 * surfaces derived from the inherited color, so the card reads correctly on a
 * light or a dark theme without ever forcing a white background.
 */
@supports (color: color-mix(in srgb, currentColor 10%, transparent)) {
	.famforms-form-wrap {
		--famforms-border: color-mix(in srgb, currentColor 14%, transparent);
		--famforms-border-strong: color-mix(in srgb, currentColor 28%, transparent);
		--famforms-surface-raised: color-mix(in srgb, currentColor 3%, transparent);
		--famforms-tint: color-mix(in srgb, currentColor 4%, transparent);
	}
}

/*
 * A dark viewer preference only changes how much lift a surface needs; the
 * colors themselves still come from the theme's own text color.
 */
@supports (color: light-dark(white, black)) {
	.famforms-form-wrap {
		--famforms-accent: light-dark(#1d2327, #e9edf2);
		--famforms-accent-contrast: light-dark(#ffffff, #16191d);
	}
}

/* Event summary -------------------------------------------------------- */

.famforms-event-summary {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-space-2);
}

.famforms-event-title {
	margin: 0;
	line-height: 1.2;
}

.famforms-event-meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--famforms-space-2) var(--famforms-space-3);
	opacity: 0.75;
	font-size: 0.9375em;
}

.famforms-event-meta > li + li {
	display: flex;
	align-items: center;
	gap: var(--famforms-space-3);
}

.famforms-event-meta > li + li::before {
	content: "";
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
}

/* The form card -------------------------------------------------------- */

.famforms-form {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-section-gap);
	padding: var(--famforms-pad);
	border: 1px solid var(--famforms-border);
	border-radius: var(--famforms-radius);
	background: var(--famforms-surface);
	min-width: 0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/*
 * The error slot is always in the DOM and usually [hidden]. `display: contents`
 * keeps the empty wrapper from claiming a slot — and a gap — of its own.
 */
.famforms-messages {
	display: contents;
}

/* Fields --------------------------------------------------------------- */

/*
 * A field is a label stacked on its control. `flex: 0 1 auto` is deliberate:
 * inside a column flex container a flex-basis is a HEIGHT, so the old
 * `flex: 1 1 12rem` reserved 12rem of empty space under every field.
 * Row contexts opt back in to a basis explicitly.
 */
.famforms-field {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: var(--famforms-label-gap);
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
}

.famforms-field > label,
.famforms-field > span:first-child {
	line-height: 1.3;
	font-size: 0.9375em;
	font-weight: 600;
	opacity: 0.9;
}

.famforms-form input[type="text"],
.famforms-form input[type="email"],
.famforms-form input[type="date"],
.famforms-form input[type="number"],
.famforms-form select,
.famforms-form textarea {
	font: inherit;
	color: inherit;
	width: 100%;
	max-width: 100%;
	/*
	 * One height for every control: left to themselves a text input, a native
	 * date field and a select each pick a different intrinsic height, which is
	 * what made the old rows look ragged.
	 */
	height: var(--famforms-control-height);
	padding: var(--famforms-space-2) var(--famforms-space-3);
	border: 1px solid var(--famforms-border-strong, var(--famforms-border));
	border-radius: var(--famforms-radius-sm);
	background: transparent;
	box-sizing: border-box;
	line-height: 1.3;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.famforms-form textarea {
	height: auto;
	min-height: 6.5rem;
	padding: var(--famforms-space-3);
	resize: vertical;
	line-height: 1.5;
}

.famforms-form select {
	/* Room for the native arrow, so long option labels never sit under it. */
	padding-right: var(--famforms-space-5);
}

.famforms-form input:hover:not([disabled]),
.famforms-form select:hover:not([disabled]),
.famforms-form textarea:hover:not([disabled]) {
	border-color: currentColor;
}

.famforms-form input:focus-visible,
.famforms-form select:focus-visible,
.famforms-form textarea:focus-visible,
.famforms-form button:focus-visible,
.famforms-form a:focus-visible {
	outline: 2px solid var(--famforms-accent);
	outline-offset: 2px;
	border-radius: var(--famforms-radius-sm);
}

.famforms-form input[aria-invalid="true"],
.famforms-form textarea[aria-invalid="true"],
.famforms-form select[aria-invalid="true"] {
	border-color: var(--famforms-error);
}

.famforms-required {
	color: var(--famforms-error);
	text-decoration: none;
	border: 0;
}

/* Sub-cards: "Who is attending?" and the household picker --------------- */

/*
 * Fieldsets render `display: block` on purpose: a floated legend is the only
 * reliable way to lose the browser's border notch and get a clean card edge.
 * Spacing comes from the owl selector so there is exactly one gap value here.
 */
.famforms-attendees,
.famforms-members {
	display: block;
	border: 1px solid var(--famforms-border);
	border-radius: var(--famforms-radius);
	padding: var(--famforms-space-5);
	margin: 0;
	min-width: 0;
	background: transparent;
}

.famforms-attendees > legend,
.famforms-members > legend {
	float: left;
	width: 100%;
	padding: 0;
	/* The float's own bottom margin sets the legend-to-content rhythm. */
	margin: 0 0 var(--famforms-space-4);
	font-weight: 600;
	line-height: 1.3;
}

.famforms-attendees > * + *,
.famforms-members > * + * {
	margin-top: var(--famforms-space-4);
}

.famforms-attendees > legend + *,
.famforms-members > legend + * {
	/* Clears the float; the legend's margin already provides the gap. */
	clear: both;
	margin-top: 0;
}

.famforms-attendees::after,
.famforms-members::after {
	content: "";
	display: block;
	clear: both;
}

.famforms-attendee-rows {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-space-4);
}

/* One attendee = one card. Fields sit on a shared grid so labels line up. */
.famforms-attendee-row,
.famforms-member {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	align-items: end;
	gap: var(--famforms-space-4);
	padding: var(--famforms-space-4);
	border: 1px solid var(--famforms-border);
	border-radius: var(--famforms-radius-sm);
	background: var(--famforms-surface-raised);
	min-width: 0;
}

/* Full-width members of a row: questions, the save toggle, the remove button. */
.famforms-attendee-row > .famforms-questions,
.famforms-attendee-row > .famforms-remove-attendee,
.famforms-attendee-row > .famforms-save-household,
.famforms-member > .famforms-questions {
	grid-column: 1 / -1;
}

/* Date of birth is a <label> wrapper, not a .famforms-field div. */
.famforms-attendee-dob {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: var(--famforms-label-gap);
	min-width: 0;
	margin: 0;
}

.famforms-attendee-dob > span {
	line-height: 1.3;
	font-size: 0.9375em;
	font-weight: 600;
	opacity: 0.9;
}

.famforms-save-household {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: var(--famforms-space-2);
	padding: 0;
	margin: 0;
	cursor: pointer;
	font-size: 0.9375em;
}

/* Household members --------------------------------------------------- */

.famforms-members {
	--famforms-member-gap: var(--famforms-space-3);
}

.famforms-member-check {
	display: flex;
	align-items: center;
	gap: var(--famforms-space-2);
	flex-wrap: wrap;
	min-width: 0;
	cursor: pointer;
	font-weight: 600;
}

.famforms-member-age,
.famforms-member-reason {
	opacity: 0.7;
	font-size: 0.875em;
	font-weight: 400;
}

.famforms-member[data-famforms-member-ineligible] {
	opacity: 0.6;
}

.famforms-member[data-famforms-member-ineligible] .famforms-member-check {
	cursor: not-allowed;
}

.famforms-member select[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

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

.famforms-form button {
	font: inherit;
	line-height: 1.2;
}

/* Secondary / ghost: Add attendee, Back. */
.famforms-add-attendee,
.famforms-step-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--famforms-space-2);
	min-height: var(--famforms-control-height);
	padding: var(--famforms-space-2) var(--famforms-space-4);
	color: inherit;
	background: var(--famforms-surface-raised);
	border: 1px solid var(--famforms-border-strong, var(--famforms-border));
	border-radius: var(--famforms-radius-sm);
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9375em;
	transition: border-color 120ms ease, background-color 120ms ease;
}

.famforms-add-attendee:hover,
.famforms-step-back:hover {
	border-color: currentColor;
}

.famforms-add-attendee {
	align-self: flex-start;
}

/* Quiet destructive action: text-weight until hovered. */
.famforms-remove-attendee {
	justify-self: end;
	align-self: end;
	padding: var(--famforms-space-1) var(--famforms-space-2);
	color: inherit;
	background: transparent;
	border: 0;
	border-radius: var(--famforms-radius-sm);
	cursor: pointer;
	opacity: 0.65;
	font-size: 0.875em;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: opacity 120ms ease, color 120ms ease;
}

.famforms-remove-attendee:hover {
	opacity: 1;
	color: var(--famforms-error);
}

/*
 * A lone attendee cannot be removed. Collapsing the button rather than hiding
 * it keeps the card from reserving a row of empty space for a control that is
 * not there.
 */
.famforms-attendee-rows[data-single-row] .famforms-remove-attendee {
	display: none;
}

/* Primary: Next and Register. Filled with the accent, contrast text on top. */
.famforms-step-next,
.famforms-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--famforms-control-height);
	padding: var(--famforms-space-2) var(--famforms-space-6);
	color: var(--famforms-accent-contrast);
	background: var(--famforms-accent);
	border: 1px solid transparent;
	border-radius: var(--famforms-radius-sm);
	cursor: pointer;
	font-weight: 600;
	transition: opacity 120ms ease, transform 120ms ease;
}

.famforms-step-next:hover,
.famforms-submit:hover {
	opacity: 0.88;
}

.famforms-step-next:active,
.famforms-submit:active {
	transform: translateY(1px);
}

.famforms-submit[disabled] {
	opacity: 0.6;
	cursor: progress;
}

/* Guest count: a short number field that drives the repeater below it. */
.famforms-count-field {
	align-items: flex-start;
}

.famforms-count-field input[type="number"] {
	width: 7rem;
}

.famforms-count-note {
	margin: 0;
	opacity: 0.8;
	font-size: 0.875em;
	line-height: 1.4;
}

.famforms-count-note:empty {
	display: none;
}

/* Priced questions: the "$12.00 each" hint and the currency prefix. */
.famforms-question-hint {
	opacity: 0.7;
	font-size: 0.875em;
}

.famforms-question-currency {
	display: inline-flex;
	align-items: center;
	opacity: 0.7;
}

/* Live total + the form's own controls: one bar welded to the card bottom. */
.famforms-form-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: var(--famforms-space-4);
	/* Pull out to the card edges so the bar reads as part of the card. */
	margin: 0 calc(-1 * var(--famforms-pad)) calc(-1 * var(--famforms-pad));
	padding: var(--famforms-space-5) var(--famforms-pad);
	border-top: 1px solid var(--famforms-border);
	border-radius: 0 0 calc(var(--famforms-radius) - 1px) calc(var(--famforms-radius) - 1px);
	background: var(--famforms-tint);
}

.famforms-total {
	margin: 0;
	margin-right: auto;
	font-size: 1.125em;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: var(--famforms-control-height);
}

.famforms-form-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--famforms-space-3);
}

/* Multi-step: one step visible at a time, driven by the [hidden] attribute. */
.famforms-steps,
.famforms-step {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-section-gap);
	min-width: 0;
}

.famforms-steps [hidden],
.famforms-form [hidden] {
	display: none;
}

/* Progress: a segmented header welded to the top of the card. */
.famforms-progress {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--famforms-space-3);
	margin: calc(-1 * var(--famforms-pad)) calc(-1 * var(--famforms-pad)) 0;
	padding: var(--famforms-space-4) var(--famforms-pad);
	border-bottom: 1px solid var(--famforms-border);
	border-radius: calc(var(--famforms-radius) - 1px) calc(var(--famforms-radius) - 1px) 0 0;
	background: var(--famforms-tint);
}

.famforms-progress-text {
	margin: 0;
	font-size: 0.875em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.7;
}

.famforms-progress-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--famforms-space-2);
	margin: 0;
	padding: 0;
}

.famforms-progress-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	font-size: 0.8125em;
	font-weight: 700;
	line-height: 1;
	border: 1px solid var(--famforms-border-strong, var(--famforms-border));
	border-radius: 999px;
	opacity: 0.55;
	transition: opacity 120ms ease, background-color 120ms ease;
}

.famforms-progress-item[aria-current="step"] {
	color: var(--famforms-accent-contrast);
	background: var(--famforms-accent);
	border-color: transparent;
	opacity: 1;
}

.famforms-step-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--famforms-space-3);
}

/* Custom questions: one wrapper per question, groups rendered as fieldsets. */
.famforms-questions {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-field-gap);
	min-width: 0;
}

/* Registration-scope questions are their own section of the step. */
.famforms-step > .famforms-questions {
	gap: var(--famforms-section-gap);
}

.famforms-question {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-label-gap);
	min-width: 0;
	border: 0;
	margin: 0;
	padding: 0;
}

.famforms-question-label {
	display: block;
	line-height: 1.3;
	font-size: 0.9375em;
	font-weight: 600;
	opacity: 0.9;
	padding: 0;
}

/* Comfortable, tappable choices instead of bare radios on one cramped line. */
.famforms-question-options {
	display: flex;
	flex-wrap: wrap;
	gap: var(--famforms-space-2);
}

.famforms-question-option {
	display: inline-flex;
	align-items: center;
	gap: var(--famforms-space-2);
	min-height: 2.5rem;
	padding: var(--famforms-space-2) var(--famforms-space-4);
	border: 1px solid var(--famforms-border-strong, var(--famforms-border));
	border-radius: 999px;
	background: var(--famforms-surface-raised);
	cursor: pointer;
	line-height: 1.2;
	transition: border-color 120ms ease, background-color 120ms ease;
}

.famforms-question-option:hover {
	border-color: currentColor;
}

.famforms-question-option:has(input:checked) {
	border-color: var(--famforms-accent);
	background: var(--famforms-tint);
	font-weight: 600;
}

.famforms-question-check {
	display: flex;
	align-items: flex-start;
	gap: var(--famforms-space-3);
	padding: var(--famforms-space-3);
	border: 1px solid var(--famforms-border);
	border-radius: var(--famforms-radius-sm);
	background: var(--famforms-surface-raised);
	cursor: pointer;
	line-height: 1.4;
	transition: border-color 120ms ease, background-color 120ms ease;
}

.famforms-question-check:hover {
	border-color: currentColor;
}

.famforms-question-check:has(input:checked) {
	border-color: var(--famforms-accent);
	background: var(--famforms-tint);
}

.famforms-question-check .famforms-question-label {
	font-weight: 400;
	opacity: 1;
	font-size: 1em;
}

/* Nudge native controls onto the text baseline and give them room to breathe. */
.famforms-question-option input[type="radio"],
.famforms-question-option input[type="checkbox"],
.famforms-question-check input[type="checkbox"],
.famforms-member-check input[type="checkbox"],
.famforms-save-household input[type="checkbox"] {
	flex: none;
	width: 1.0625rem;
	height: 1.0625rem;
	margin: 0;
	accent-color: var(--famforms-accent);
	cursor: pointer;
}

.famforms-question-check input[type="checkbox"] {
	margin-top: 0.15em;
}

.famforms-question--consent > .famforms-question-label {
	font-weight: 600;
}

/* Quantity and donation keep their label on top, control and hint inline. */
.famforms-question--quantity,
.famforms-question--donation {
	flex-flow: row wrap;
	align-items: center;
	gap: var(--famforms-label-gap) var(--famforms-space-3);
}

.famforms-question--quantity > .famforms-question-label,
.famforms-question--donation > .famforms-question-label {
	flex: 1 1 100%;
}

.famforms-question--quantity input[type="number"],
.famforms-question--donation input[type="number"] {
	max-width: 9rem;
}


/* Confirmation panel --------------------------------------------------- */

/*
 * The thank-you / receipt panel. Same card, same tokens, same spacing scale as
 * the form it replaces: a registrant should recognize where they still are.
 */
.famforms-confirmation,
.famforms-confirmation-notice {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-section-gap);
	padding: var(--famforms-pad);
	border: 1px solid var(--famforms-border);
	border-radius: var(--famforms-radius);
	background: var(--famforms-surface);
	min-width: 0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.famforms-confirmation-head {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-space-2);
}

/* The check mark: a quiet badge, sized from the text so it scales with it. */
.famforms-confirmation-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	border-radius: 50%;
	border: 1px solid currentColor;
	color: var(--famforms-success);
	font-size: 1.125em;
	line-height: 1;
}

.famforms-confirmation--pending .famforms-confirmation-mark {
	color: inherit;
	opacity: 0.6;
}

.famforms-confirmation-title {
	margin: 0;
	line-height: 1.2;
}

.famforms-confirmation-lead {
	margin: 0;
	opacity: 0.8;
	line-height: 1.5;
}

.famforms-confirmation-section {
	display: flex;
	flex-direction: column;
	gap: var(--famforms-space-3);
	padding-top: var(--famforms-space-5);
	border-top: 1px solid var(--famforms-border);
}

.famforms-confirmation-subtitle {
	margin: 0;
	font-size: 0.9375em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.7;
}

.famforms-confirmation-attendees,
.famforms-confirmation-lines {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--famforms-space-2);
}

.famforms-confirmation-attendee,
.famforms-confirmation-line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--famforms-space-2) var(--famforms-space-3);
	padding: var(--famforms-space-2) var(--famforms-space-3);
	border-radius: var(--famforms-radius-sm);
	background: var(--famforms-tint);
	line-height: 1.4;
}

.famforms-confirmation-attendee-type,
.famforms-confirmation-line-qty {
	opacity: 0.7;
	font-size: 0.9375em;
}

.famforms-confirmation-line-amount {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.famforms-confirmation-total {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--famforms-space-2) var(--famforms-space-3);
	margin: 0;
	padding: 0 var(--famforms-space-3);
	font-weight: 700;
}

.famforms-confirmation-total-amount {
	font-variant-numeric: tabular-nums;
}

.famforms-confirmation-paidat,
.famforms-confirmation-reference,
.famforms-confirmation-email,
.famforms-confirmation-contact {
	margin: 0;
	opacity: 0.75;
	font-size: 0.9375em;
	line-height: 1.5;
}

.famforms-confirmation-meta {
	gap: var(--famforms-space-2);
}

.famforms-confirmation-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--famforms-space-3);
}

/* Same shape as the submit button, so the panel's calls to action match it. */
.famforms-confirmation-action {
	display: inline-flex;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	min-height: var(--famforms-control-height);
	padding: var(--famforms-space-2) var(--famforms-space-5);
	border: 1px solid var(--famforms-accent);
	border-radius: var(--famforms-radius-sm);
	background: var(--famforms-accent);
	color: var(--famforms-accent-contrast);
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
}

.famforms-confirmation-action:hover,
.famforms-confirmation-action:focus {
	color: var(--famforms-accent-contrast);
	text-decoration: none;
	opacity: 0.9;
}

.famforms-confirmation-action--plain {
	background: transparent;
	color: inherit;
	border-color: var(--famforms-border-strong, var(--famforms-border));
}

.famforms-confirmation-action--plain:hover,
.famforms-confirmation-action--plain:focus {
	color: inherit;
	background: var(--famforms-tint);
}

/* A neutral notice: no alarm colors, it is not an error. */
.famforms-confirmation-notice {
	gap: var(--famforms-space-3);
}

.famforms-confirmation-notice p {
	margin: 0;
	line-height: 1.5;
}

.famforms-confirmation-notice-title {
	font-weight: 700;
}

/* Messages ------------------------------------------------------------- */

.famforms-message {
	margin: 0;
	padding: var(--famforms-space-3) var(--famforms-space-4);
	border-radius: var(--famforms-radius-sm);
	border: 1px solid currentColor;
	line-height: 1.4;
}

.famforms-message--error {
	color: var(--famforms-error);
}

.famforms-message--success {
	color: var(--famforms-success);
}

.famforms-editor-notice {
	padding: var(--famforms-space-3) var(--famforms-space-4);
	border: 1px dashed var(--famforms-border);
	border-radius: var(--famforms-radius-sm);
}

/* Visually hidden, still announced: the per-step "Step x of y" labels. */
.famforms-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Honeypot: off-screen for people, still reachable (and fillable) by bots. */
.famforms-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Mobile: single column, full-width controls, tighter card padding. */
@media (max-width: 40em) {
	.famforms-form-wrap {
		--famforms-pad: var(--famforms-space-4);
		--famforms-section-gap: var(--famforms-space-4);
	}

	.famforms-attendees,
	.famforms-members {
		padding: var(--famforms-space-4);
	}

	.famforms-attendee-row,
	.famforms-member {
		grid-template-columns: minmax(0, 1fr);
	}

	.famforms-count-field,
	.famforms-count-field input[type="number"] {
		max-width: none;
	}

	.famforms-form-footer {
		justify-content: stretch;
		gap: var(--famforms-space-3);
	}

	.famforms-total {
		flex: 1 1 100%;
		line-height: 1.3;
	}

	.famforms-form-actions,
	.famforms-step-nav {
		flex: 1 1 100%;
		gap: var(--famforms-space-2);
	}

	.famforms-step-nav {
		flex-wrap: nowrap;
	}

	.famforms-step-back,
	.famforms-step-next,
	.famforms-submit,
	.famforms-add-attendee {
		flex: 1 1 auto;
		width: 100%;
	}

	.famforms-question-option {
		flex: 1 1 auto;
		justify-content: center;
	}

	.famforms-confirmation-actions {
		flex-direction: column;
		gap: var(--famforms-space-2);
	}

	.famforms-confirmation-action {
		width: 100%;
	}

	.famforms-confirmation-attendee,
	.famforms-confirmation-line {
		flex-direction: column;
		align-items: flex-start;
	}
}
