/* biome-ignore-all lint/style/noDescendingSpecificity: components in reading order, wider screens after the phone rules */
/* biome-ignore-all lint/suspicious/noDuplicateProperties: a plain colour stands before every color-mix(), for a browser that has none (Safari before 16.2) */
/* The account, sign-in and checkout pages. Everything here extends the landing's stylesheet
   (static/site.css): its tokens and fonts, its .panel, .btn, .kicker, .h2, .h3, .lead,
   .incl__h, .steps and .hero__help. A colour is a token of that file or a mix of tokens; the
   exceptions are the Google and the Telegram buttons, whose colours are their brands' own,
   and the three named on .acct below. */
[hidden] {
	/* biome-ignore lint/complexity/noImportantStyles: hidden must override component display rules */
	display: none !important;
}

/* ---------- the page ---------- */
/* Three colours the site's tokens do not have, each for one meaning on these pages: a
   warning (a refusal that lost nothing, the network of an invoice, its last minutes), a
   payment that arrived, and the white a coin's mark and a QR code stand on, which stays
   white whatever the theme. */
.acct {
	--warn: #ffc35a;
	--ok: #46dba0;
	--paper: #ffffff;
	min-height: 72vh;
	padding-bottom: var(--sec);
}
.acct__col {
	display: grid;
	gap: 20px;
	max-width: 960px;
	margin: 0 auto;
}
.acct__col > * {
	min-width: 0;
}
.acct__col[data-view="loading"],
.acct__col[data-view="signin"],
.acct__col[data-view="order"],
.acct__col[data-view="error"] {
	max-width: 600px;
}
.acct__col[data-view="catalog"] {
	max-width: none;
}
/* above the picker, signing in keeps the width it has on its own page */
.acct__col[data-view="catalog"] > .signin,
.acct__col[data-view="catalog"] > .connect {
	width: 100%;
	max-width: 600px;
}
/* the message's place under the heading: no box of its own while it has none to show */
#notice-top {
	display: contents;
}
.acct__head {
	margin-bottom: 4px;
}
.acct__head .lead {
	overflow-wrap: anywhere;
}
.loading {
	color: var(--muted);
}
.acct .panel {
	gap: 20px;
}
.acct .btn {
	white-space: normal;
	text-align: center;
}
button {
	cursor: pointer;
}
button:disabled {
	cursor: default;
	opacity: 0.55;
}
.test-banner {
	padding: 12px 16px;
	border-radius: var(--r-s);
	border: 1px solid rgba(50, 215, 255, 0.3);
	border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent);
	background: rgba(50, 215, 255, 0.07);
	background: color-mix(in srgb, var(--cyan) 7%, transparent);
	color: var(--muted);
	font-size: 14px;
	line-height: 20px;
}

/* ---------- messages: a note, and an error that does not look like one ---------- */
.msg {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 14px 16px;
	border-radius: var(--r-s);
	border: 1px solid var(--line-2);
	background: rgba(138, 127, 249, 0.1);
	background: color-mix(in srgb, var(--violet) 10%, transparent);
	color: var(--text);
	font-size: 16px;
	line-height: 24px;
	scroll-margin: 96px 0 24px;
}
.msg__text {
	flex: 1 1 14em;
}
.msg--error {
	border-color: var(--pink);
	background: rgba(217, 135, 245, 0.12);
	background: color-mix(in srgb, var(--pink) 12%, transparent);
}
.msg--error .msg__text {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	gap: 10px;
}
.msg--error .msg__text::before {
	content: "!";
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--pink);
	color: var(--ink);
	font: 700 14px / 1 var(--ff-m);
}

/* ---------- a reference: one line, eight characters, a Copy of the whole ---------- */
.ref-line {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 10px;
	white-space: nowrap;
}
.ref-line__value {
	color: var(--text);
	font: 500 14px / 20px var(--ff-m);
}
.order-list .ref-line__value {
	text-align: right;
}
.ref-line .copy-button {
	font-size: 14px;
}
/* the browser refused the clipboard: the whole value is shown to be selected by hand */
.ref-line--full {
	white-space: normal;
}
.ref-line--full .ref-line__value {
	overflow-wrap: anywhere;
}
.ref-line .copy-status:not(.sr) {
	grid-column: 1 / -1;
	white-space: normal;
}
.notice-support {
	flex-basis: 100%;
	min-width: 0;
}
/* a refusal that lost nothing: a warning, not a fault */
.msg--warn {
	border-color: rgba(255, 195, 90, 0.45);
	border-color: color-mix(in srgb, var(--warn) 45%, transparent);
	background: #2d2b47;
	background: color-mix(in srgb, var(--warn) 7%, var(--s2));
	font-size: 15px;
	line-height: 22px;
}
.msg--warn .msg__text {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	gap: 10px;
}
.msg--warn .msg__text::before {
	content: "!";
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--warn);
	color: var(--ink);
	font: 700 14px / 1 var(--ff-m);
}

/* ---------- a state of the whole page: it did not load, buying is off ---------- */
.state p {
	color: var(--muted);
}
.state__actions {
	display: grid;
	gap: 12px;
}
.state__more {
	margin-top: 16px;
}

/* ---------- links and small text ---------- */
.text-button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: 16px;
	line-height: 24px;
	text-align: left;
	text-decoration: underline;
	text-decoration-color: var(--line-2);
	text-underline-offset: 4px;
	transition:
		color 0.2s,
		text-decoration-color 0.2s;
}
.text-button:hover {
	color: var(--text);
	text-decoration-color: var(--cyan);
}
.fineprint {
	color: var(--dim);
	font-size: 14px;
	line-height: 20px;
}
.muted {
	color: var(--muted);
}

/* ---------- sign-in ---------- */
.signin__what {
	color: var(--muted);
}
.provider-buttons {
	display: grid;
	gap: 12px;
	margin-top: 24px;
}
.signin__hint {
	color: var(--text);
	font-weight: 600;
}
/* Google's sign-in button on a dark page, as its brand rules draw it */
.google-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 0 26px;
	border: 1px solid #8e918f;
	border-radius: 16px;
	background: #131314;
	color: #e3e3e3;
	font: 600 17px / 1 var(--ff-b);
	transition: background 0.25s var(--ease);
}
.google-button:hover {
	background: #242425;
}
.google-button svg {
	flex: none;
}
/* Telegram's own button: its brand blue and the white plane, as Google's button is Google's */
.telegram-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 0 26px;
	border: 1px solid #2aabee;
	border-radius: 16px;
	background: #2aabee;
	color: #fff;
	font: 600 17px / 1 var(--ff-b);
	transition: background 0.25s var(--ease);
}
.telegram-button:hover {
	border-color: #229ed9;
	background: #229ed9;
}
.telegram-button svg {
	flex: none;
}
.telegram-button--fit {
	width: auto;
}
.divider {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--dim);
	font: 500 12px / 16px var(--ff-m);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.divider::before,
.divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--line);
}
#password-option,
#email-option {
	display: grid;
	gap: 16px;
	margin-top: 24px;
}
.auth-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0 16px;
}
.auth-help {
	color: var(--muted);
}
.acct label {
	display: block;
	margin-bottom: 8px;
	color: var(--muted);
	font-size: 14px;
	line-height: 20px;
}
.acct input,
.acct select {
	width: 100%;
	margin-bottom: 14px;
	padding: 13px 16px;
	border: 1px solid var(--line-2);
	border-radius: var(--r-s);
	background: var(--deep);
	color: var(--text);
	font: inherit;
}

/* ---------- the Telegram code step ---------- */
.challenge {
	display: grid;
	gap: 16px;
}
.challenge .incl__h {
	margin: 0 0 -8px;
}
.challenge__code {
	padding: 16px 20px;
	border-radius: var(--r-m);
	border: 1px solid var(--line-2);
	background: var(--deep);
	font: 700 clamp(30px, 9.6vw, 44px) / 1 var(--ff-m);
	letter-spacing: 0.14em;
	text-align: center;
	white-space: nowrap;
}
.challenge__timer {
	margin-top: -4px;
	color: var(--muted);
	font: 500 14px / 20px var(--ff-m);
	font-variant-numeric: tabular-nums;
	text-align: center;
}
.challenge__steps li {
	padding: 12px 0;
}
.challenge__steps .n {
	grid-row: auto;
	padding-top: 4px;
}
.challenge__steps p {
	max-width: none;
}
.challenge__state {
	color: var(--muted);
}
.challenge__state--error {
	padding: 14px 16px;
	border-radius: var(--r-s);
	border: 1px solid var(--pink);
	background: rgba(217, 135, 245, 0.12);
	background: color-mix(in srgb, var(--pink) 12%, transparent);
	color: var(--text);
	font: inherit;
}
.challenge__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 24px;
}

.callout {
	padding: 14px 16px;
	border-radius: var(--r-s);
	background: rgba(138, 127, 249, 0.08);
	background: color-mix(in srgb, var(--violet) 8%, transparent);
	color: var(--muted);
	font-size: 16px;
	line-height: 24px;
}
.detail-line {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
	font-size: 16px;
	line-height: 24px;
}
.detail-line span {
	flex-shrink: 0;
	color: var(--muted);
}
.detail-line strong {
	text-align: right;
	overflow-wrap: anywhere;
}
.detail-value {
	min-width: 0;
	text-align: right;
}
.detail-value strong,
.copy-status {
	display: block;
}
.copy-status {
	color: var(--muted);
	font-size: 12px;
	line-height: 16px;
}
/* A value with its unit (details of view.js): the amount of a payment and its coin. The
   coin is read with the number, not copied with it. A buyer may type the number by eye, so
   it is as bright as the text and never breaks inside: a long one takes a smaller type,
   sized by the width it has (view.js marks its length; the divisors fit the mono type of
   the order card). */
.detail-value .figure {
	container-type: inline-size;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 10px;
	min-width: 0;
	color: var(--text);
}
.detail-value .figure strong {
	font-size: min(20px, 100cqi / 10);
	white-space: nowrap;
	overflow-wrap: normal;
}
.detail-value .figure[data-fit="21"] strong {
	font-size: min(20px, 100cqi / 13);
}
.detail-value .figure[data-fit="26"] strong {
	font-size: min(20px, 100cqi / 16.1);
}
/* longer than any coin's amount, or a browser without container units: it wraps as before */
.detail-value .figure[data-fit="wrap"] strong {
	font-size: 14px;
	white-space: normal;
	overflow-wrap: anywhere;
}
@supports not (width: 1cqi) {
	.detail-value .figure strong {
		white-space: normal;
		overflow-wrap: anywhere;
	}
}

/* ---------- tablet and desktop ---------- */
@media (min-width: 720px) {
	.acct__col {
		gap: 24px;
	}
	.acct__head {
		margin-bottom: 8px;
	}
	.state__actions {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 12px 20px;
	}
}
