.container {
	position: fixed;
	top: 0;
	left: 0;
	z-index: calc(var(--z-index-modal, 10000) + 1);
	border-radius: 12px;
	overflow: hidden;
	box-shadow:
		0 8px 32px var(--voice-shadow-strong),
		0 2px 8px var(--voice-shadow-soft);
	cursor: grab;
	user-select: none;
	touch-action: none;
	background-color: var(--voice-surface-2);
	will-change: transform;
}

.container:active {
	cursor: grabbing;
}

.videoWrapper {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: inherit;
}

.videoWrapper video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background-color: var(--voice-surface-0);
	border-radius: inherit;
	display: block;
}

.screenShareVideo {
	object-fit: contain;
}

/* ── Top gradient + return-to-call button ───────────────────── */

.headerGradient {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 48px;
	background: linear-gradient(to bottom, var(--voice-overlay-strong) 0%, transparent 100%);
	display: flex;
	align-items: flex-start;
	padding: 8px 10px;
	pointer-events: auto;
	z-index: 3;
}

.returnToCallButton {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--voice-text-strong);
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	font-size: 0.75rem;
	font-weight: 600;
	border-bottom: 1px solid transparent;
	transition: border-color 150ms;
}

.returnToCallButton:hover {
	border-bottom-color: currentColor;
}

/* ── Bottom gradient + streamer name ───────────────────────── */

.footerGradient {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 48px;
	background: linear-gradient(to top, var(--voice-overlay-strong) 0%, transparent 100%);
	display: flex;
	align-items: flex-end;
	padding: 8px 10px;
	pointer-events: none;
	z-index: 3;
}

.streamerName {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--voice-text-strong);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Resize handles ─────────────────────────────────────────── */

.resizeHandleTop,
.resizeHandleBottom,
.resizeHandleLeft,
.resizeHandleRight,
.resizeHandleTopLeft,
.resizeHandleTopRight,
.resizeHandleBottomLeft,
.resizeHandleBottomRight {
	position: absolute;
	border: none;
	background: transparent;
	z-index: 4;
	pointer-events: auto;
	padding: 0;
}

.resizeHandleTop {
	top: 0;
	left: 16px;
	right: 16px;
	height: 8px;
	cursor: n-resize;
}

.resizeHandleBottom {
	bottom: 0;
	left: 16px;
	right: 16px;
	height: 8px;
	cursor: s-resize;
}

.resizeHandleLeft {
	top: 16px;
	left: 0;
	bottom: 16px;
	width: 8px;
	cursor: w-resize;
}

.resizeHandleRight {
	top: 16px;
	right: 0;
	bottom: 16px;
	width: 8px;
	cursor: e-resize;
}

.resizeHandleTopLeft {
	top: 0;
	left: 0;
	width: 16px;
	height: 16px;
	cursor: nw-resize;
}

.resizeHandleTopRight {
	top: 0;
	right: 0;
	width: 16px;
	height: 16px;
	cursor: ne-resize;
}

.resizeHandleBottomLeft {
	bottom: 0;
	left: 0;
	width: 16px;
	height: 16px;
	cursor: sw-resize;
}

.resizeHandleBottomRight {
	bottom: 0;
	right: 0;
	width: 16px;
	height: 16px;
	cursor: se-resize;
}

.pipContent {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	padding: 12px 14px;
	gap: 4px;
}

.pipLabel {
	font-size: 11px;
	font-weight: 600;
	color: var(--text-tertiary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.pipChannel {
	font-size: 15px;
	font-weight: 700;
	color: var(--text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pipActions {
	display: flex;
	gap: 8px;
	margin-top: 6px;
}

.pipPrimary {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	border: none;
	border-radius: 4px;
	background-color: var(--brand-primary, #4641d9);
	color: #fff;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.pipPrimary:hover {
	filter: brightness(1.1);
}

.pipDanger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 4px;
	background-color: var(--status-danger, #ed4245);
	color: #fff;
	cursor: pointer;
}

.pipDanger:hover {
	filter: brightness(1.1);
}
