/**
 * Subpage section: Form footer (template-parts/sections/subpage/section-form_footer.php).
 *
 * The shared form panel (components/form-panel.css) with the frame's
 * gradient. Mobile (DECIDED): no photo or background image (both hidden and
 * lazy, so never downloaded), a CSS gradient only, single column, inputs at
 * 16px+, 48px tap targets and a full-width button. Below the fold, so it
 * skips rendering until it nears the viewport.
 * Values come from assets/css/tokens.css.
 *
 * @package cartrack
 */

.form-panel--footer {
	content-visibility: auto;
	contain-intrinsic-size: auto var(--form-footer-intrinsic-height);
	scroll-margin-top: var(--subpage-anchor-offset);
	background: var(--form-footer-bg);
}

/* Mobile: 48px tap targets and a full-width button (inputs are already 16px, so iOS doesn't zoom). */
.form-panel--footer .cartrack-gf {
	--form-input-height: var(--form-footer-input-height);
}

.form-panel--footer .cartrack-gf .gform_wrapper .gform_footer input[type="submit"],
.form-panel--footer .cartrack-gf .gform_wrapper .gform_footer button,
.form-panel--footer .cartrack-gf .gform_wrapper .gform_button {
	width: 100%;
	min-height: var(--form-footer-input-height);
}

@media (min-width: 64em) { /* --bp-lg */
	.form-panel--footer .cartrack-gf .gform_wrapper .gform_footer input[type="submit"],
	.form-panel--footer .cartrack-gf .gform_wrapper .gform_footer button,
	.form-panel--footer .cartrack-gf .gform_wrapper .gform_button {
		width: auto;
		min-height: var(--button-min-height);
	}

	.form-panel--footer .cartrack-gf {
		--form-input-height: var(--form-footer-input-height-desktop);
	}
}

/* Photo focus (image_position): which part stays in view when the photo is cropped to the panel. Only the vertical
   position changes; the horizontal stays centred, so it reads the same in RTL. */
.form-panel--image-top .form-panel__image {
	object-position: 50% 0%;
}

.form-panel--image-bottom .form-panel__image {
	object-position: 50% 100%;
}
