/**
 * Gravity Forms on retreat pages.
 *
 * Auto-enqueued: inc/enqueue.php globs sections/retreat/*.css for the
 * page-retreat template, so this file needs no enqueue change.
 *
 * GF renders with its Orbital theme, driven by --gf-* custom properties.
 * Setting those is why this file needs no !important: we are feeding GF's own
 * inputs rather than overruling its output.
 *
 * THE SUBMIT BUTTON IS NOT STYLED HERE, and must not be. inc/gravityforms-styling.php
 * gives it `wp-block-button__link` (the theme's button) plus `gform-theme__disable`
 * (GF's own opt-out, which stands GF's 4-class framework selector down so the
 * theme's 1-class rule can win). It therefore inherits buttons.css -- including
 * the uppercase, the 0.9px letter-spacing and the <=768px arm that a hand-copied
 * version kept missing. Change the button in buttons.css.
 *
 * The classes ALONE were not enough: without `gform-theme__disable` the button
 * rendered fully GF (38px, 3px radius, #204CE5, 14px/500, no uppercase) while
 * looking correct in the markup. If it ever regresses, check that class first --
 * not the specificity of a new rule here.
 *
 * Tokens: the theme's aliases (--radius-pill, --font-heading), never the raw
 * --wp--* presets, per theme-conventions.md.
 */

.retreat-page .gform_wrapper.gform-theme {
	/* Pill controls, off the theme's radius scale rather than a magic number. */
	--gf-ctrl-radius: var(--radius-pill);

	/* A 100px radius on a multi-line box crops its own first and last lines,
	   so the textarea takes the soft corner instead -- same family, right shape. */
	--gf-ctrl-textarea-radius: var(--radius-md);

	/* GF ships --gf-font-size-primary at 14px. iOS Safari zooms the viewport
	   whenever a focused field is under 16px, which is what made this form
	   awkward to fill in on a phone. */
	--gf-ctrl-font-size: 16px;

	/* A pill only reads as a pill with height behind it; GF's default is 38px. */
	--gf-ctrl-size: 52px;
	--gf-ctrl-padding-x: 24px;
}

/* Breathing room between the intro copy and the form. */
.retreat-page .gform_wrapper {
	margin-block-start: clamp(1.5rem, 4vw, 2.5rem);
}

/* Textarea: the field a phone keyboard fights with.
   GF renders it with rows='10', which fills most of a phone screen and pushes
   the submit button below the fold. min-height cannot fix that -- it is only a
   floor -- so the height is set explicitly and the rows attribute overruled.
   resize:vertical keeps the drag handle useful without letting a sideways drag
   break the column. */
.retreat-page .gform_wrapper textarea {
	resize: vertical;
	block-size: 8.5rem;
	min-block-size: 5rem;
	max-inline-size: 100%;
	border-radius: var(--radius-md);
	padding: 16px 20px;
	line-height: 1.5;
}

@media (max-width: 600px) {
	.retreat-page .gform_wrapper textarea {
		block-size: 6.5rem;
	}
}

/* Submit button colour — the retreat page's navy, not the theme's blue.
 *
 * The SHAPE comes from buttons.css (see the header note); this rule sets only
 * the paint, because a retreat CTA is not the site's default blue button.
 * Every other CTA on the page carries this same pair scoped to its own section
 * wrapper -- .retreat-hero__cta, .retreat-how__cta, .retreat-who-for__cta,
 * .retreat-logistics__cta, .retreat-join__cta, .retreat-thankyou__cta -- and
 * the form's submit is simply the seventh. It sits in none of those wrappers,
 * so without this it fell through to --color-primary (#2380E5) while every
 * button beside it was #1C2161.
 *
 * transition is re-declared because buttons.css transitions BACKGROUND, and
 * the hover here is a filter -- inheriting the wrong one makes hover snap.
 * Scoped to .retreat-page: a Gravity Form on a non-retreat page keeps the
 * theme's default blue, which is correct.
 *
 * The duplication across seven files is pre-existing and deliberate-by-default,
 * not introduced here; collapsing it into one .retreat-page rule is a separate
 * refactor that would need all seven CTAs re-verified.
 */
.retreat-page .kdpc-gform-submit.wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: var(--color-retreat-navy);
	transition: filter 0.2s ease;
}

.retreat-page .kdpc-gform-submit.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	filter: brightness(0.85);
}
