/* Presenter controls owned by remote.js. Workshop previously supplied these
   rules; keep their reach and specificity while delivering them with the module. */
/* A row carries the screen's whole words, so it keeps the line breaks Mike
	wrote and grows to hold everything the screen says. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-presenter-target {
	flex: 1 0 100%;
	height: auto;
	justify-content: flex-start;
	/* The number and the words start on the same line, whether the screen is one
		line or six. Centred, a one-line row would float its words below its own
		number. */
	align-items: flex-start;
	white-space: pre-wrap;
	text-align: left;
	line-height: var(--lh-tight);
}

/* A thin line between one screen's words and the next, because a screen that
	runs to several lines otherwise runs into the one below it. It is the chip's
	own list divider (selector-chip.js, .cd-sb-listitem): a hairline in the border
	colour, and no new colour minted here. Between rows only, so nothing is drawn
	above the first row or below the last, and no row is boxed. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-presenter-target + .workshop-presenter-target {
	border-top: var(--b-hair) solid var(--border);
}

/* In present mode a row is the row AND its own push, side by side. The pair takes
	the full width of the narrow column exactly as a bare row does, the row takes
	everything the push does not, and the divider moves to the pair so a screen that
	runs to several lines still does not run into the one below it. */
:where(body.workshop-page) .workshop-presenter-chip .cd-sb-rowpair:not(.cd-sb-choice-pair) {
	flex: 1 0 100%;
}

:where(body.workshop-page) .workshop-presenter-chip .cd-sb-rowpair .workshop-presenter-target {
	flex: 1 1 auto;
}

:where(body.workshop-page) .workshop-presenter-chip .cd-sb-rowpair + .cd-sb-rowpair {
	border-top: var(--b-hair) solid var(--border);
}

/* Level with the FIRST line of the row's words, like the step number on the other
	side of them, so a six line screen does not float its own push down the middle
	of itself. The offset is the row's own top padding. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-presenter-row-push {
	margin-top: var(--s-1);
}

/* The step number is small dimmed furniture, the way the chip sets a row label
	apart from the words it heads (selector-chip.js, .cd-sb-listlabel). A step
	row already carries its words at --fg-soft, so the number takes --muted, the
	step below it in the same ladder, and no new colour is minted. It sits at the
	top of the row so it stays level with the first line of a screen that runs
	long, and it never shrinks or wraps, so the words keep the rest of the width.
	The gap that separates it from the words is the button's own. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-presenter-step {
	align-self: flex-start;
	flex: 0 0 auto;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: var(--t-xxs);
	line-height: var(--lh-tight);
	padding-top: var(--b-rule);
	text-align: right;
	min-width: var(--s-4);
}

/* The words take whatever the number leaves, and wrap inside it. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-presenter-target > span:not(.workshop-presenter-step) {
	flex: 1 1 auto;
	min-width: 0;
}

/* A live-only step with nobody driving the page: the engine is not playing it,
	so its words drop to --muted, the same step down the ladder the step number
	already takes. While a room drives the page it is a row like any other. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-presenter-target.workshop-step-unplayed > span {
	color: var(--muted);
}

/* The live link is one switch with one job, so it claims its own full row rather
	than sitting beside anything it could be mistaken for. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-live-link {
	flex: 1 0 100%;
}

/* The live session controls own the first ruled block of the bar. */
/* LEAD and PREVIEW are equal joined halves with one hairline at the join. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-lead-preview {
	flex: 1 0 50%;
}

:where(body.workshop-page) .workshop-presenter-chip .workshop-live-session-title + .workshop-lead-preview {
	border-radius: var(--r-md) 0 0 var(--r-md);
}

:where(body.workshop-page) .workshop-presenter-chip .workshop-lead-preview + .workshop-lead-preview {
	margin-left: calc(var(--b-rule) * -1);
	border-radius: 0 var(--r-md) var(--r-md) 0;
}

:where(body.workshop-page) .workshop-presenter-chip .workshop-free {
	flex: 1 0 50%;
}

:where(body.workshop-page) .workshop-presenter-chip .workshop-lead-preview + .workshop-free {
	border-radius: var(--r-md) 0 0 var(--r-md);
}

:where(body.workshop-page) .workshop-presenter-chip .workshop-free + .workshop-free {
	margin-left: calc(var(--b-rule) * -1);
	border-radius: 0 var(--r-md) var(--r-md) 0;
}

:where(body.workshop-page) .workshop-presenter-chip .workshop-free:disabled {
	opacity: 0.5;
	cursor: default;
}

/* This word belongs to the presenter screen, outside the bar. */
:where(body.workshop-page) .workshop-preview-word {
	position: absolute;
	left: 50%;
	bottom: var(--s-8);
	z-index: 2;
	transform: translateX(-50%);
	pointer-events: none;
	color: var(--fg);
	font-family: var(--font-mono);
	font-size: var(--t-sm);
	letter-spacing: var(--tracking-caps);
	opacity: 0.18;
}

:where(body.workshop-page) .workshop-preview-word[hidden] {
	display: none;
}

/* The extra dot is the session position, separate from Mike's selected row. */
:where(body.workshop-page) .workshop-presenter-chip .workshop-session-parked::before {
	content: '';
	flex: 0 0 var(--s-2);
	width: var(--s-2);
	height: var(--s-2);
	border-radius: var(--r-pill);
	background: var(--marker);
}

