/**
 * Rooster One contact form: its own layout. The fields, their labels and "(optional)", the error lines, the error box,
 * the privacy line and the button are the field recipe every form shares (assets/css/aieo-fields.css, a dependency of
 * this sheet; Offers 16-F24, the designer's form specification); this sheet places them.
 *
 * LAYOUT. With names="inline" (the default) first and last name sit side by side when the FORM is wide enough (a
 * container query, so a form in a narrow sidebar stacks even on a desktop) and stack on phones; names="stacked" keeps
 * them one under the other everywhere.
 */

.aieo-cf {
	--aieo-cf-gap: var(--wp--preset--spacing--4, 16px);
	box-sizing: border-box;
	container-type: inline-size;
	margin: 0 0 1.5em;
	max-width: 100%;
}

/* Under the theme the form is as wide as its fields need, not the page's content width (1280 px on the demo: an
 * email field of 1280 px): one column of 520 px with the names side by side (FE-F2). */
html[data-rooster-design="theme"] .aieo-cf {
	max-width: 520px;
}

.aieo-cf *,
.aieo-cf *::before,
.aieo-cf *::after {
	box-sizing: border-box;
}

.aieo-cf__title {
	margin: 0 0 0.4em;
}

.aieo-cf__intro {
	margin: 0 0 1em;
}

.aieo-cf__form {
	display: flex;
	flex-direction: column;
	gap: var(--aieo-cf-gap);
	margin: 0;
}

.aieo-cf__row--names {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--aieo-cf-gap);
}

/* names="inline": side by side once the form is wide enough. names="stacked"
 * keeps the single column at every width. */
@container (min-width: 480px) {
	.aieo-cf--names-inline .aieo-cf__row--names {
		grid-template-columns: 1fr 1fr;
	}
}

@supports not (container-type: inline-size) {
	@media (min-width: 600px) {
		.aieo-cf--names-inline .aieo-cf__row--names {
			grid-template-columns: 1fr 1fr;
		}
	}
}

.aieo-cf__field {
	min-width: 0;
	margin: 0;
}

/* The error box sits in the form's column, its gap below it like any field's. The form's placements outweigh the field
 * recipe's own margins (aieo-fields.css, (0,2,0)) instead of following them: the used CSS links the recipe's full sheet
 * after this one at the first input, and at equal weight the recipe's margin then won (Salvador's form +16 px at the
 * first input, its privacy line's 16 px; rooster-tools-9d, 27 Nov 2026). */
.aieo-cf .aieo-cf__form > .aieo-errsum {
	margin: 0;
}

/* The consent: its box, then its words; a refusal under both. */
.aieo-cf__check {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0 8px;
	align-items: start;
}

.aieo-cf__check > input {
	margin: 0.25em 0 0;
}

.aieo-cf__check > label {
	cursor: pointer;
}

.aieo-cf__check > .aieo-field-error {
	grid-column: 1 / -1;
}

.aieo-cf__actions {
	margin: 0;
}

/* The privacy line sits in the form's column, right above the button (its weight: the error box's note). */
.aieo-cf .aieo-cf__form > .aieo-privacy {
	margin: 0;
}

.aieo-cf__status:empty {
	display: none;
}

.aieo-cf__status {
	margin: 0 0 var(--aieo-cf-gap);
	padding: 10px 14px;
	border-left: 4px solid currentColor;
	background-color: var(--wp--preset--color--neutral-50);
}

.aieo-cf__status:focus {
	outline: none;
}

.aieo-cf__status.is-success {
	color: var(--wp--preset--color--success);
}

.aieo-cf__status.is-error {
	color: var(--wp--preset--color--danger);
}

/* Honeypot: off-canvas, never display:none (some bots skip hidden inputs). */
.aieo-cf__hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}
