/**
 * Submit overlay for the custom registration form.
 *
 * Shown when the customer submits the registration form, to indicate that
 * processing is underway and discourage page refreshes / double submits.
 * The overlay is self-clearing: on a successful submit the browser navigates
 * to the success redirect (overlay gone with the old page), and on a
 * validation failure the page reloads with errors (overlay gone again).
 */

.sc-submit-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	color: var(--wp--preset--color--red) !important;
}

.sc-submit-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.sc-submit-overlay__spinner {
	width: 48px;
	height: 48px;
	border: 4px solid rgba(0, 0, 0, 0.12);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: sc-submit-overlay-spin 0.8s linear infinite;
	/* Picks up the theme's link/accent colour via currentColor. Override
	   .sc-submit-overlay { color: #…; } to brand the spinner. */
	color:var(--wp--preset--color--red) !important;
}

.sc-submit-overlay__message {
	font-size: 1.05rem;
	font-weight: 600;
	color: #1a1a1a;
	text-align: center;
	max-width: 28rem;
	padding: 0 1rem;
	line-height: 1.4;
}

.sc-submit-overlay__subtext {
	font-size: 0.9rem;
	font-weight: 400;
	color: #555;
	margin-top: 0.4rem;
}

@keyframes sc-submit-overlay-spin {
	to { transform: rotate(360deg); }
}

/* Respect users who prefer reduced motion: drop the spin, keep the message. */
@media (prefers-reduced-motion: reduce) {
	.sc-submit-overlay__spinner {
		animation: none;
		border-top-color: rgba(0, 0, 0, 0.12);
	}
}
