/**
 * Host-only task strip (P136 #0l, reshaped 2026-09-24): slim, mobile-first entry bar rendered by
 * inc/wi-host-task-bar.php. It sits on the bottom edge so it never covers the page headline, form,
 * or player, and now carries TWO horizontally scrollable pill rows ("On this page" / "Your next
 * step") that feed the Mini agent. Own namespace (wi-host-task-bar*) so it never collides with
 * registration/grid/room CSS.
 *
 * Collapsed state is a small toggle icon near the Mini agent's FAB (its own element, #wi-host-task-
 * bar-toggle) — the bar itself keeps its fixed bottom geometry unchanged.
 */
.wi-host-task-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: var( --wi-z-host-bar, 9000 );
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	padding: 8px 10px;
	background: #1d2327;
	color: #f0f0f1;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.3;
	box-shadow: 0 -2px 10px rgba( 0, 0, 0, 0.2 );
	box-sizing: border-box;
}

/* When the Mini agent is on the screen its FAB floats bottom-right over the bar; reserve that
   corner so the last pill and the collapse button never hide underneath it. */
body:has( #wi-fea-fab ) .wi-host-task-bar {
	padding-right: 88px;
}

.wi-host-task-bar[hidden] {
	display: none;
}

.wi-host-task-bar__rows {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 auto;
	min-width: 0;
}

.wi-host-task-bar__row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.wi-host-task-bar__legend {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.72;
	white-space: nowrap;
}

.wi-host-task-bar__pills {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wi-host-task-bar__item {
	flex: 0 0 auto;
}

.wi-host-task-bar__pill {
	display: inline-block;
	white-space: nowrap;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.14 );
	border: 1px solid transparent;
	color: #f0f0f1;
	text-decoration: none;
}

.wi-host-task-bar__pill:hover,
.wi-host-task-bar__pill:focus {
	background: rgba( 255, 255, 255, 0.26 );
	color: #ffffff;
}

/* Briefing / emails task: the recommended next step, so it reads green-first, not as a warning. */
.wi-host-task-bar__pill.is-briefing {
	background: rgba( 26, 127, 55, 0.34 );
	border-color: rgba( 26, 127, 55, 0.7 );
}

.wi-host-task-bar__collapse {
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: #f0f0f1;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	padding: 6px 8px;
}

.wi-host-task-bar__collapse:hover,
.wi-host-task-bar__collapse:focus {
	color: #ffffff;
}

/* Collapsed stand-in: a small round icon by the Mini agent's FAB that brings the pills back. */
.wi-host-task-bar-toggle {
	position: fixed;
	right: 84px;
	bottom: 20px;
	z-index: var( --wi-z-host-bar-toggle, 999905 );
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: #1d2327;
	color: #f0f0f1;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.22 );
	box-sizing: border-box;
}

.wi-host-task-bar-toggle[hidden] {
	display: none;
}

.wi-host-task-bar-toggle:hover,
.wi-host-task-bar-toggle:focus {
	background: #2c3338;
	color: #ffffff;
}

/* 100ms room: the FAB is lifted above the iframe controls (see wi-frontend-edit-agent.css), so the
   toggle follows it up rather than sitting on the video bar. */
body:has( #wi-hms-root ) .wi-host-task-bar-toggle {
	bottom: 212px;
}

/* Collapsed sidebar handle moves the FAB left; the toggle steps left with it. */
body:has( .sidebar-toggle-container.showOnVideo ) .wi-host-task-bar-toggle {
	right: 140px;
}

/* Wide screens: the two rows sit side by side (each scrolls on its own). Narrow screens: stacked,
   one after the other — the mobile-first default above. */
@media ( min-width: 782px ) {
	.wi-host-task-bar__rows {
		flex-direction: row;
		align-items: center;
	}
	.wi-host-task-bar__row {
		flex: 1 1 0;
	}
}

@media ( max-width: 480px ) {
	.wi-host-task-bar {
		font-size: 12px;
		padding: 6px 8px;
	}
	.wi-host-task-bar__legend {
		font-size: 10px;
	}
}
