/**
 * T9 "[coin] calculator" — Figma 1087:5608 (desktop) / 1087:6234 (mobile).
 * Tokens from base.css. MFSA / newsletter / FAQ / pills from sections-shared.css.
 * The calculator itself is styled by crypto-widget.css.
 */

.xc-t9 {
	background: var(--xc-rich-black);
	color: var(--xc-off-white);
	overflow-x: clip;
	max-width: 100%;
}

/*
 * Own copy: base.css defines no .screen-reader-text, so without this the two
 * table captions would render as visible body text once WP core's block-library
 * CSS is dequeued for speed.
 */
.xc-t9 .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ---------- Hero — Figma 1087:5642 (1440×810) ---------- */
.t9-hero {
	/*
	 * FLOOR SIZED TO THE WIDGET'S TALLEST STATE, not to the design's resting one.
	 *
	 * The widget changes height in normal use: the "All fees included" panel adds
	 * ~90px when opened (three rows: service, network, total). With the hero hugging that, every change resized the
	 * section — and these heroes paint a diagonal gradient / background art scaled
	 * to their own box, so the whole backdrop visibly re-rendered. Sized to the
	 * tallest reachable state, the shorter ones leave hero whitespace instead.
	 *
	 * Raised by 40px on 2026-08-18: the fee panel gained its third row (total) and
	 * the payment dropdown became a two-segment switch. Raise it again if either
	 * grows — and measure in a browser, this was computed from box math.
	 */
	min-height: 970px;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	background: linear-gradient(233.49deg, var(--xc-navy, #273045) 12.423%, var(--xc-rich-black, #111620) 86.271%);
}

.t9-hero__visual {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

/*
 * No masks here: both props are true transparent cut-outs, unlike the convert-hub
 * / T7 hero exports which have the frame gradient baked in. (The Figma GROUP
 * export of these two is opaque for exactly that reason — hence two <img>s placed
 * from their own node boxes rather than one composited file.)
 */
.t9-hero__visual img {
	position: absolute;
	left: 50%;
	max-width: none;
	object-fit: contain;
}

/* Figma 1087:6875: left 532 / top 149 / 559×559 on 1440 → centre offset +91.5. */
.t9-hero__calc {
	top: 149px;
	width: 559px;
	height: 559px;
	opacity: .8;
	transform: translateX(calc(-50% + 91.5px));
}

/* Figma 1087:6876: left 471 / top 103 / 214×259 → centre offset −142. Above the
   calculator in z-order, as the frame draws it. */
.t9-hero__coin {
	top: 103px;
	width: 214px;
	height: 259px;
	/* Almost the whole prop sits under the H1 and the sub-paragraph, so it is
	   dimmed as well as scrimmed — the calculator only clips the copy with its
	   left edge and keeps the frame's .8. */
	opacity: .55;
	z-index: 1;
	transform: translateX(calc(-50% - 142px));
}

/*
 * SCRIM — ours, not the frame's, and the reason it exists is worth stating.
 *
 * Figma 1087:5642 deliberately runs the copy across the art: the H1 is 655.6px
 * wide and the coin starts at x=471, so they overlap by design. In the frame
 * itself the result is that the sub-paragraph's second and third lines cross the
 * coin and the calculator and become genuinely hard to read — the same is true of
 * the mobile frame (1087:6257), where the rate line and both trust lines sit
 * straight on top of the props.
 *
 * So the composition is kept exactly and a wash is laid between the art and the
 * text instead. It fades out before the calculator's right half, which is the
 * part of the prop with no copy over it, so the art still reads as art.
 *
 * z-index 2 puts it above both props (the coin is 1) but still inside
 * .t9-hero__visual, which is its own stacking context at z-index 0 — so
 * .t9-hero__inner (z-index 2, a sibling) keeps painting over all of it.
 */
.t9-hero__visual::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		90deg,
		rgba(17, 22, 32, .3) 0%,
		rgba(17, 22, 32, .55) 26%,
		rgba(17, 22, 32, .52) 44%,
		rgba(17, 22, 32, .18) 56%,
		rgba(17, 22, 32, 0) 66%
	);
}

/* Figma 1087:5644 — 1440×160 wash landing the hero on the page background. */
.t9-hero__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 160px;
	z-index: 1;
	background: linear-gradient(180deg, rgba(17, 22, 32, 0) 0%, #111620 100%);
	pointer-events: none;
}

.t9-hero__inner {
	position: relative;
	z-index: 2;
	padding-bottom: 64px;
}

/* ---------- Breadcrumbs — Figma 1087:5656 ---------- */
.t9-crumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	box-sizing: border-box;
	min-height: 52px;
	padding: 16px 0;
	margin: 0;
	font-size: 16px;
	line-height: 1.25;
	color: var(--xc-slate, #788196);
}

.t9-crumbs a { color: var(--xc-slate, #788196); text-decoration: none; }
.t9-crumbs a:hover { color: var(--xc-off-white); }
.t9-crumbs [aria-current="page"] { color: var(--xc-off-white); }

.t9-crumbs__mid { display: inline-flex; align-items: center; gap: 4px; }
.t9-crumbs__ellipsis { display: none; align-items: center; gap: 4px; }

.t9-crumbs__sep {
	display: inline-flex;
	width: 12px;
	height: 12px;
	color: var(--xc-slate, #788196);
}

.t9-crumbs__sep svg { width: 100%; height: 100%; }

/* ---------- Hero layout ---------- */
/* Same split as T7 and the calculator hub: the frame is 656 + 47 + 536 on a 1240
   content width; this container is 1184, so the widget takes a fixed 500 and the
   copy absorbs the difference. */
.t9-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 500px;
	gap: 40px;
	align-items: start;
	/* Figma: copy block at y=158, i.e. 106px below the 52px crumb row. */
	padding-top: 106px;
}

.t9-hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	max-width: 656px;
}

.t9-hero h1 {
	margin: 0;
	font-family: var(--xc-display);
	font-weight: 800;
	font-size: clamp(40px, 5.3vw, 76px);
	line-height: 1;
	color: var(--xc-off-white);
}

.t9-hero__sub {
	margin: 0;
	max-width: 560px;
	font-size: 16px;
	line-height: 1.25;
	color: #cfd6e2;
}

/* Figma 1087:5651 — a BODY line with only the value bold, not a display figure.
   (T7 promotes the same sentence to 44px, because there the rate IS the page.) */
.t9-hero__rate {
	margin: 0;
	font-size: 16px;
	line-height: 1.25;
	color: #cfd6e2;
}

.t9-hero__rate strong {
	font-weight: 700;
	color: #cfd6e2;
	/* Tabular figures: this value re-renders on refresh, and proportional digits
	   make the whole line jitter as it changes. */
	font-variant-numeric: tabular-nums;
}

.t9-hero__trust {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 6px 0;
	font-size: 14px;
	line-height: 1.25;
	color: var(--xc-soft-white, #eeeff2);
}

.t9-hero__trust time { font-variant-numeric: tabular-nums; }

.t9-hero__dot {
	width: 6px;
	height: 6px;
	border-radius: 3px;
	background: var(--xc-bright-blue, #1a9cfc);
	flex: 0 0 auto;
}

.t9-hero__widget { min-width: 0; }

/* ---------- Sections ---------- */
.t9-section { padding: 64px 0; }

.t9-section__title {
	margin: 0 0 24px;
	font-family: var(--xc-display);
	font-weight: 800;
	font-size: 44px;
	line-height: 1;
	color: var(--xc-off-white);
}

/* ---------- Quick conversions — Figma 1087:6883 ---------- */
.t9-tables {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.t9-tbl {
	box-sizing: border-box;
	border: 1px solid rgba(238, 239, 242, .1);
	border-radius: 14px;
	background: rgba(238, 239, 242, .02);
	overflow: hidden;
}

.t9-tbl__head {
	margin: 0;
	padding: 16px 20px 17px;
	border-bottom: 1px solid rgba(238, 239, 242, .1);
	background: rgba(238, 239, 242, .02);
	font-family: var(--xc-display);
	font-weight: 700;
	font-size: 18px;
	line-height: 1;
	color: var(--xc-off-white);
}

.t9-tbl table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.t9-tbl th,
.t9-tbl td {
	box-sizing: border-box;
	padding: 12px 20px 13px;
	border-bottom: 1px solid var(--xc-dark-grey, #1f242d);
	font-weight: 400;
	vertical-align: middle;
}

.t9-tbl tr:last-child th,
.t9-tbl tr:last-child td { border-bottom: 0; }

.t9-tbl th {
	text-align: left;
	font-family: var(--xc-body);
	font-size: 14px;
	line-height: 1.25;
	color: var(--xc-off-white);
	font-variant-numeric: tabular-nums;
}

/* The converted figure. Blue + Saira Bold, so the two columns read as
   "input → answer" rather than as a two-column list — Figma 1087:6892. */
.t9-tbl td {
	text-align: right;
	font-family: var(--xc-display);
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	color: var(--xc-bright-blue, #1a9cfc);
	font-variant-numeric: tabular-nums;
}

/* ---------- How this calculator works — Figma 1087:5933 ---------- */
.t9-details__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.t9-detail {
	box-sizing: border-box;
	padding: 24px;
	border-radius: 12px;
	border: 1px solid rgba(249, 253, 255, .1);
	background: rgba(249, 253, 255, .05);
}

.t9-detail h3 {
	margin: 0 0 7px;
	font-family: var(--xc-body);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.25;
	color: var(--xc-off-white);
}

.t9-detail p {
	margin: 0;
	font-size: 14px;
	line-height: 1.25;
	color: var(--xc-slate, #788196);
}

/* ---------- Mobile — Figma 1087:6234 (375w) ---------- */
@media (max-width: 960px) {
	.xc-t9 .xc-container {
		padding-inline: 16px;
		max-width: 100%;
		box-sizing: border-box;
	}

	.t9-hero__visual img { left: 0; }

	/*
	 * Figma 1087:6879 — left 62.5 / top 231.8 / 306.5×306.5.
	 *
	 * .7, not the desktop's .8: at 375px both props land directly on the rate line
	 * and the two trust lines (the frame stacks them exactly this way). The
	 * composition is the design's; the extra transparency is ours, so three lines
	 * of small copy stay readable over the top of it.
	 */
	.t9-hero__calc {
		top: 232px;
		width: 307px;
		height: 307px;
		opacity: .7;
		transform: translateX(62px);
	}

	/* Figma 1087:6880 — left 29 / top 206.6 / 117.4×142. */
	.t9-hero__coin {
		top: 207px;
		width: 117px;
		height: 142px;
		opacity: .7;
		transform: translateX(29px);
	}

	/*
	 * Vertical, not horizontal: at 375px the copy is full-width and stacked above
	 * the widget, so the text-over-art band runs across the top rather than down
	 * the left. Clears by 78%, below the last trust line.
	 */
	.t9-hero__visual::after {
		background: linear-gradient(
			180deg,
			rgba(17, 22, 32, .35) 0%,
			rgba(17, 22, 32, .62) 30%,
			rgba(17, 22, 32, .6) 55%,
			rgba(17, 22, 32, .2) 70%,
			rgba(17, 22, 32, 0) 82%
		);
	}

	/* The mobile fade rectangle starts at the hero's own bottom edge, so it barely
	   touches it — the desktop's 160px would draw a curtain across the tables. */
	.t9-hero__fade { height: 90px; }

	.t9-crumbs__mid { display: none; }
	.t9-crumbs__ellipsis { display: inline-flex; }

	.t9-hero__inner { padding-bottom: 32px; }

	/* Figma 1087:6271 — copy at y=56, i.e. 4px below the 52px crumb row; the
	   calculator becomes the last item in the same stack. */
	.t9-hero__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		padding-top: 4px;
	}

	.t9-hero__copy { max-width: none; }
	.t9-hero h1 { font-size: 40px; }
	.t9-hero__sub { max-width: none; }
	.t9-hero__trust { align-items: flex-start; }
	.t9-hero__dot { margin-top: 6px; }

	.t9-section { padding: 32px 0; }
	.t9-section__title { font-size: 24px; margin-bottom: 12px; }

	/* Figma 1087:6953 — the two tables stack, 24px apart. */
	.t9-tables {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.t9-details__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
}
