/* biome-ignore-all lint/style/noDescendingSpecificity: components in reading order, wider screens after the phone rules */
/* The studio: the page where a signed-in person makes copies. It extends the landing's
   stylesheet (static/site.css) and the account pages' sheets (static/checkout): their page
   frame, .panel, .btn, .choice, .steps, the dialog. The start bar and the state of a job are
   the studio's own (studio.css, job.css): the account pages' order card that had them was
   rebuilt without them (W29).
   This file adds the place for a video, the count and mode choices, the rows of a job and
   the steps of a first visit. A colour is a token of site.css or a mix of tokens. */

/* ---------- the page ---------- */
.acct__col[data-view="gate"] {
	max-width: 600px;
}
.acct__col[data-view="studio"] {
	max-width: none;
}
#page-lead[data-balance-pending] {
	visibility: hidden;
}
.studio .test-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 16px;
	padding: 6px 16px;
}
.test-banner .text-button {
	color: var(--text);
	font-size: 14px;
	line-height: 20px;
}
/* ---------- the video ---------- */
.drop {
	display: grid;
	justify-items: center;
	gap: 16px;
	padding: 36px 16px;
	border: 1.5px dashed var(--line-2);
	border-radius: var(--r-m);
	background: color-mix(in srgb, var(--deep) 45%, transparent);
	text-align: center;
	transition:
		border-color 0.2s,
		background 0.2s;
}
.drop.is-over {
	border-color: var(--cyan);
	background: color-mix(in srgb, var(--cyan) 10%, transparent);
}
.drop__icon {
	width: 40px;
	height: 40px;
	fill: none;
	stroke: var(--cyan);
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}
/* dropping a file is a thing of a mouse: a phone gets the button alone */
.drop__title {
	display: none;
}
.drop__limits {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.drop__limits li {
	padding: 4px 10px;
	border: 1px solid var(--line-2);
	border-radius: 99px;
	color: var(--muted);
	font: 500 12px / 16px var(--ff-m);
	letter-spacing: 0.02em;
	white-space: nowrap;
}
.drop .fineprint {
	margin-top: -4px;
	text-wrap: balance;
}
.blocked {
	display: grid;
	gap: 12px;
}
.blocked p {
	color: var(--muted);
}
.blocked .state__actions {
	margin-top: 8px;
}

/* ---------- the options ---------- */
/* The options card and the start bar under it are two items of the work column. On a phone
   the card is set a little closer than the other cards and the bar stands right under it,
   so that the whole choice, the button included, fits one screen where it can. */
.optstep {
	display: contents;
}
.optstep .work__card {
	gap: 16px;
}
.filebox {
	display: grid;
	gap: 12px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--line-2);
}
/* The row of the chosen video: its name, and under it its size and the way to another
   video. "Change" stands on the left, a line of text to the eye and a finger's height to
   the touch. The corner of the card stays empty: it is where the strip's "Open" stood a
   moment before the card came up. */
.filerow {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
}
.filerow__more {
	display: flex;
	align-items: center;
	gap: 12px;
}
.filerow .text-button {
	margin: -14px 0;
	font-size: 14px;
	line-height: 16px;
}
.filerow__icon {
	width: 40px;
	height: 40px;
	padding: 8px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--violet) 22%, transparent);
	fill: none;
	stroke: var(--text);
	stroke-width: 1.5;
	stroke-linejoin: round;
}
.filerow__what {
	display: grid;
	gap: 2px;
	min-width: 0;
}
.filerow__what strong {
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.filerow__what span {
	color: var(--muted);
	font: 500 12px / 16px var(--ff-m);
}
.opt {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.opt legend {
	padding: 0;
}
/* how many are open, and beside it the way to more: a line a finger can hit */
.counts__note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 16px;
	margin-top: 4px;
	color: var(--dim);
	font-size: 14px;
	line-height: 20px;
}
.counts__note span {
	padding: 12px 0;
}
.counts__note .text-button {
	font-size: 14px;
	line-height: 20px;
}
.counts {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 8px;
}
/* a choice that is closed while a start is held: what was sent stays lit, the rest is dim */
.choice[aria-pressed="true"]:disabled {
	opacity: 1;
}
.count {
	min-height: 48px;
	padding: 0;
	font: 700 18px / 1 var(--ff-d);
	text-align: center;
}
.modes {
	display: grid;
	gap: 8px;
}
/* a mode: its name, what it does beside it (under it when the two do not fit one line),
   then when to take it */
.mode {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	padding: 10px 14px;
}
.mode strong {
	font: 700 16px / 22px var(--ff-d);
	letter-spacing: -0.01em;
}
.mode span {
	color: var(--muted);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}
.mode .mode__when,
.mode .mode__note {
	flex-basis: 100%;
	color: var(--dim);
	font-size: 13px;
	line-height: 18px;
}
.mode .mode__note {
	color: var(--pink);
}
/* what to know before the start: the sound, and that a started job runs to its end. How
   long a copy takes is said here where the screen has the room for one more line; a phone
   reads it on the card of the job, right after the start. */
.know__wait {
	display: none;
}
.know {
	display: grid;
	gap: 6px;
	color: var(--dim);
	font-size: 14px;
	line-height: 20px;
}
.know li {
	position: relative;
	padding-left: 14px;
}
.know li::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 0;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--line-2);
}

/* the cost in the start bar: a figure with its small word, or a check and "Included" */
.startbar h2 {
	overflow-wrap: normal;
}
.startbar__line strong {
	display: flex;
	align-items: baseline;
	gap: 6px;
}
.startbar__line small {
	color: var(--muted);
	font: 600 14px / 20px var(--ff-b);
	letter-spacing: 0;
}
.startbar__line svg {
	flex: none;
	align-self: center;
	width: 16px;
	height: 16px;
	color: var(--cyan);
}
.startbar__line svg + small {
	color: var(--text);
	font-size: 15px;
}

/* On a phone the line of how many counts are open takes no row of its own: the bar under the
   choice says it ("Available: 3 copies") until a count is pressed, and what is left after
   it once one is. The way to more stands at the end of the heading of the counts. (The
   2026-10-08 verification: in Ukrainian at 390x844 that row put the start button 44 px
   under the first screen.) */
@media (max-width: 719px) {
	.opt--counts {
		position: relative;
	}
	/* the heading floats, so it is a line of the counts' own box and the link can be set at
	   its end: a fieldset's rendered legend lies outside that box, where nothing can be
	   placed against it the same way in every browser */
	.opt--counts legend {
		float: left;
		width: 100%;
	}
	.opt--counts .counts {
		clear: both;
	}
	/* a finger's height, its words on the line of the heading, and clear of the counts */
	.counts__note {
		position: absolute;
		top: -18px;
		right: 0;
		margin: 0;
	}
	.counts__note span {
		display: none;
	}
}
/* six counts in a row are too narrow for a finger on a narrow phone: three and three */
@media (max-width: 389px) {
	.counts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
/* The bar with the start button lies in the page under the options, at every width: the
   button is reached past every choice and the notes under them, whatever the language and
   whatever the account pays with. (The account pages hold their .paybar at the bottom of a
   phone's screen; here it would lie over the notes.) The page brings the card up so that
   the button is on the screen where all of it fits one (sight.js). */
.startbar {
	position: static;
	display: grid;
	gap: 10px;
	margin-top: -8px;
	padding: 14px 16px 16px;
	border: 1px solid var(--line-2);
	border-radius: var(--r-l);
	background: var(--s2);
	box-shadow: 0 18px 44px -8px color-mix(in srgb, var(--deep) 92%, transparent);
}
/* what the start takes, beside what it is: the count and the mode, what is left, the cost */
.startbar__line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.startbar__line > div {
	display: grid;
	gap: 2px;
	min-width: 0;
	color: var(--muted);
	font-size: 14px;
	line-height: 20px;
}
.startbar__line h2 {
	color: var(--text);
	font: 700 18px / 22px var(--ff-d);
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}
.startbar__line > strong {
	font: 800 28px / 1 var(--ff-d);
	letter-spacing: -0.03em;
	white-space: nowrap;
}

/* ---------- tablet and desktop ---------- */
@media (min-width: 720px) {
	.studio-layout,
	.work,
	.side {
		gap: 24px;
	}
	.acct .work__card {
		gap: 24px;
		padding: 28px;
	}
	.drop {
		padding: 56px 24px;
	}
	.drop__title {
		display: block;
	}
	.modes {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.mode {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 2px;
		padding: 12px 14px;
	}
	.mode .mode__when,
	.mode .mode__note {
		flex-basis: auto;
		margin-top: 4px;
	}
	.counts {
		grid-template-columns: repeat(6, 64px);
	}
	.know__wait {
		display: block;
	}
	/* the start bar: what it costs, then the button beside it */
	.startbar {
		margin-top: 0;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 10px 28px;
		padding: 20px 28px;
		border: 1px solid var(--line-2);
		border-radius: var(--r-l);
		background: var(--s2);
		box-shadow: none;
	}
	.startbar__line {
		gap: 28px;
		padding-top: 0;
		border-top: 0;
	}
	.startbar .btn {
		width: auto;
		min-width: 240px;
	}
	.startbar > .fineprint,
	.startbar > .msg {
		grid-column: 1 / -1;
	}
}
@media (min-width: 1000px) {
	.studio-layout {
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: 28px;
		align-items: start;
	}
	.acct .side__card {
		padding: 28px;
	}
}

/* the way back to Мои копии over a job opened by its address (change account-app) */
.job-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: fit-content;
	color: var(--muted);
	font-weight: 600;
	text-decoration: none;
}
.job-back svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

/* biome-ignore-all lint/style/noDescendingSpecificity: components in reading order, wider screens after the phone rules */
/* The studio, second sheet: a job. The card of an upload and of a job (its state, the bar,
   a row per copy, how long the files are kept), the strip of what is not on the card
   (upload.js, aside). The way to cancel an upload lies under its bar, on the
   left: the top right corner of a card is where the strip's "Open" stood a moment before
   the card came up, and nothing that stops a thing is drawn under that finger. The build writes it into /static/studio/studio.css after
   studio.css: one stylesheet for the page. A colour is a token of site.css or a mix of
   tokens. */

/* What is not on the card (a video that uploads, with how far it is; a start that waits;
   a job in flight, or whose files could not be deleted), and the way to it. It stays under
   the bar at the top (--bar: the app shell's on a phone, none beside the
   sidebar), in sight wherever the page is scrolled to. */
.upstrip {
	position: sticky;
	top: calc(var(--bar, 64px) + 12px);
	z-index: 4;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px 16px;
	padding: 12px 16px;
	border: 1px solid color-mix(in srgb, var(--cyan) 45%, transparent);
	border-radius: var(--r-m);
	background: color-mix(in srgb, var(--cyan) 9%, var(--s2));
	box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--deep) 92%, transparent);
}
.upstrip__what {
	display: grid;
	gap: 2px;
	min-width: 0;
}
.upstrip__what strong {
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.upstrip__what span {
	color: var(--cyan);
	font: 500 12px / 16px var(--ff-m);
	font-variant-numeric: tabular-nums;
}
.upstrip .upmeter {
	grid-column: 1 / -1;
	height: 4px;
}
/* a start that waits for the person (its answer was lost, or it was refused), a job the
   server cannot be asked about, and a job whose files could not be deleted */
.upstrip[data-kind="held"],
.upstrip[data-kind="missed"],
.upstrip[data-kind="off"],
.upstrip[data-kind="undeleted"] {
	border-color: color-mix(in srgb, var(--pink) 55%, transparent);
	background: color-mix(in srgb, var(--pink) 9%, var(--s2));
}
.upstrip[data-kind="held"] .upstrip__what span,
.upstrip[data-kind="missed"] .upstrip__what span,
.upstrip[data-kind="off"] .upstrip__what span,
.upstrip[data-kind="undeleted"] .upstrip__what span {
	color: var(--pink);
}
/* The words said at the head of the card the strip led to (upload.js, tell): its ways on
   stand under them, on the left, at every width. The card comes up where the strip stood,
   or a little higher where something over it went (the way back to Мои копии), and the
   right of its head is where "Open" was: nothing to press comes there. */
.filebox > .msg .msg__text {
	flex-basis: 100%;
}
.studio-layout,
.work,
.side {
	display: grid;
	gap: 20px;
	align-content: start;
}
.studio-layout > *,
.work > *,
.side > * {
	min-width: 0;
}

/* ---------- a job ---------- */
/* The state stands alone at the top of the card. Nothing to press shares its line: the
   corner of a card is where the strip's "Open" stood a moment before the card came up. */
.job__top {
	display: flex;
}
/* A job's own word, under its state: the server cannot be asked about it, or a delete of
   its files failed. It is held under the site's header while its card is scrolled, so it is
   on the screen with its ways on for as long as any of the card is. When the strip is out
   too, it is held under the strip: the strip has one height, and one more with its meter,
   for the word to stand under (--strip, the strip's place and height and a gap). */
.job__word {
	position: sticky;
	top: var(--strip, calc(var(--bar, 64px) + 12px));
	z-index: 3;
	background: color-mix(in srgb, var(--violet) 12%, var(--s2));
	box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--deep) 92%, transparent);
}
.job__word.msg--error {
	background: color-mix(in srgb, var(--pink) 12%, var(--s2));
}
.upstrip {
	box-sizing: border-box;
	height: 70px;
}
.upstrip:has(.upmeter:not([hidden])) {
	height: 84px;
}
.work:has(> .upstrip:not([hidden])) {
	--strip: calc(var(--bar, 64px) + 94px);
}
.work:has(> .upstrip:not([hidden]) .upmeter:not([hidden])) {
	--strip: calc(var(--bar, 64px) + 108px);
}
.job__head {
	display: grid;
	gap: 6px;
}
.job__head .h3,
.job__line {
	overflow-wrap: anywhere;
}
.job__line,
.job__note {
	color: var(--muted);
}
/* The file's name, then what was asked of it, with a dot between them. Where the two do
   not fit one line the second goes under the first, and the dot stays out of sight: every
   piece carries its dot on the left, and the one that begins a line has it cut off. */
.job__about {
	display: flex;
	flex-wrap: wrap;
	column-gap: 16px;
	overflow: hidden;
}
.job__about span {
	position: relative;
	min-width: 0;
	margin-left: -16px;
	padding-left: 16px;
}
.job__about span::before {
	content: "·";
	position: absolute;
	left: 5px;
}
.job__what {
	white-space: nowrap;
}
.job__ledger {
	font: 500 14px / 20px var(--ff-m);
}
.upbox {
	display: grid;
	gap: 8px;
}
.upbox__sent {
	color: var(--muted);
	font: 500 12px / 16px var(--ff-m);
	font-variant-numeric: tabular-nums;
}
.upbox .text-button {
	justify-self: start;
	margin-bottom: -8px;
}
.upmeter {
	appearance: none;
	display: block;
	width: 100%;
	height: 8px;
	overflow: hidden;
	border: 0;
	border-radius: 8px;
	background: color-mix(in srgb, var(--text) 7%, transparent);
}
.upmeter::-webkit-progress-bar {
	background: transparent;
}
.upmeter::-webkit-progress-value {
	border-radius: 8px;
	background: var(--grad);
}
.upmeter::-moz-progress-bar {
	border-radius: 8px;
	background: var(--grad);
}
/* one piece per copy: made, being made, waiting */
.segs {
	display: flex;
	gap: 6px;
}
.segs i {
	flex: 1;
	height: 8px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--text) 7%, transparent);
}
.segs .is-ready {
	background: var(--grad);
}
.segs .is-making {
	background: color-mix(in srgb, var(--violet) 60%, transparent);
	animation: studio-pulse 1.4s ease-in-out infinite;
}
@keyframes studio-pulse {
	50% {
		opacity: 0.4;
	}
}
.files {
	display: grid;
	border-top: 1px solid var(--line);
}
.files li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 2px 16px;
	min-height: 64px;
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
}
.file__name {
	font-weight: 600;
}
.file__meta {
	grid-row: 2;
	color: var(--muted);
	font: 500 12px / 16px var(--ff-m);
}
.files .btn {
	grid-column: 2;
	grid-row: 1 / span 2;
}
.file--waiting .file__name {
	color: var(--muted);
}
.file--making .file__meta {
	color: var(--cyan);
}
.keep {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 20px;
}
.changed summary {
	width: fit-content;
	min-height: 44px;
	padding: 10px 0;
	color: var(--muted);
	cursor: pointer;
	transition: color 0.2s;
}
.changed summary:hover {
	color: var(--text);
}
.changed ul {
	display: grid;
	gap: 6px;
	padding-bottom: 4px;
	color: var(--muted);
	font-size: 14px;
	line-height: 20px;
}

/* ---------- the three steps of a first visit ---------- */
.acct .side__card {
	gap: 4px;
}
.side__card .incl__h {
	margin: 0 0 12px;
}
.side .steps li {
	padding: 14px 0;
}
.side .steps li:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}
.side .steps .n {
	grid-row: auto;
	padding-top: 4px;
}
.side .steps p {
	max-width: none;
}

@media (prefers-reduced-motion: reduce) {
	.segs .is-making {
		animation: none;
	}
}

@media (min-width: 720px) {
	.upstrip {
		height: 76px;
		padding: 14px 20px;
	}
	.upstrip:has(.upmeter:not([hidden])) {
		height: 90px;
	}
	.work:has(> .upstrip:not([hidden])) {
		--strip: calc(var(--bar, 64px) + 100px);
	}
	.work:has(> .upstrip:not([hidden]) .upmeter:not([hidden])) {
		--strip: calc(var(--bar, 64px) + 114px);
	}
}

/* the state of a job in a word, as a pill; and the clock of its files, the row of its ways */
.jobstate {
	align-self: flex-start;
	padding: 4px 10px;
	border-radius: 99px;
	background: color-mix(in srgb, var(--violet) 18%, transparent);
	color: var(--muted);
	font: 600 12px / 16px var(--ff-m);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.jobstate--done {
	background: color-mix(in srgb, var(--cyan) 14%, transparent);
	color: var(--cyan);
}
.jobstate--failed,
.jobstate--partial {
	background: color-mix(in srgb, var(--pink) 14%, transparent);
	color: var(--pink);
}
.job__clock {
	color: var(--cyan);
	font: 600 16px / 24px var(--ff-m);
	font-variant-numeric: tabular-nums;
}
.job__actions {
	display: grid;
	gap: 12px;
}
@media (min-width: 720px) {
	.job__actions {
		display: flex;
		flex-wrap: wrap;
	}
}

/* With nothing beside the work (any visit but the first, change account-app) the work has the
   width of the page. */
.studio-layout--alone > .side {
	display: none;
}
@media (min-width: 1000px) {
	.studio-layout.studio-layout--alone {
		grid-template-columns: minmax(0, 1fr);
	}
}
