/* ============================================================
 * Global Gravity Forms skin — the mockup's .pg-field system
 * (lighthawk-pages.css, Request a Flight form) applied to EVERY
 * Gravity Form sitewide, so client-created forms are on-brand
 * with zero setup. Tokens only (theme.json).
 *
 * Scope notes:
 *  - `.gform_wrapper.gravity-theme` — the theme forces the
 *    gravity-theme framework (gform_form_theme_slug filter).
 *  - `:not(.site-footer *)` on structural rules — the footer
 *    newsletter has its own compact one-row skin (navigation.css)
 *    that must keep winning regardless of load order.
 *  - Fields always fill their grid column (width: 100%), so GF
 *    size settings (small/medium/large) stop shrinking inputs.
 * ============================================================ */

/* ---------- labels ---------- */
.gform_wrapper.gravity-theme .gfield_label {
	font-family: var( --wp--preset--font-family--body );
	font-size: 13px;
	font-weight: 700;
	color: var( --wp--preset--color--primary );
	letter-spacing: 0.01em;
	margin-bottom: 8px;
}

/* "(Required)" marker — the mockup's terra asterisk tint. (Doubled
   context beats the label rule the span otherwise inherits from.) */
.gform_wrapper.gravity-theme .gfield_label .gfield_required,
.gform_wrapper.gravity-theme .gfield_required,
.gform_wrapper.gravity-theme .gfield_required .gfield_required_text {
	color: var( --wp--custom--brand--signal-bright );
	font-size: 12px;
	font-weight: 600;
}

/* ---------- text-like inputs, selects, textareas ---------- */
.gform_wrapper.gravity-theme
	:is(
		input:not( [type='radio'], [type='checkbox'], [type='submit'], [type='button'], [type='image'], [type='file'] ),
		select,
		textarea
	):not( .site-footer * ) {
	font-family: var( --wp--preset--font-family--body );
	font-size: 15px;
	color: var( --wp--preset--color--contrast );
	width: 100%;
	box-sizing: border-box;
	padding: 13px 15px;
	border: 1.5px solid var( --wp--custom--border--hairline );
	border-radius: var( --wp--custom--radius--input );
	background-color: var( --wp--preset--color--base );
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gform_wrapper.gravity-theme
	:is( input, textarea ):not( .site-footer * )::placeholder {
	color: var( --wp--preset--color--meta );
	opacity: 1;
}

.gform_wrapper.gravity-theme
	:is(
		input:not( [type='radio'], [type='checkbox'], [type='submit'], [type='button'] ),
		select,
		textarea
	):not( .site-footer * ):focus {
	outline: none;
	border-color: var( --wp--custom--brand--sky );
	box-shadow: 0 0 0 4px color-mix( in srgb, var( --wp--custom--brand--sky ) 16%, transparent );
	background-color: var( --wp--preset--color--white );
}

.gform_wrapper.gravity-theme textarea:not( .site-footer * ) {
	resize: vertical;
	min-height: 120px;
}

/* Selects: custom chevron, native arrow off (mockup .pg-field select). */
.gform_wrapper.gravity-theme select:not( .site-footer * ) {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2354657a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px 16px;
	padding-right: 40px;
	cursor: pointer;
}

/* ---------- radios & checkboxes (mockup .pg-choice) ---------- */
.gform_wrapper.gravity-theme .gfield input[type='radio'],
.gform_wrapper.gravity-theme .gfield input[type='checkbox'] {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1.5px solid var( --wp--custom--border--hairline );
	border-radius: 6px;
	background: var( --wp--preset--color--base );
	cursor: pointer;
	position: relative;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.gform_wrapper.gravity-theme .gfield input[type='radio'] {
	border-radius: 50%;
}

.gform_wrapper.gravity-theme .gfield input[type='radio']:checked,
.gform_wrapper.gravity-theme .gfield input[type='checkbox']:checked {
	background-color: var( --wp--custom--brand--sky );
	border-color: var( --wp--custom--brand--sky );
	background-repeat: no-repeat;
	background-position: center;
}

/* Painted marks via background-image (input pseudo-elements are not
   reliably rendered cross-browser). */
.gform_wrapper.gravity-theme .gfield input[type='radio']:checked {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='4' fill='white'/%3E%3C/svg%3E");
	background-size: 20px 20px;
}

.gform_wrapper.gravity-theme .gfield input[type='checkbox']:checked {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 7 12l6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: 13px 13px;
}

.gform_wrapper.gravity-theme .gfield input[type='radio']:focus-visible,
.gform_wrapper.gravity-theme .gfield input[type='checkbox']:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px color-mix( in srgb, var( --wp--custom--brand--sky ) 16%, transparent );
}

.gform_wrapper.gravity-theme .gchoice {
	display: flex;
	align-items: center;
	gap: 12px;
}

.gform_wrapper.gravity-theme .gchoice label {
	font-family: var( --wp--preset--font-family--body );
	font-size: 14.5px;
	line-height: 1.45;
	color: var( --wp--preset--color--muted );
	cursor: pointer;
	margin: 0;
}

/* ---------- hints / descriptions (mockup .hint) ---------- */
.gform_wrapper.gravity-theme .gfield_description:not( .validation_message ) {
	font-family: var( --wp--preset--font-family--body );
	font-size: 12.5px;
	font-weight: 600;
	color: var( --wp--preset--color--muted );
	padding-top: 6px;
}

/* ---------- submit — the global button system ---------- */
.gform_wrapper.gravity-theme :is( input, button )[type='submit']:not( .site-footer * ) {
	font-family: var( --wp--preset--font-family--body );
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	letter-spacing: 0.01em;
	min-height: 56px;
	padding: 15px 28px;
	width: auto;
	border: 1.5px solid transparent;
	border-radius: var( --wp--custom--radius--button );
	background: var( --wp--preset--color--primary );
	color: var( --wp--preset--color--white );
	box-shadow: var( --wp--custom--shadow--button-glow );
	cursor: pointer;
	transition: background-color 0.25s var( --wp--custom--ease--out ), transform 0.25s var( --wp--custom--ease--out );
}

.gform_wrapper.gravity-theme :is( input, button )[type='submit']:not( .site-footer * ):hover,
.gform_wrapper.gravity-theme :is( input, button )[type='submit']:not( .site-footer * ):focus-visible {
	background: var( --wp--preset--color--primary-hover );
}

@media ( prefers-reduced-motion: no-preference ) {
	.gform_wrapper.gravity-theme :is( input, button )[type='submit']:not( .site-footer * ):hover,
	.gform_wrapper.gravity-theme :is( input, button )[type='submit']:not( .site-footer * ):focus-visible {
		transform: translateY( -2px );
	}
}

/* ------------------------------------------------------------------------
 * Submit breathing room (client, 2026-07-29): every GF submit row sits too
 * tight against the last field — give the footer a clear gap site-wide.
 * (Footer newsletter keeps its own compact skin.)
 * ---------------------------------------------------------------------- */
.gform_wrapper.gravity-theme .gform_footer:not( .site-footer * ),
.gform_wrapper .gform-footer:not( .site-footer * ) {
	margin-top: 28px;
	padding-top: 0;
}
