/* TK9-PUB-006A — Persistent Wizard Action Bar / Mobile Paint Fix */

/*
 * The registration action bar used to be position:sticky inside the rounded
 * registration card (overflow:hidden) with backdrop-filter. Some mobile
 * Chromium/Samsung renderers could defer repainting that compositor layer
 * until the user touched or nudged the page. The slot remains in document
 * flow while the visible bar is fixed to the viewport, so the actions are
 * always painted and the final fields can still scroll completely above it.
 */
body[data-app="tk9-registration"] .wizard-nav-slot {
	display: block;
	min-height: calc(82px + env(safe-area-inset-bottom));
}

body[data-app="tk9-registration"] .wizard-nav-slot[hidden] {
	display: none !important;
}

body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 120;
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px calc(11px + env(safe-area-inset-bottom));
	border-top: 1px solid rgba(16, 63, 53, .13);
	background: #fffdf8;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	box-shadow: 0 -10px 30px rgba(16, 63, 53, .12);
	isolation: isolate;
}

body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav .primary-button,
body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav .secondary-button {
	min-width: 92px;
	min-height: 50px;
}

/* Keep the status useful but secondary; the two actions remain obvious. */
body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav .draft-state {
	min-width: 0;
	padding-inline: 4px;
}

@media (max-width: 430px) {
	body[data-app="tk9-registration"] .wizard-nav-slot {
		min-height: calc(78px + env(safe-area-inset-bottom));
	}

	body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav {
		grid-template-columns: minmax(86px, auto) minmax(0, 1fr) minmax(108px, auto);
		gap: 7px;
		padding-inline: 10px;
		padding-left: max(10px, env(safe-area-inset-left));
		padding-right: max(10px, env(safe-area-inset-right));
		padding-top: 10px;
		padding-bottom: calc(10px + env(safe-area-inset-bottom));
	}

	body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav .primary-button,
	body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav .secondary-button {
		min-width: 0;
		padding-inline: 12px;
		font-size: .76rem;
	}

	body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav .draft-state {
		font-size: .58rem;
	}
}

/* TK9-PUB-007C — Desktop centering guard: logical inset reset must precede physical left/right centering. */
@media (min-width: 720px) {
	body[data-app="tk9-registration"] .wizard-nav-slot {
		min-height: calc(88px + env(safe-area-inset-bottom));
	}

	body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav {
		inset-inline: auto;
		left: 50%;
		right: auto;
		width: min(980px, calc(100% - 48px));
		transform: translateX(-50%);
		padding-inline: 34px;
		border: 1px solid rgba(16, 63, 53, .10);
		border-bottom: 0;
		border-radius: 20px 20px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	body[data-app="tk9-registration"] .wizard-nav-slot > .wizard-nav {
		scroll-behavior: auto;
	}
}
