/* Copytrained Commerce: the checkout block.
   Sits inside the theme's own page layout and uses the theme's tokens, so the
   fonts, colours and column are the site's. Fallbacks keep it readable if the
   page is ever shown outside the theme. */

.ctc-checkout {
	margin: 8px 0 0;
	font-family: var(--sans, "Archivo", Helvetica, Arial, sans-serif);
	color: var(--fg, #1C1A17);
}

.ctc-checkout-form {
	min-height: 420px;
	padding: 16px;
	background: var(--paper, #FFFFFF);
	border: 1px solid var(--hairline, #E4E3DF);
	border-radius: var(--r-card, 12px);
}

.ctc-checkout-loading,
.ctc-checkout-error {
	margin: 0;
	color: var(--fg-soft, #565656);
}

.ctc-checkout-error a {
	color: var(--acc, #12664F);
}

.ctc-checkout-notice {
	margin: 16px 0 0;
	font-size: 0.875em;
	line-height: 1.5;
	color: var(--fg-soft, #565656);
}

.ctc-checkout-notice a {
	color: inherit;
	text-decoration: underline;
}

.ctc-checkout-flag,
.ctc-checkout-missing {
	padding: 8px 12px;
	font-family: var(--mono, ui-monospace, monospace);
	font-size: 0.8125em;
	background: var(--surface-card, #E0E9E2);
	border-radius: var(--r-control, 6px);
}

.ctc-checkout-flag {
	margin: 0 0 16px;
}

/* Until Stripe's form is ready: a card-shaped placeholder laid over the
   form's own card (same card styles), removed once the form has its height. */
.ctc-checkout-frame {
	position: relative;
}

.ctc-checkout-skeleton {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 14px;
	overflow: hidden;
}

.ctc-checkout-skeleton[hidden] {
	display: none;
}

.ctc-checkout-skeleton-text {
	margin: 4px 0 6px;
	font-size: 14px;
	color: #565656;
}

.ctc-sk {
	display: block;
	height: 40px;
	border-radius: 8px;
	background: linear-gradient(90deg, #efeeea 0%, #f7f6f3 50%, #efeeea 100%);
	background-size: 200% 100%;
	animation: ctc-sk-shimmer 1.4s ease-in-out infinite;
}

.ctc-sk-short { width: 45%; height: 18px; }
.ctc-sk-tall { height: 96px; }
.ctc-sk-button { height: 48px; margin-top: 6px; background: #e3efe9; }

@keyframes ctc-sk-shimmer {
	from { background-position: 100% 0; }
	to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.ctc-sk { animation: none; }
}
