/*
 * "Mua key" page. Reuses the theme tokens (main.css) with fallbacks, so the page still
 * reads correctly under another theme.
 */
.tck-buy {
	--tck-ink: var(--heading, #25293b);
	--tck-text: var(--text, #5d6778);
	--tck-muted: var(--muted, #737b88);
	--tck-accent: var(--accent, #2f6fd6);
	--tck-accent-soft: var(--accent-soft, rgba(47, 111, 214, 0.08));
	--tck-mint: var(--mint, #1f9a6a);
	--tck-mint-soft: var(--mint-soft, #e8f6ef);
	--tck-line: var(--line, #e6e8ec);
	--tck-line-strong: var(--line-strong, #d3d6dc);
	--tck-surface: var(--white, #fff);
	--tck-tint: var(--tint, #f7f8fa);
	--tck-radius: 18px;
	--tck-gap: clamp(16px, 2.5vw, 28px);

	display: grid;
	gap: var(--tck-gap);
	max-width: 760px;
	margin: 0 auto;
	color: var(--tck-text);
	font-family: var(--font, system-ui, sans-serif);
}

.tck-buy__eyebrow {
	margin: 0 0 6px;
	color: var(--tck-accent);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tck-buy__title {
	margin: 0;
	color: var(--tck-ink);
	font-family: var(--font-serif, Georgia, serif);
	font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.4rem);
	line-height: 1.15;
	text-wrap: balance;
}

.tck-buy__price {
	margin: 12px 0 0;
}

.tck-buy__price strong {
	color: var(--tck-ink);
	font-size: 1.35rem;
}

.tck-buy .tck-buy__steps {
	display: grid;
	gap: 10px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: tck-step;
}

.tck-buy .tck-buy__steps li {
	position: relative;
	margin: 0;
	padding-left: 40px;
	list-style: none;
	counter-increment: tck-step;
}

.tck-buy__steps li::before {
	content: counter(tck-step);
	position: absolute;
	top: -2px;
	left: 0;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--tck-accent-soft);
	color: var(--tck-accent);
	font-size: 0.85rem;
	font-weight: 700;
}

.tck-buy__card {
	padding: clamp(18px, 3vw, 32px);
	border: 1px solid var(--tck-line);
	border-radius: var(--tck-radius);
	background: var(--tck-surface);
	box-shadow: var(--shadow-card, 0 8px 28px rgba(0, 0, 0, 0.06));
}

.tck-buy__form {
	display: grid;
	gap: 18px;
}

.tck-buy__form select,
.tck-buy__form input[type="email"] {
	width: 100%;
	min-width: 0;
}

/* Honeypot: off screen but still in the form. */
.tck-buy__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tck-buy__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--tck-tint);
}

.tck-buy__total-value {
	color: var(--tck-ink);
	font-size: 1.4rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.tck-buy__submit {
	width: 100%;
	justify-content: center;
}

.tck-buy__submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

.tck-buy a.tck-buy__cta,
.tck-buy a.tck-buy__cta:hover {
	color: var(--white, #fff);
	text-decoration: none;
}

.tck-buy__notice {
	margin: 0;
	padding: 12px 16px;
	border-left: 4px solid var(--tck-accent);
	border-radius: 10px;
	background: var(--tck-accent-soft);
	color: var(--tck-ink);
}

.tck-buy__notice--error {
	border-left-color: #c2410c;
	background: #fff4ed;
}

.tck-buy__notice--warning {
	border-left-color: #b7791f;
	background: #fffaeb;
}

.tck-buy__order {
	display: grid;
	gap: var(--tck-gap);
	justify-items: start;
}

.tck-buy__order > .tck-buy__card,
.tck-buy__order > .tck-buy__notice {
	justify-self: stretch;
}

.tck-buy__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0.04em;
}

.tck-buy__pay {
	display: grid;
	grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
	gap: var(--tck-gap);
	align-items: center;
}

.tck-buy__qr {
	margin: 0;
	text-align: center;
}

.tck-buy__qr img {
	display: block;
	width: 100%;
	max-width: 280px;
	height: auto;
	aspect-ratio: 1;
	margin: 0 auto;
	border: 1px solid var(--tck-line);
	border-radius: 14px;
	background: var(--tck-tint);
}

.tck-buy__qr figcaption {
	margin-top: 10px;
	color: var(--tck-muted);
	font-size: 0.9rem;
}

.tck-buy__countdown {
	color: var(--tck-ink);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.tck-buy__details {
	display: grid;
	gap: 2px;
	margin: 0;
}

.tck-buy__detail {
	display: grid;
	gap: 2px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--tck-line);
}

.tck-buy__detail:last-child {
	border-bottom: 0;
}

.tck-buy__detail dt {
	color: var(--tck-muted);
	font-size: 0.82rem;
}

.tck-buy__detail dd {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--tck-ink);
	font-weight: 600;
	overflow-wrap: anywhere;
}

.tck-buy__detail--strong dd span {
	padding: 2px 10px;
	border-radius: 8px;
	background: var(--tck-mint-soft);
	color: var(--tck-mint);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 1.1rem;
	letter-spacing: 0.05em;
}

.tck-buy__copy {
	padding: 4px 12px;
	border: 1px solid var(--tck-line-strong);
	border-radius: 999px;
	background: var(--tck-surface);
	color: var(--tck-ink);
	font: inherit;
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.tck-buy__copy:hover {
	border-color: var(--tck-accent);
	color: var(--tck-accent);
}

.tck-buy__copy:focus-visible {
	outline: 2px solid var(--tck-accent);
	outline-offset: 2px;
}

.tck-buy__copy.is-done {
	border-color: var(--tck-mint);
	background: var(--tck-mint-soft);
	color: var(--tck-mint);
}

.tck-buy__waiting {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--tck-ink);
	font-weight: 500;
}

.tck-buy__pulse {
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--tck-mint);
	animation: tck-pulse 1.6s ease-out infinite;
}

@keyframes tck-pulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tck-mint) 45%, transparent); }
	100% { box-shadow: 0 0 0 12px transparent; }
}

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

.tck-buy__hint {
	margin: 0;
	color: var(--tck-muted);
	font-size: 0.92rem;
}

.tck-buy__keys {
	display: grid;
	gap: 14px;
	justify-items: start;
	border-color: color-mix(in srgb, var(--tck-mint) 35%, transparent);
	background: linear-gradient(180deg, var(--tck-mint-soft), var(--tck-surface) 70%);
}

.tck-buy__keys-title {
	margin: 0;
	color: var(--tck-ink);
	font-weight: 600;
}

.tck-buy .tck-buy__key-list {
	display: grid;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tck-buy .tck-buy__key-list li {
	display: flex;
	margin: 0;
	list-style: none;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 14px;
	border: 1px solid var(--tck-line);
	border-radius: 12px;
	background: var(--tck-surface);
}

.tck-buy__key-list code {
	color: var(--tck-ink);
	font-size: clamp(0.95rem, 0.85rem + 0.6vw, 1.15rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	background: none;
}

@media (max-width: 640px) {
	.tck-buy__pay {
		grid-template-columns: minmax(0, 1fr);
	}

	.tck-buy__qr img {
		max-width: 240px;
	}
}
