.root {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	grid-template-areas:
		'header'
		'main'
		'footer';
	height: 100%;
	width: 100%;
	background-color: #000;
	color: var(--voice-text-strong);
	position: relative;
	overflow: hidden;
	--voice-hud-opacity: 0;
	--voice-hud-pointer-events: none;
	--voice-hud-transition-duration: 0ms;
}

.root.pointerActive {
	--voice-hud-opacity: 1;
	--voice-hud-pointer-events: auto;
	--voice-hud-transition-duration: 180ms;
}

/* ── Header ─────────────────────────────────────────────────── */

.voiceHeader {
	grid-area: header;
	position: relative;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	opacity: var(--voice-hud-opacity);
	pointer-events: var(--voice-hud-pointer-events);
	transition: opacity var(--voice-hud-transition-duration) cubic-bezier(0.2, 0, 0, 1);
}

.voiceHeader::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--voice-header-gradient);
	pointer-events: none;
	z-index: -1;
}

.headerLeftSection,
.headerRightSection {
	display: flex;
	align-items: center;
	gap: 12px;
}

.channelInfoContainer {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--voice-text-strong);
}

.channelIcon {
	color: var(--voice-text-muted);
}

.channelName {
	font-size: 0.9375rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.headerButton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 9999px;
	background: var(--voice-overlay-light);
	color: var(--voice-text-strong);
	border: none;
	cursor: pointer;
	transition: background-color 150ms;
}

.headerButton:hover {
	background: var(--voice-overlay-light-strong);
}

/* ── Main content ────────────────────────────────────────────── */

.mainContent {
	grid-area: main;
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
}

/* ── Control bar container ───────────────────────────────────── */

.controlBarContainer {
	grid-area: footer;
	position: relative;
	z-index: 30;
	display: flex;
	justify-content: center;
	padding: 28px 24px calc(20px + env(safe-area-inset-bottom, 0px));
	pointer-events: none;
	opacity: var(--voice-hud-opacity);
	transition: opacity var(--voice-hud-transition-duration) cubic-bezier(0.2, 0, 0, 1);
}

.controlBarContainer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 64px;
	background: var(--voice-footer-gradient);
	pointer-events: none;
	transform: translateY(-100%);
}

.controlBarContainer > * {
	pointer-events: auto;
}

/* ── Stats overlay ───────────────────────────────────────────── */

.statsOverlay {
	position: absolute;
	top: 64px;
	right: 18px;
	z-index: 40;
	background: var(--voice-overlay-strong);
	color: var(--voice-text-strong);
	padding: 12px 14px;
	border-radius: 8px;
	min-width: 180px;
	font-size: 0.8125rem;
	box-shadow: 0 8px 24px var(--voice-shadow-strong);
}

.statsHeader {
	font-weight: 700;
	margin-bottom: 6px;
}

.statsRow {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 2px 0;
}
