/* tarot-billing.css — paywall / plan cards / auth. Self-contained variables so
   it also works on the standalone pricing page. */

:root {
	--tk-violet: 155 124 246;
	--tk-cyan: 125 211 252;
	--tk-ink: #e8f7fb;
	--tk-ink-dim: rgba(232, 247, 251, .62);
	--tk-deep: #050a14;
}

body.tk-locked { overflow: hidden; }

/* ------------------------------------------------- theme isolation
   Astra (and most themes) paint every h1–h6 with the theme's dark "heading"
   colour. Inside our dark glass panel that made titles effectively invisible
   (measured: rgb(30,41,59) on a #0a1226 surface). !important is deliberate
   here — this is our own component owning its own palette. */

.tk-pay__glass :is(h1, h2, h3, h4, h5, h6),
.tk-pricing :is(h1, h2, h3, h4, h5, h6) {
	color: #e8f7fb !important;
}

.tk-pay__glass a,
.tk-pricing a { color: rgb(var(--tk-cyan) / .95) !important; }

.tk-pay__glass :focus-visible,
.tk-pricing :focus-visible {
	outline: 2px solid rgb(var(--tk-cyan) / .8);
	outline-offset: 2px;
}

/* ------------------------------------------------------------- modal */

.tk-pay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 22px;
	opacity: 0;
	transition: opacity .32s ease;
}
.tk-pay.is-open { opacity: 1; }

.tk-pay__bg {
	position: absolute;
	inset: 0;
	background: radial-gradient(120% 90% at 50% 0%, rgba(10, 18, 38, .82), rgba(2, 4, 10, .92));
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.tk-pay__glass {
	position: relative;
	width: min(940px, 100%);
	max-height: 88vh;
	overflow-y: auto;
	padding: 38px 34px 30px;
	border-radius: 22px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
	border: 1px solid rgba(255, 255, 255, .16);
	backdrop-filter: blur(18px) saturate(140%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	box-shadow: 0 30px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(var(--tk-violet) / .16) inset;
	color: var(--tk-ink);
	font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
	transform: translateY(14px) scale(.985);
	transition: transform .34s cubic-bezier(.16, .8, .3, 1);
}
.tk-pay.is-open .tk-pay__glass { transform: none; }

.tk-pay__x {
	position: absolute;
	top: 14px;
	right: 18px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: var(--tk-ink);
	font-size: 21px;
	line-height: 1;
	cursor: pointer;
}
.tk-pay__x:hover { background: rgba(255, 255, 255, .16); }

.tk-pay__eyebrow {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: rgb(var(--tk-violet) / .95);
}
.tk-pay__title {
	margin: 0 0 14px;
	font-size: clamp(24px, 3.2vw, 32px);
	font-weight: 400;
	letter-spacing: .01em;
}
.tk-pay__need { margin: 0 0 16px; font-size: 15px; color: var(--tk-ink-dim); }
.tk-pay__need b { color: var(--tk-ink); }
.tk-pay__who { margin: 0 0 14px; font-size: 13px; color: var(--tk-ink-dim); }
.tk-pay__fine {
	margin: 18px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: rgba(232, 247, 251, .45);
	text-align: center;
}
.tk-pay__signin {
	display: block;
	margin: 0 auto 18px;
	padding: 10px 22px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .32);
	background: rgba(255, 255, 255, .11);
	color: #e8f7fb !important;
	font: inherit;
	font-size: 13px;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease;
}
.tk-pay__signin:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .44); }

/* -------------------------------------------------------------- plans */

.tk-pay__plans,
.tk-pricing__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 16px;
}

.tk-plan {
	position: relative;
	display: flex;
	flex-direction: column;
	/* Top padding reserves the badge lane so all three cards start their
	   content on the same baseline, with or without a badge. */
	padding: 56px 20px 20px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, .12);
	background: rgba(255, 255, 255, .045);
	transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.tk-plan:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .22); }

.tk-plan.is-popular {
	border-color: rgb(var(--tk-violet) / .62);
	background: linear-gradient(180deg, rgb(var(--tk-violet) / .18), rgba(255, 255, 255, .04));
	box-shadow: 0 0 0 1px rgb(var(--tk-violet) / .3), 0 18px 46px rgb(var(--tk-violet) / .22);
}
.tk-plan.is-popular::after {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: 16px;
	pointer-events: none;
	background: radial-gradient(120% 60% at 50% 0%, rgb(var(--tk-cyan) / .1), transparent 70%);
}

/* The badge sits *inside* the card as its first row. An overhanging pill looked
   nice but clipped the required copy ("…& unlimited follow-ups"), and clipped
   pricing copy is worse than a plain badge. */
.tk-plan__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	z-index: 1;
	padding: 6px 10px;
	border-radius: 10px;
	background: linear-gradient(90deg, rgb(var(--tk-violet) / .95), rgb(var(--tk-cyan) / .72));
	color: #06101c !important;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .02em;
	text-align: center;
	white-space: normal;
	overflow-wrap: break-word;
}

.tk-plan__name {
	margin: 4px 0 6px;
	font-size: 19px;
	font-weight: 500;
	letter-spacing: .04em;
}
.tk-plan__price {
	margin: 0 0 4px;
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.tk-plan__price b { font-size: 32px; font-weight: 500; letter-spacing: -.01em; }
.tk-plan__price span { font-size: 12px; color: var(--tk-ink-dim); letter-spacing: .06em; }
.tk-plan__credits {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgb(var(--tk-cyan) / .9);
}
.tk-plan__perks {
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	flex: 1;
}
.tk-plan__perks li {
	position: relative;
	padding-left: 18px;
	margin-bottom: 7px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--tk-ink-dim);
}
.tk-plan__perks li::before {
	content: "\2726";
	position: absolute;
	left: 0;
	color: rgb(var(--tk-violet) / .9);
	font-size: 11px;
}

.tk-plan__btn {
	margin-top: auto;
	padding: 12px 18px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .2);
	background: rgba(255, 255, 255, .07);
	color: var(--tk-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.tk-plan__btn:hover { background: rgba(255, 255, 255, .15); transform: translateY(-1px); }

/* The same button as a link, for the PayPal-only route: an <a> needs the
   box metrics spelled out or it inherits the card's text alignment and
   shrinks to the width of its own label. */
a.tk-plan__btn--paypal {
	display: block;
	text-align: center;
	text-decoration: none;
	line-height: 1.2;
}
a.tk-plan__btn--paypal:hover { color: var(--tk-ink); text-decoration: none; }
.tk-plan.is-popular a.tk-plan__btn--paypal { color: #06101c; font-weight: 700; }
.tk-plan__btn.is-busy { opacity: .7; }
.tk-plan.is-popular .tk-plan__btn {
	border-color: transparent;
	background: linear-gradient(90deg, rgb(var(--tk-violet) / .95), rgb(var(--tk-cyan) / .8));
	color: #06101c;
}
.tk-plan.is-popular .tk-plan__btn:hover { filter: brightness(1.08); }

/* A plan that cannot be bought yet: visible, priced, but not clickable. */
.tk-plan__btn.is-soon,
.tk-plan.is-popular .tk-plan__btn.is-soon {
	border-color: rgba(255, 255, 255, .14);
	background: rgba(255, 255, 255, .04);
	color: rgba(223, 241, 246, .42);
	cursor: default;
}
.tk-plan__btn.is-soon:hover { transform: none; }
.tk-plan.is-popular .tk-plan__btn.is-soon { color: rgba(223, 241, 246, .5); }
.tk-plan__soon {
	margin: 8px 0 0;
	font-size: 11px;
	line-height: 1.5;
	color: rgba(223, 241, 246, .38);
	text-align: center;
}

/* Manual PayPal fallback — deliberately quieter than the card button. */
.tk-plan__paypal {
	display: block;
	margin-top: 10px;
	text-align: center;
	font-size: 11.5px;
	letter-spacing: .04em;
	color: var(--tk-ink-dim);
	text-decoration: none;
	opacity: .75;
	transition: opacity .2s ease, color .2s ease;
}
.tk-plan__paypal:hover { opacity: 1; color: rgb(var(--tk-cyan)); text-decoration: underline; }

/* PayPal Smart Button slot — rendered by PayPal's SDK, so it must not be
   clipped or squeezed by the flex card. */
.tk-plan__pp {
	margin-top: 10px;
	min-height: 44px;
	display: block;
}
.tk-plan__pp iframe { min-height: 40px !important; }
.tk-plan__ppnote {
	margin: 6px 0 0;
	text-align: center;
	font-size: 10.5px;
	letter-spacing: .04em;
	color: var(--tk-ink-dim);
	opacity: .7;
}

/* --------------------------------------------------------------- auth */

.tk-auth__tabs { display: flex; gap: 6px; margin: 0 0 16px; }
.tk-auth__tab {
	flex: 1;
	padding: 9px 12px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, .12);
	background: transparent;
	color: var(--tk-ink-dim);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.tk-auth__tab.is-active {
	border-color: rgb(var(--tk-violet) / .6);
	background: rgb(var(--tk-violet) / .16);
	color: var(--tk-ink);
}
.tk-auth__input {
	display: block;
	width: 100%;
	margin-bottom: 10px;
	padding: 13px 15px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .16);
	background: rgba(255, 255, 255, .06);
	color: var(--tk-ink);
	font: inherit;
	font-size: 15px;
}
.tk-auth__input::placeholder { color: rgba(232, 247, 251, .4); }
.tk-auth__input:focus { outline: none; border-color: rgb(var(--tk-violet) / .7); }
.tk-auth__err { min-height: 18px; margin: 2px 0 10px; font-size: 13px; color: #ffb4b4; }
.tk-auth__go {
	width: 100%;
	padding: 13px;
	border-radius: 999px;
	border: 0;
	background: linear-gradient(90deg, rgb(var(--tk-violet) / .95), rgb(var(--tk-cyan) / .8));
	color: #06101c;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .08em;
	cursor: pointer;
}
.tk-auth__go:disabled { opacity: .6; }

/* --------------------------------------------------------- HUD credit */

.tk-imm__credits {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	letter-spacing: .04em;
	color: rgba(232, 247, 251, .78);
	white-space: nowrap;
}
.tk-imm__credits b { font-weight: 700; color: #fff; }
.tk-imm__celabel { color: rgba(232, 247, 251, .55); }
.tk-imm__cepaid { color: rgb(var(--tk-cyan) / .95); font-weight: 600; }
.tk-imm__credits.is-empty { color: rgba(232, 247, 251, .34); }
.tk-imm__credits.is-empty b { color: rgba(232, 247, 251, .5); }

/* ------------------------------------- cost tags inside the immersive UI */

.tk-imm__chipcost {
	display: inline-block;
	margin-left: 7px;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .1);
	font-size: 10px;
	font-style: normal;
	letter-spacing: .06em;
	color: rgba(232, 247, 251, .7);
}
.tk-imm__fucost { color: rgb(var(--tk-cyan) / .9); font-weight: 600; }

@media (max-width: 620px) {
	.tk-pay__glass { padding: 30px 20px 24px; }
	.tk-imm__credits { font-size: 11px; }
	.tk-imm__celabel { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tk-pay, .tk-pay__glass, .tk-plan { transition: none; }
}
