/* biome-ignore-all lint/style/noDescendingSpecificity: the sections in reading order, wider screens after the phone */
/* The sections of the signed-in account page (change account-app): Баланс, Настройки and Мои
   копии, inside the shell of app.css. Extends site.css, account.css and app.css. */
/* ---------- Баланс: the renewal line, the included line and the records card */
.renewal {
	padding-top: 18px;
	border-top: 1px solid var(--line-2);
}
.renewal__line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 16px;
	color: var(--muted);
}
.incl__list--row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 24px;
	margin: 0;
}
.balance-more:has(.incl__list--row) {
	padding-top: 18px;
}
.records__tabs {
	min-inline-size: 0;
	width: fit-content;
	max-width: 100%;
	margin-bottom: 12px;
}
.records__tabs button {
	min-height: 40px;
	padding: 0 16px;
	font-size: 14px;
}

/* ---------- Настройки: groups of rows */
.app-section {
	display: grid;
	gap: 20px;
}
.app-section > * {
	min-width: 0;
}
.settings-group__lede {
	margin-top: 6px;
	color: var(--muted);
	font-size: 15px;
}
.settings-group .identity-method,
.settings-row,
.settings-group .letters-card {
	display: grid;
	/* the name of a row keeps its own width: on the narrowest phone the action beside it
	   wraps instead of running over it */
	grid-template-columns: 36px minmax(min-content, 1fr) auto;
	align-items: center;
	gap: 4px 14px;
	min-height: 64px;
	padding: 12px 0;
	border-top: 1px solid var(--line);
}
.settings-group > h2 + .identity-method,
.settings-group > p + .identity-method,
.settings-group > h2 + .settings-row {
	margin-top: 12px;
}
.settings-row--link {
	color: var(--text);
	text-decoration: none;
}
.settings-row--link:hover .method-what b {
	color: var(--pink);
}
.method-icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--s3);
	color: var(--text);
}
.method-icon--tg {
	background: #2aabee;
	color: #fff;
}
.method-icon--g {
	background: #fff;
}
.method-what {
	display: grid;
	min-width: 0;
}
.method-what b {
	font-weight: 600;
}
.method-what small {
	color: var(--muted);
	font-size: 14px;
	line-height: 20px;
	overflow-wrap: anywhere;
}
.method-end {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 8px 12px;
}
.chev {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: var(--dim);
	stroke-width: 2;
}
.settings-langs a {
	color: var(--text);
}
.settings-group .account-email {
	border-top: 1px solid var(--line);
}
.settings-end {
	display: grid;
	gap: 10px;
	justify-items: start;
	padding-top: 4px;
}
.settings-docs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
}
.settings-docs a {
	color: var(--muted);
}
.settings-logout {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}
@media (max-width: 719px) {
	.settings-row .settings-langs {
		flex-direction: column;
		align-items: flex-end;
		gap: 4px;
	}
}
.settings-group .method-what,
.settings-group .letters-card__choice {
	display: grid;
	gap: 2px;
}
.apikey-card:not([open]) {
	padding-block: 14px;
}

/* ---------- Мои копии: one row a job, each a link to it */
.copies__list {
	display: grid;
}
.copy-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 4px 16px;
	padding: 16px 0;
	border-top: 1px solid var(--line);
	color: var(--text);
	text-decoration: none;
}
.copy-row:first-child {
	border-top: 0;
	padding-top: 0;
}
a.copy-row:hover .copy-row__what {
	color: var(--pink);
}
.copy-row__what {
	font-weight: 600;
}
.copy-row__meta,
.copy-row__files {
	grid-column: 1 / -1;
	color: var(--muted);
	font-size: 14px;
	line-height: 20px;
}
.copy-row__files {
	color: var(--dim);
	font: 500 12px / 18px var(--ff-m);
}
.copy-row__files:empty {
	display: none;
}
.copy-row__state {
	grid-column: 2;
	grid-row: 1;
	color: var(--cyan);
	font: 500 12px / 18px var(--ff-m);
	text-align: right;
}
.copy-row__state--running,
.copy-row__state--queued,
.copy-row__state--partial,
.copy-row__state--failed {
	color: var(--pink);
}
.copy-row__state--expired,
.copy-row__state--deleted {
	color: var(--dim);
}
@media (min-width: 720px) {
	/* one table: the columns of every row line up, each as wide as its longest cell */
	.copies__list {
		grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
		column-gap: 20px;
	}
	.copy-row {
		grid-column: 1 / -1;
		grid-template-columns: subgrid;
		align-items: center;
	}
	.copy-row > * {
		grid-row: 1;
		grid-column: auto;
	}
	.copy-row__state {
		text-align: left;
	}
	.copy-row__files {
		text-align: right;
	}
	.copy-row__files:empty {
		display: block;
	}
}
