/**
 * _forms.css — Gravity Forms in the kit's look, native fields outside Gravity Forms, and the form panel.
 * Owns: Gravity Forms variables on .gform-theme--orbital; checkbox and radio controls; 44px choice rows; the 2px error
 * border; native text fields, selects and textareas; .rl-form-panel; WP Armour's honeypot field.
 * Doesn't own: colors, radius, label size and the field size tier (inc/forms.php → gform_default_styles).
 * Depends on: global/_tokens.css. Gravity Forms prints those defaults per form with an ID selector and points its size
 * variables at the -lg ones: so this sets the -lg sources, and only the variables those per-form rules leave alone.
 * Fields: square, 14 × 16 padding (≈ 50px), 16px; focus = navy border + the teal ring (STYLE.md → Forms).
 */
.gform-theme.gform-theme--orbital {
	--gf-ctrl-font-family: var(--rl-font-body);
	--gf-ctrl-font-size: 16px;
	--gf-ctrl-size-lg: 50px;
	--gf-ctrl-padding-x: 16px;
	--gf-ctrl-shadow: none;
	--gf-ctrl-border-color-focus: var(--rl-color-brand);
	--gf-ctrl-outline-width-focus: 3px;
	--gf-ctrl-outline-color-focus: rgba(96, 189, 195, 0.45);
	--gf-ctrl-outline-offset: 0;
	--gf-ctrl-label-font-family-primary: var(--rl-font-body);
	--gf-ctrl-label-font-weight-primary: 600;
	--gf-ctrl-label-font-family-secondary: var(--rl-font-body);
	--gf-ctrl-label-font-size-secondary: 16px;
	--gf-ctrl-label-font-weight-secondary: 400;
	--gf-ctrl-desc-font-family-error: var(--rl-font-body);
	--gf-ctrl-desc-font-size-error: 16px;
	--gf-ctrl-desc-font-weight-error: 600;
	--gf-ctrl-desc-color-error: var(--rl-color-error);
	--gf-ctrl-border-color-error: var(--rl-color-error);
	--gf-ctrl-choice-size-lg: 22px;
	--gf-ctrl-checkbox-check-size-lg: 14px;
	--gf-ctrl-radio-check-size-lg: 10px;
	--gf-ctrl-btn-font-family: var(--rl-font-body);
	--gf-ctrl-btn-font-weight: 700;
	--gf-ctrl-btn-font-size-lg: 16px;
	--gf-ctrl-btn-line-height: 1.25;
	--gf-ctrl-btn-padding-x-lg: 28px;
	--gf-ctrl-btn-size-lg: 48px; /* the site's buttons: 12px padding, a 20px line, 2px borders */
	--gf-ctrl-btn-radius: 2px;
	--gf-ctrl-btn-border-width-primary: 2px;
	--gf-ctrl-btn-border-color-primary: var(--rl-color-accent-strong);
	--gf-ctrl-btn-bg-color-hover-primary: var(--rl-color-brand);
	--gf-ctrl-btn-border-color-hover-primary: var(--rl-color-brand);
	--gf-ctrl-btn-color-hover-primary: var(--rl-white);
	--gf-ctrl-btn-bg-color-focus-primary: var(--rl-color-accent-strong);
	--gf-ctrl-btn-border-color-focus-primary: var(--rl-color-accent-strong);
	--gf-ctrl-btn-shadow: none;
	--gf-ctrl-btn-shadow-hover: none;
	--gf-ctrl-btn-shadow-focus: none;
	--gf-form-gap-y: 24px; /* rows 24px apart, not Orbital's 40 — a shorter form (Markup #15, 2026-10-28) */
}

/* Errors: a 2px border (Gravity Forms draws 1px). */
.gform-theme.gform-theme--orbital .gfield_error {
	--gf-ctrl-border-width: 2px;
}

/* Choices and the submit take the site's outline (3px navy, 3px out), like every other control. Its submit rule draws
   the outline from these variables, so the footer sets them. */
body:not(.wp-admin) .gform-theme--orbital :is(input[type="checkbox"], input[type="radio"]):focus-visible {
	outline: 3px solid var(--rl-color-brand);
	outline-offset: 3px;
}

.gform-theme.gform-theme--orbital .gform_footer {
	--gf-ctrl-outline-width-focus: 3px;
	--gf-ctrl-outline-color-focus: var(--rl-color-brand);
	--gf-ctrl-outline-offset: 3px;
}

/* Choices: 44px rows; 22px navy controls. */
.gform-theme--orbital .gchoice {
	display: flex;
	align-items: center;
	min-height: 44px;
}

.gform-theme.gform-theme--orbital input:is([type="checkbox"], [type="radio"]) {
	border: 2px solid var(--rl-color-brand);
	background-color: var(--rl-white);
}

.gform-theme.gform-theme--orbital input[type="checkbox"] {
	border-radius: 0;
}

.gform-theme.gform-theme--orbital input[type="checkbox"]:checked {
	background-color: var(--rl-color-brand);
}

.gform-theme.gform-theme--orbital input[type="checkbox"]:checked::before {
	color: var(--rl-white);
}

/* Native fields outside Gravity Forms (search, comments): the same look. Astra styles them at (0,1,1). */
.site :is(input:is([type="text"], [type="email"], [type="search"], [type="tel"], [type="url"], [type="password"], [type="number"]), select, textarea):not(.gform-theme *) {
	min-height: 50px;
	padding: 14px 16px;
	border: 1px solid var(--rl-color-field-border);
	border-radius: 0;
	background-color: var(--rl-white);
	font-family: var(--rl-font-body);
	font-size: 16px;
	line-height: 20px;
	color: var(--rl-color-headings);
	transition: border-color var(--rl-ease), box-shadow var(--rl-ease);
}

.site :is(input:is([type="text"], [type="email"], [type="search"], [type="tel"], [type="url"], [type="password"], [type="number"]), select, textarea):not(.gform-theme *):focus-visible {
	border-color: var(--rl-color-brand);
	outline: none;
	box-shadow: var(--rl-focus-ring);
}

.site [aria-invalid="true"]:is(input, select, textarea):not(.gform-theme *) {
	border: 2px solid var(--rl-color-error);
}

/* "* indicates required fields" centered under a panel's centered title (Markup #16, 2026-10-28). */
.rl-form-panel .gform_required_legend {
	text-align: center;
}

/* The form panel: white, square, the elevated shadow (the homepage's contact card). */
:is(.site, .editor-styles-wrapper) .rl-form-panel.rl-form-panel {
	padding: 40px;
	border: 0;
	border-radius: 0;
	background: var(--rl-white);
	box-shadow: var(--rl-shadow-elevated);
}

@media (max-width: 768px) {
	:is(.site, .editor-styles-wrapper) .rl-form-panel.rl-form-panel {
		padding: 24px;
	}
}

/* A shorter form on phones (Markup #39, 2026-10-28): Gravity Forms stacks every field below 640px and drops its column
   gap; First and Last Name stay side by side (inc/forms.php marks the pair) with the gap back, and the message box is
   96px, not 130. */
@media (max-width: 640px) {
	.gform-theme.gform-theme--orbital .gform_fields:has(> .rl-field--pair) {
		column-gap: var(--gf-form-gap-x);
	}

	.gform-theme.gform-theme--orbital .gform_fields .gfield.rl-field--pair {
		grid-column: span 6;
	}

	.gform-theme.gform-theme--orbital {
		--gf-ctrl-textarea-height: 96px;
	}
}

/* WP Armour's honeypot ("Alternative:", added by its script to every form) is a 1px clipped box: hidden from sight but
   still a keyboard stop and a field a screen reader announces. Out of the tab order and the accessibility tree; bots
   still fill it. */
:is(#altEmail_container, .altEmail_container) {
	visibility: hidden;
}
