/**
 * Product configurator, from the NEW step designs on the Figma "Steps" page and
 * the style guide's "Configurator (product steps)" blocks. WAPF markup is styled
 * as rendered; nothing is moved or wrapped.
 *
 *   form.cart .wapf       every WAPF form (also products without steps)
 *   form.cart.how-wizard  forms with steps (set by configurator.js)
 */

/* ---- Fields, every WAPF form --------------------------------------------- */

.wapf .wapf-field-container {
	margin: 0 0 14px;
	padding-bottom: 0;
}

.wapf .wapf-field-container:last-child {
	margin-bottom: 0;
}

.wapf .wapf-wrapper,
.wapf .wapf-product-totals .wapf--inner {
	margin-bottom: 0;
}

/* WAPF's column widths (inline style, e.g. Thickness T1 / T2 at 50%): every
   field full width, one under the other. Except narrow columns (a third or
   less), which are set up as a grid: e.g. the baby lounger's covers, four
   fabrics as a row of photos, a row of names and a row of quantities; the
   pillowcases, three in a row (27 products, client 2026-11-10). */
.wapf .wapf-field-container:not([style*="width:33%"], [style*="width:25%"], [style*="width:20%"], [style*="width:16"], [style*="width:12.5%"]) {
	width: 100% !important;
}

/* In such a row the controls line up at the top (centred, one came out lower). */
.wapf .wapf-field-container:is([style*="width:33%"], [style*="width:25%"], [style*="width:20%"], [style*="width:16"], [style*="width:12.5%"]) {
	align-items: flex-start;
	align-self: flex-start;
}

/* WAPF's column gutter: 5px padding on each field and -5px on the wrapper, but
   only on the left, so every field ended 5px short of the total bar. */
.wapf .wapf-wrapper {
	width: auto;
	margin-right: -5px;
	margin-left: -5px;
}

.wapf .wapf-field-label label {
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: var(--text-eyebrow);
	line-height: var(--leading-eyebrow);
	text-transform: uppercase;
}

.wapf .wapf-field-label abbr.required {
	color: inherit;
	text-decoration: none;
}

/* Select, number and text fields: label left, control right (design 03, mobile s2).
   Flex, so a field whose label is hidden gets the full row. */
.wapf .wapf-field-select,
.wapf .wapf-field-number,
.wapf .wapf-field-text,
.wapf .wapf-field-email,
.wapf .wapf-field-date {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 20px;
}

.wapf .wapf-field-select > .wapf-field-label,
.wapf .wapf-field-number > .wapf-field-label,
.wapf .wapf-field-text > .wapf-field-label,
.wapf .wapf-field-email > .wapf-field-label,
.wapf .wapf-field-date > .wapf-field-label {
	/* One label column, so every control starts at the same line; longer labels wrap. */
	flex: 0 0 min(160px, 30%);
	margin: 0;
}

.wapf .wapf-field-select > .wapf-field-input,
.wapf .wapf-field-number > .wapf-field-input,
.wapf .wapf-field-text > .wapf-field-input,
.wapf .wapf-field-email > .wapf-field-input,
.wapf .wapf-field-date > .wapf-field-input {
	flex: 1 1 0;
	min-width: 0;
}

.wapf .wapf-field-description,
.wapf .how-field-error {
	flex-basis: 100%;
}

.wapf select.wapf-input,
.wapf input.wapf-input[type="number"],
.wapf input.wapf-input[type="text"],
.wapf input.wapf-input[type="email"],
.wapf input.wapf-input[type="date"],
.wapf textarea.wapf-input {
	min-height: var(--control-height);
	padding: 12px 16px;
	/* Not in the design: a thin border so the control's edge is visible on the card (WCAG 1.4.11). */
	border: 1px solid var(--color-input-border);
	border-radius: var(--radius-control);
	background-color: var(--color-warm-off-white);
	color: var(--color-body-gray);
	font-size: 16px;
	line-height: 24px;
}

.wapf textarea.wapf-input {
	min-height: 120px;
}

/* Hover: a darker border (focus keeps its own colour). */
.wapf :is(select, input, textarea).wapf-input:hover:not(:focus),
.product-summary table.variations select:hover:not(:focus) {
	border-color: var(--color-deep-slate);
}

/* Radio list (units, shipping): Gilroy 16, selected Dark Sage. */
.wapf .wapf-radios {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.wapf .wapf-input-label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 24px;
	color: var(--color-deep-slate);
	font-family: var(--font-body);
	font-weight: var(--weight-gilroy-regular);
	font-size: 16px;
	line-height: 24px;
	text-transform: none;
	cursor: pointer;
}

/* WAPF draws its own radio/checkbox (.wapf-custom) next to the hidden native input.
   Design: 14 px circle, outline when empty, Dark Sage when selected. */
.wapf .wapf-input-label .wapf-custom {
	position: relative;
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	margin: 0;
	border: 1px solid var(--color-deep-slate);
	border-radius: 50%;
	background: var(--color-warm-off-white);
	box-shadow: none;
}

.wapf .wapf-checkbox .wapf-input-label .wapf-custom {
	border-radius: 3px;
}

.wapf .wapf-input-label .wapf-custom::before,
.wapf .wapf-input-label .wapf-custom::after {
	display: none;
}

.wapf .wapf-input-label input:checked + .wapf-custom {
	border-color: var(--color-dark-sage);
	background: var(--color-dark-sage);
}

/* Hover on an unchosen radio or checkbox: Dark Sage outline (over WAPF's own
   hover colours, .wapf-radio .wapf-input-label:hover .wapf-custom). */
.wapf :is(.wapf-radio, .wapf-checkbox) .wapf-input-label:hover input:not(:checked) + .wapf-custom {
	border-color: var(--color-dark-sage);
	background: var(--color-warm-off-white);
}

.wapf .wapf-input-label input:focus-visible + .wapf-custom {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* Section titles in WAPF paragraph fields (forms without steps): the
   configurator's step title (Desktop/H5), left-aligned. */
form.cart:not(.how-wizard) .wapf .wapf-field-p :is(h1, h2, h3, h4) {
	margin: var(--space-6) 0 0;
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: var(--text-h5);
	line-height: var(--leading-h5);
}

form.cart:not(.how-wizard) .wapf .wapf-field-group > .wapf-field-p:first-child :is(h1, h2, h3, h4) {
	margin-top: 0;
}

/* A radio or swatch field right under such a title uses it as its label, as in
   the configurator (the label stays for screen readers). */
form.cart:not(.how-wizard) .wapf-field-p:has(:is(h1, h2, h3, h4)) + :is(.wapf-field-radio, .wapf-field-image-swatch) > .wapf-field-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Prices inside the form: Deep Slate (WooCommerce's default is olive). */
.wapf .price,
.wapf .amount,
.wapf .woocommerce-Price-amount {
	color: var(--color-deep-slate);
}

/* Review step: compact list, left-aligned (design 11). */
.wapf .product-overview,
.wapf .product-overview p,
.wapf .product-overview div {
	color: var(--color-body-gray);
	font-size: var(--text-small);
	line-height: var(--leading-small);
	text-align: left;
}

.wapf .product-overview p {
	margin: 0;
}

/* Image swatches as option cards: default and selected (2 px Dark Sage border). */
.wapf .wapf-swatch--image > label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	height: 100%;
	box-sizing: border-box;
	padding: 6px 6px 10px;
	border: 2px solid transparent;
	border-radius: var(--radius-option);
	color: var(--color-body-gray);
	font-family: var(--font-body);
	font-weight: var(--weight-gilroy-regular);
	font-size: var(--text-small);
	line-height: var(--leading-small);
	text-align: center;
	text-transform: none;
	cursor: pointer;
}

.wapf .wapf-swatch--image .apf-pick-box img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 15;
	height: auto;
	object-fit: cover;
	border-radius: var(--radius-option-image);
}

/* Swatch grid (WAPF's columns): 8px apart. */
.wapf .wapf-image-swatch-wrapper {
	gap: 8px;
}

/* Hover on an unchosen swatch: a Natural Oat border. */
.wapf .wapf-swatch--image:not(:has(input:checked)) > label:hover {
	border-color: var(--color-natural-oat);
	background: var(--color-warm-off-white);
}

.wapf .wapf-swatch--image:has(input:checked) > label,
.wapf .wapf-swatch--image.wapf-checked > label {
	border-color: var(--color-dark-sage);
	background: var(--color-warm-off-white);
}

.wapf .wapf-swatch--image:has(input:focus-visible) > label {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* Production Time: text option cards (no image), same states as the swatches. */
.wapf .how-choice-cards .wapf-radios {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	align-items: stretch;
	gap: 16px;
}

.wapf .how-choice-cards .wapf-radio,
.wapf .how-choice-cards .wapf-input-label {
	display: flex;
	height: 100%;
}

.wapf .how-choice-cards .wapf-input-label {
	box-sizing: border-box;
	justify-content: center;
	width: 100%;
	padding: 16px 12px;
	/* Not in the design: a light border, so unselected cards read as options. */
	border: 2px solid var(--color-pale-oat);
	border-radius: var(--radius-option);
	background: var(--color-warm-off-white);
	color: var(--color-body-gray);
	font-size: var(--text-small);
	line-height: var(--leading-small);
	text-align: center;
}

.wapf .how-choice-cards .wapf-input-label input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wapf .how-choice-cards .wapf-custom {
	display: none;
}

/* WAPF pads the label text 10px on the left (room for its radio): not in cards. */
.wapf .how-choice-cards .wapf-label-text {
	padding: 0;
}

.wapf .how-choice-cards .wapf-input-label:not(:has(input:checked)):hover {
	border-color: var(--color-natural-oat);
}

.wapf .how-choice-cards .wapf-input-label:has(input:checked) {
	border-color: var(--color-dark-sage);
}

.wapf .how-choice-cards .wapf-input-label:has(input:focus-visible) {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* Text swatches (sizes: S, M, L…; Men's Merino Wool Shorts, client
   2026-11-24): small option cards in a row, the same states as the
   Production Time cards. */
.wapf .wapf-swatch-wrapper:has(.wapf-swatch--text) {
	gap: 8px;
}

.wapf .wapf-swatch--text,
.wapf .wapf-swatch--text:hover,
.wapf .wapf-swatch--text.wapf-checked {
	margin: 0;
	border: 0;
	border-radius: var(--radius-option);
	background: none;
	color: var(--color-body-gray);
}

.wapf .wapf-swatch--text > label {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 56px;
	min-height: 44px;
	padding: 10px 14px;
	border: 2px solid var(--color-pale-oat);
	border-radius: var(--radius-option);
	background: var(--color-warm-off-white);
	color: var(--color-body-gray);
	font-family: var(--font-body);
	font-weight: var(--weight-gilroy-medium);
	font-size: var(--text-small);
	line-height: var(--leading-small);
	text-transform: none;
	cursor: pointer;
}

/* WAPF writes the label with a space after it. */
.wapf .wapf-swatch--text > label > span {
	white-space: nowrap;
}

.wapf .wapf-swatch--text input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wapf .wapf-swatch--text:not(:has(input:checked)) > label:hover {
	border-color: var(--color-natural-oat);
}

.wapf .wapf-swatch--text:has(input:checked) > label,
.wapf .wapf-swatch--text.wapf-checked > label {
	border-color: var(--color-dark-sage);
	color: var(--color-deep-slate);
}

.wapf .wapf-swatch--text:has(input:focus-visible) > label {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* Units: a toggle (configurator.js marks the field). The radios stay, hidden;
   the chosen option is Dark Sage. */
.wapf .how-toggle .wapf-radios {
	flex-direction: row;
	gap: 0;
	width: fit-content;
	max-width: 100%;
	padding: 3px;
	border: 1px solid var(--color-natural-oat);
	border-radius: var(--radius-pill);
	background: var(--color-warm-off-white);
}

.wapf .how-toggle .wapf-input-label {
	position: relative;
	justify-content: center;
	min-width: 120px;
	min-height: 40px;
	box-sizing: border-box;
	padding: 0 20px;
	border-radius: var(--radius-pill);
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 14px;
	line-height: 20px;
	transition: background-color 0.2s, color 0.2s;
}

.wapf .how-toggle .wapf-input-label input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wapf .how-toggle .wapf-custom {
	display: none;
}

.wapf .how-toggle .wapf-label-text {
	padding: 0;
}

.wapf .how-toggle .wapf-input-label:not(:has(input:checked)):hover {
	background: var(--color-pale-oat);
}

.wapf .how-toggle .wapf-input-label:has(input:checked) {
	background: var(--color-dark-sage);
	color: var(--color-on-primary);
}

.wapf .how-toggle .wapf-input-label:has(input:focus-visible) {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* Errors (also under variation selects, outside .wapf) */
.how-field-error {
	margin: 6px 0 0;
	color: var(--color-error);
	font-family: var(--font-body);
	font-weight: var(--weight-gilroy-medium);
	font-size: var(--text-small);
	line-height: var(--leading-small);
}

.wapf .how-has-error .wapf-input:not([type="radio"]):not([type="checkbox"]),
.variations .how-has-error select {
	box-shadow: inset 0 0 0 2px var(--color-error);
}

.wapf .how-has-error .wapf-swatch--image > label,
.wapf .how-choice-cards.how-has-error .wapf-input-label {
	border-color: var(--color-error);
}

.wapf .how-toggle.how-has-error .wapf-radios {
	border-color: var(--color-error);
}

/* ---- Wizard -------------------------------------------------------------- */

form.cart.how-wizard {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-5) var(--space-4);
}

form.cart.how-wizard > * {
	flex: 0 0 100%;
}

form.cart.how-wizard [hidden],
form.cart.how-wizard .wapf-section.step[hidden] {
	display: none !important;
}

/* Step card: Soft Ivory, radius 20, padding 30 / 28. */
.how-wizard .wapf {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
	padding: 30px 28px 28px;
	border-radius: var(--radius-card);
	background: var(--color-soft-ivory);
}

.how-wizard .wapf-wrapper,
.how-wizard .wapf-field-group {
	height: auto !important;
}

/* WAPF's empty tooltip holder after the total: no card gap for it. */
.how-wizard .wapf > .tooltip-container:empty {
	display: none;
}

/* Stepper: 42 px circles; done and current Natural Oat, upcoming Warm Off White. */
/* One row: with many steps in a narrow card (iPad landscape, 320px phones,
   11 steps) the circles shrink from their size instead of wrapping. */
.how-wizard__steps {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.how-wizard__step {
	display: flex;
	flex: 0 1 42px;
	align-items: center;
	justify-content: center;
	min-width: 0;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--color-warm-off-white);
	color: var(--color-deep-slate);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1;
}

.how-wizard__step.is-done,
.how-wizard__step.is-current {
	background: var(--color-natural-oat);
}

/* Step title: the first heading in each step, Desktop/H5. */
.how-wizard .wapf-section.step h1,
.how-wizard .wapf-section.step h2,
.how-wizard .wapf-section.step h3,
.how-wizard .wapf-section.step h4 {
	margin: 0;
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: var(--text-h5);
	line-height: var(--leading-h5);
	text-align: center;
}

/* Title to its fields: the 14px field spacing. A second title in the same
   step (e.g. Shipping under Production Time) gets room above it. */
.how-wizard .wapf-section.step > .wapf-field-container:not(:first-child) :is(h1, h2, h3, h4) {
	margin-top: var(--space-5);
}

.how-wizard .wapf-section.step :is(h1, h2, h3, h4):focus {
	outline: none;
}

/* Radio and swatch fields use the step title as their label. */
.how-wizard .wapf-field-radio > .wapf-field-label,
.how-wizard .wapf-field-image-swatch > .wapf-field-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Radio lists (Shipping): aligned left, like the fields' labels. The units
   toggle stays centred under the step title. */
.how-wizard .wapf-radios {
	align-items: flex-start;
}

.how-wizard .how-toggle .wapf-radios {
	margin-inline: auto;
}

.how-wizard .how-choice-cards .wapf-radios {
	align-items: stretch;
	width: auto;
}

/* Total price bar (every WAPF form, Figma "TOTAL PRICE"): only the grand total, Natural Oat. */
form.cart .wapf-product-totals .wapf--inner > div:not(:last-child) {
	display: none;
}

form.cart .wapf-product-totals .wapf--inner > div:last-child {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	min-height: var(--control-height);
	padding: 0 16px 0 22px;
	border-radius: var(--radius-control);
	background: var(--color-natural-oat);
	color: var(--color-deep-slate);
}

form.cart .wapf-product-totals .wapf--inner > div:last-child > span:first-child {
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: var(--text-eyebrow);
	line-height: var(--leading-eyebrow);
	text-transform: uppercase;
}

form.cart .wapf-product-totals .wapf-grand-total,
form.cart .wapf-product-totals .wapf-grand-total * {
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-regular);
	font-size: var(--text-h4);
	line-height: var(--leading-h4);
}

/* Navigation: Previous (light) left, Next (Dark Sage) right. Previous stays on
   the first step, disabled; on the last step Add to Cart takes Next's place. */
form.cart.how-wizard > .how-wizard__nav {
	display: flex;
	flex: 1 1 auto;
	justify-content: space-between;
	gap: var(--space-4);
}

.how-wizard__nav .button {
	min-width: 183px;
}

/* Over WooCommerce's .woocommerce button.button:disabled[disabled] (0.5). */
form.cart.how-wizard .how-wizard__nav .how-wizard__prev:disabled {
	opacity: 0.6;
	cursor: default;
}

.how-wizard__next,
.how-wizard__nav .single_add_to_cart_button {
	margin-left: auto;
}

/* Phones: the wizard in a full-screen dialog, opened by a button in the form's
   place (configurator.js). Wider: the dialog has no box, the form shows as is.
   (.woocommerce button.how-wizard-open: over .woocommerce button.button.) */
.woocommerce button.how-wizard-open,
button.how-wizard-open {
	display: none;
}

/* Until configurator.js has run (with WP Rocket's delayed JS: until the
   first tap or scroll), so the page below doesn't jump up by the whole form
   when it does: wider screens show only the first step, as the wizard will;
   on phones the form takes only the place of the button that will open it.
   Without JavaScript, the whole form (inc/product.php). */
form.cart:not(.how-wizard) .wapf-section.step ~ .wapf-section.step {
	display: none;
}

@media (max-width: 767px) {
	form.cart:not(.how-wizard):has(.wapf-section.step ~ .wapf-section.step) {
		height: 52px;
		overflow: hidden;
		visibility: hidden;
	}
}

@media (min-width: 768px) {
	.how-wizard-dialog {
		display: contents;
	}

	.how-wizard-dialog__head {
		display: none;
	}
}

@media (max-width: 767px) {
	.woocommerce button.how-wizard-open,
	button.how-wizard-open {
		display: flex;
		width: 100%;
		box-sizing: border-box;
	}

	/* A sheet, as on iOS: up from the bottom almost to the top, over the
	   dimmed page. */
	.how-wizard-dialog[open] {
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		inset: auto 0 0;
		width: 100%;
		max-width: none;
		height: calc(100% - 40px);
		height: calc(100dvh - max(40px, env(safe-area-inset-top) + 16px));
		max-height: none;
		margin: 0;
		padding: 0 var(--gutter);
		overflow-y: auto;
		border: 0;
		border-radius: 16px 16px 0 0;
		background: var(--color-page);
		box-shadow: 0 -8px 30px rgba(34, 51, 60, 0.15);
		color: var(--color-text);
		overscroll-behavior: contain;
	}

	.how-wizard-dialog::backdrop {
		background: rgba(34, 51, 60, 0.4);
	}

	@media (prefers-reduced-motion: no-preference) {
		.how-wizard-dialog[open] {
			animation: how-sheet-in 0.45s cubic-bezier(0.32, 0.72, 0, 1);
		}

		.how-wizard-dialog[open]::backdrop {
			animation: how-fade-in 0.45s ease;
		}

		/* Closing (configurator.js waits for this before closing). */
		.how-wizard-dialog.is-closing {
			animation: how-sheet-out 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
		}

		.how-wizard-dialog.is-closing::backdrop {
			animation: how-fade-out 0.3s ease forwards;
		}
	}

	html:has(.how-wizard-dialog[open]) {
		overflow: hidden;
	}

	.how-wizard-dialog__head {
		position: sticky;
		top: 0;
		z-index: 3;
		display: flex;
		flex: none;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-4);
		margin: 0 calc(-1 * var(--gutter)) var(--space-4);
		padding: 18px var(--gutter) 6px;
		border-bottom: 1px solid var(--color-pale-oat);
		background: var(--color-page);
	}

	/* The sheet's grabber. */
	.how-wizard-dialog__head::before {
		content: "";
		position: absolute;
		top: 6px;
		left: 50%;
		width: 36px;
		height: 5px;
		border-radius: 3px;
		background: var(--color-natural-oat);
		transform: translateX(-50%);
	}

	.how-wizard-dialog__title {
		margin: 0;
		color: var(--color-heading);
		font-family: var(--font-heading);
		font-weight: var(--weight-mont-bold);
		font-size: var(--text-h5);
		line-height: var(--leading-h5);
	}

	.how-wizard-dialog__close {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin-right: -10px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--color-heading);
		cursor: pointer;
	}

	/* The step card fills the sheet, so the total and Previous / Next sit at
	   the bottom and don't move between steps; a longer step scrolls, with
	   Previous / Next kept in reach. */
	.how-wizard-dialog form.cart.how-wizard {
		flex: 1 0 auto;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		/* No gap: the empty WooCommerce blocks after the buttons would add one
		   under them. */
		gap: 0;
	}

	.how-wizard-dialog form.cart.how-wizard > * {
		flex: none;
	}

	.how-wizard-dialog form.cart.how-wizard > .wapf {
		flex: 1 0 auto;
		margin-bottom: var(--space-3);
	}

	.how-wizard-dialog .wapf > .wapf-product-totals {
		margin-top: auto;
	}

	.how-wizard-dialog form.cart.how-wizard > .how-wizard__nav {
		position: sticky;
		bottom: 0;
		z-index: 2;
		margin: 0 calc(-1 * var(--gutter));
		padding: 12px var(--gutter) calc(16px + env(safe-area-inset-bottom));
		background: var(--color-page);
	}
}

@keyframes how-sheet-in {
	from {
		transform: translateY(100%);
	}
}

@keyframes how-sheet-out {
	to {
		transform: translateY(100%);
	}
}

@keyframes how-fade-in {
	from {
		opacity: 0;
	}
}

@keyframes how-fade-out {
	to {
		opacity: 0;
	}
}

/* ---- Mobile (375 frames) ------------------------------------------------- */

@media (max-width: 767px) {
	.how-wizard .wapf {
		gap: var(--space-5);
		padding: 16px 14px;
	}

	.how-wizard__steps {
		gap: 6px;
	}

	.how-wizard__step {
		flex-basis: 24px;
		font-size: 12px;
	}

	.how-wizard .wapf-section.step :is(h1, h2, h3, h4) {
		text-align: left;
	}

	.how-wizard .how-toggle .wapf-radios {
		margin-inline: 0;
	}

	.how-wizard__nav .button {
		flex: 1 1 0;
		min-width: 0;
	}
}
