/* The checkout's layout (app/docs/PLAN.md "Checkout: one page for every
   product"; the approved Main, Pay, States and Phone mockups). The app's own,
   on top of the kit's design system (app.css): its tokens, cards, buttons,
   pills and alerts. Loaded on the checkout's pages only. */

.co-shell {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.co-top {
	padding: 20px 40px;
}
.co-foot {
	padding: 24px 40px;
}

/* summary beside the steps; below 820px the steps wrap under it */
.co {
	flex-grow: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px 24px 40px;
	align-items: flex-start;
}
.co-sum {
	flex: 1 1 320px;
	max-width: 400px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.co-sum-head {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.co-steps,
.co-form {
	flex: 999 1 460px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.co-form {
	flex: none;
}

/* plan picker: links styled as the mockup's radio cards */
.plans {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
	gap: 8px;
}
.plan {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--bg);
	font-size: 13px;
	color: var(--text);
}
.plan:hover {
	border-color: var(--muted);
	color: var(--text);
	text-decoration: none;
}
.plan-sel,
.plan-sel:hover {
	border-color: var(--primary);
	box-shadow: inset 0 0 0 1px var(--primary);
}
/* a plan shown but not sold (Globex's full plans while their flag is off) */
.plan-off,
.plan-off:hover {
	border-style: dashed;
	border-color: var(--border);
	color: var(--muted);
	opacity: 0.7;
	cursor: not-allowed;
}
/* the Globex callout: where the full plans are coming */
.co-callout {
	margin: 0;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted);
}
.plan-name {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.sum-rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.sum-row,
.sum-total {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
}
/* the amount keeps its width on one line; a long label (an upgrade
   credit's name) wraps beside it instead */
.sum-row > :last-child,
.sum-total > :last-child {
	flex-shrink: 0;
	white-space: nowrap;
	text-align: right;
}
.sum-total {
	font-size: 16px;
	font-weight: 600;
	padding-top: 12px;
	border-top: 1px solid var(--border);
}

/* steps */
.step {
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.step-compact {
	padding: 16px 24px;
}
.step-later {
	opacity: 0.5;
}
.step-head {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.step-title {
	flex-grow: 1;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}
.step-compact .step-title {
	font-size: 15px;
	overflow-wrap: anywhere;
}
.num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font: 600 12px var(--mono);
	background: var(--raised);
	color: var(--muted);
	box-shadow: inset 0 0 0 1px var(--border);
	flex-shrink: 0;
}
.num-on {
	background: var(--primary);
	color: var(--primary-ink);
	box-shadow: none;
}
.num-done {
	background: rgba(0, 240, 255, 0.12);
	color: var(--primary);
	box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.35);
}
/* a submit button that reads as a link ("not you?", "send another") */
.link-btn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--primary);
	font: inherit;
	cursor: pointer;
}
.link-btn:hover {
	color: #7ff7ff;
	text-decoration: underline;
}
.co-resend .hint {
	margin-top: 0;
}

/* the TradingView name, echoed back big for the buyer to check */
.confirm-box {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px;
	border-radius: 12px;
	border: 1px solid rgba(0, 240, 255, 0.3);
	background: rgba(0, 240, 255, 0.05);
}
.confirm-box .label {
	margin: 0;
}
.confirm-box .hint {
	margin-top: 0;
}
.tv-name {
	font-size: 22px;
	font-weight: 600;
	color: var(--primary);
	overflow-wrap: anywhere;
}
.tv-inline {
	color: var(--primary);
}

/* payment: Stripe's Payment and Address Elements mount in these frames */
.pay-area {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.pay-frame {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.015);
}
.pay-frame .hint {
	margin-top: 0;
}
/* the Beta pass's billing-country choice (the international flag on) */
.co-region {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
}
.co-region legend {
	margin-bottom: 6px;
	padding: 0;
}
/* Stripe's embedded checkout (Managed Payments, sold by Link) draws its own
   light form with the account's branding: a frame with rounded corners */
.pay-embedded #embedded-checkout {
	border-radius: 10px;
	overflow: hidden;
}
.promo-row {
	display: flex;
	gap: 8px;
}
.alert-warn {
	border-color: rgba(254, 214, 57, 0.4);
}
.alert-warn .dot {
	color: var(--caution);
}

/* states that are not a purchase, and the confirmation */
.co-center {
	flex-grow: 1;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 40px 16px;
}
.co-notice {
	width: 100%;
	max-width: 560px;
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.co-next {
	margin: 0;
	padding-left: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
	color: var(--muted);
}
.co-next b {
	color: var(--text);
	font-weight: 600;
}
.co-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.co-actions .btn {
	flex: 1 1 200px;
}

/* phones (the approved Phone mockup): one column, 16 px gutters */
@media (max-width: 560px) {
	.co-top,
	.co-foot {
		padding: 16px;
	}
	.co {
		padding: 0 16px 16px;
		gap: 12px;
	}
	.co-sum {
		max-width: none;
		padding: 16px;
	}
	.step {
		padding: 18px 16px;
	}
	.co-notice {
		padding: 24px 16px;
	}
}
.co-notice .kv {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-top: 1px solid var(--raised);
	font-size: 14px;
}
.btn:disabled,
.btn:disabled:hover {
	opacity: 0.5;
	cursor: not-allowed;
}

/* -- when a checkout link misses (the approved "checkout fallback" mockup:
   the note on the checkout, the storefront for an unknown product) -- */

/* the link's own words, quoted back */
.sf-bad {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--quiet);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 1px 6px;
	overflow-wrap: anywhere;
}
.sf-bad s {
	color: var(--loss);
	text-decoration-thickness: 1px;
}

/* the checkout's note: what the link said and what was opened */
.sf-note {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border: 1px solid rgba(254, 214, 57, 0.35);
	background: rgba(254, 214, 57, 0.06);
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 13.5px;
	line-height: 1.5;
}
.sf-note > .lucide-info {
	color: var(--caution);
	margin-top: 2px;
	flex: none;
}
.sf-x {
	margin-left: auto;
	padding: 0;
	border: 0;
	background: none;
	color: var(--quiet);
	cursor: pointer;
	flex: none;
}
.sf-x:hover {
	color: var(--text);
}
/* the plan opened in place of one we don't have: flashes once */
.plan-pulse {
	animation: plan-pulse 2.4s ease-out 1;
}
@keyframes plan-pulse {
	0%,
	30% {
		box-shadow:
			inset 0 0 0 1px var(--primary),
			0 0 0 4px rgba(254, 214, 57, 0.45);
	}
	100% {
		box-shadow:
			inset 0 0 0 1px var(--primary),
			0 0 0 0 rgba(254, 214, 57, 0);
	}
}
@media (prefers-reduced-motion: reduce) {
	.plan-pulse {
		animation: none;
	}
}

/* the storefront */
.sf {
	flex-grow: 1;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 12px 24px 40px;
}
.sf-miss {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	max-width: 70ch;
	margin: 0;
	color: var(--muted);
	font-size: 13px;
}
.sf-miss > .lucide {
	color: var(--caution);
	margin-top: 3px;
	flex: none;
}
.sf-head {
	margin-top: 22px;
}
.sf-h {
	font-size: clamp(26px, 4vw, 36px);
	font-weight: 680;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 8px 0 10px;
	text-wrap: balance;
}
.sf-head .lede {
	max-width: 60ch;
}
.sf-or {
	margin: 26px 0 0;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--quiet);
}

/* masonry: the hero spans four of six columns and two rows */
.sf-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-auto-flow: dense;
	gap: 14px;
	margin-top: 26px;
}
.sf-or + .sf-grid {
	margin-top: 10px;
}
.sf-tile {
	grid-column: span 2;
	grid-row: span 2;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 20px;
	border-radius: 16px;
	border: 1px solid var(--border);
	background: linear-gradient(200deg, rgba(138, 43, 226, 0.12), transparent 50%), var(--surface);
}
.sf-tile:only-child {
	grid-column: 1 / -1;
}
.sf-hero {
	grid-column: span 4;
	background: linear-gradient(160deg, rgba(0, 240, 255, 0.07), transparent 45%), var(--surface);
}
.sf-thead {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}
.sf-tname {
	margin: 0;
	font-size: 22px;
	font-weight: 650;
	letter-spacing: -0.01em;
}
.sf-tdesc {
	margin: 0;
	max-width: 52ch;
	color: var(--muted);
	font-size: 14px;
}
.sf-pill-beta {
	color: #c79bff;
	background: rgba(138, 43, 226, 0.1);
	box-shadow: inset 0 0 0 1px rgba(138, 43, 226, 0.45);
}
.sf-trial {
	display: flex;
	gap: 8px;
	align-items: center;
	color: var(--muted);
	font-size: 13px;
}
.sf-trial > .lucide {
	color: var(--primary);
	flex: none;
}
.sf-plans {
	display: grid;
	gap: 8px;
	margin-top: auto;
}
.sf-hero .sf-plans {
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.sf-plan {
	position: relative;
	display: grid;
	gap: 2px;
	padding: 14px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: var(--bg);
	color: var(--text);
	transition:
		border-color 0.15s,
		transform 0.15s,
		background 0.15s;
}
.sf-plan:hover {
	border-color: var(--primary);
	background: #0f1314;
	color: var(--text);
	text-decoration: none;
	transform: translateY(-1px);
}
.sf-lab {
	display: block;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}
.sf-amt {
	font-family: var(--mono);
	font-variant-numeric: tabular-nums;
	font-size: 24px;
	font-weight: 600;
}
.sf-per {
	display: block;
	color: var(--quiet);
	font-size: 12.5px;
}
.sf-go {
	position: absolute;
	top: 12px;
	right: 12px;
	color: var(--faint);
	transition: color 0.15s;
}
.sf-plan:hover .sf-go {
	color: var(--primary);
}
.sf-best {
	border-color: rgba(0, 240, 255, 0.45);
}
/* sits on the tile's top edge, clear of the label, price and arrow */
.sf-best-tag {
	position: absolute;
	top: -9px;
	left: 12px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--primary);
	color: var(--primary-ink);
	font-family: var(--mono);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 16px;
	text-transform: uppercase;
}
.sf-plan-row {
	grid-template-columns: 1fr auto;
	align-items: center;
}
.sf-plan-row .sf-amt {
	font-size: 17px;
}
/* plans shown but not sold: no link, greyed */
.sf-held {
	display: grid;
	gap: 6px;
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--quiet);
}
.sf-held div {
	display: flex;
	justify-content: space-between;
	padding-top: 6px;
	border-top: 1px dashed var(--border);
}
.sf-held-pill {
	align-self: flex-start;
	white-space: normal;
}

/* the best guess and, beside it, what happens next */
.sf-top {
	display: grid;
	grid-template-columns: minmax(0, 640px) minmax(0, 1fr);
	gap: 14px;
	margin-top: 24px;
}
.sf-guess {
	display: grid;
	align-content: start;
	gap: 16px;
	padding: 24px;
	border-radius: 18px;
	border: 1px solid rgba(0, 240, 255, 0.35);
	background: linear-gradient(150deg, rgba(0, 240, 255, 0.1), transparent 55%), var(--surface);
}
.sf-q {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--primary);
}
.sf-big {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 14px;
}
.sf-big b {
	font-size: 30px;
	font-weight: 680;
	letter-spacing: -0.02em;
}
.sf-big .mono {
	font-size: 22px;
}
.sf-guess ul {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--muted);
	font-size: 14px;
}
.sf-guess li {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}
.sf-guess li > .lucide {
	color: var(--primary);
	margin-top: 3px;
	flex: none;
}
.sf-acts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.sf-acts .btn {
	width: auto;
}
.sf-next {
	display: grid;
	align-content: start;
	gap: 16px;
	padding: 24px;
	border-radius: 18px;
	border: 1px solid var(--border);
	background: var(--surface);
}
.sf-next ol,
.sf-next ul {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sf-next ol li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
.sf-next ol li > span:last-child {
	display: grid;
	gap: 2px;
	font-size: 14px;
	color: var(--muted);
}
.sf-next ol b {
	color: var(--text);
	font-weight: 600;
}
.sf-n {
	flex: none;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid var(--border);
	font-family: var(--mono);
	font-size: 12px;
	color: var(--primary);
}
.sf-next ul {
	gap: 6px;
	padding-top: 14px;
	border-top: 1px dashed var(--border);
	color: var(--muted);
	font-size: 13px;
}
.sf-next ul li {
	display: flex;
	gap: 8px;
	align-items: center;
}
.sf-next ul li > .lucide {
	flex: none;
	color: var(--primary);
}
.sf-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 22px 0 0;
	color: var(--quiet);
	font-size: 12.5px;
}

/* phones: one column */
@media (max-width: 860px) {
	.sf-grid,
	.sf-top {
		grid-template-columns: 1fr;
	}
	/* phones go from the guess straight to the plans */
	.sf-next {
		display: none;
	}
	.sf-tile,
	.sf-hero {
		grid-column: auto;
		grid-row: auto;
	}
}
