/*
 * Copyright (C) 2026 Fluxer Contributors
 *
 * This file is part of Fluxer.
 *
 * Fluxer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Fluxer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
 */

.cursorPointer {
	cursor: pointer;
}

.watchStreamOverlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgb(0 0 0 / 0.7);
	z-index: 10;
	pointer-events: auto;
	border-radius: var(--radius-lg);
}

.watchStreamButton {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	border-radius: 0.375rem;
	background-color: var(--status-danger);
	padding: 0.5rem 1rem;
	font-weight: 600;
	color: white;
	box-shadow: var(--shadow-sm);
	cursor: pointer;
	pointer-events: auto;
}

.watchStreamButton:hover {
	background-color: var(--status-danger);
}

.watchStreamButtonIcon {
	height: 1rem;
	width: 1rem;
}

.liveBadge {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	border-radius: 0.25rem;
	background-color: var(--status-danger);
	padding: 0.125rem 0.5rem;
	font-weight: 700;
	color: white;
	font-size: 0.75rem;
	line-height: 1rem;
}

.avatarRing {
	border-radius: 9999px;
}

.avatarRingSpeaking {
	border-radius: 9999px;
	box-shadow: 0 0 0 2px var(--status-online);
}

.focusOverlay {
	position: absolute;
	inset: 0;
	border-radius: var(--radius-lg);
	background-color: rgb(0 0 0 / 0.65);
	z-index: 9;
	pointer-events: none;
}

.focusOverlayIcon {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	height: 1.5rem;
	width: 1.5rem;
	color: white;
	filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.5));
}

.videoDisabledOverlay {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgb(0 0 0 / 0.4);
}

.videoDisabledIcon {
	height: 1.5rem;
	width: 1.5rem;
	color: var(--status-danger);
}

.participantIcon {
	height: 1rem;
	width: 1rem;
	flex-shrink: 0;
}

.participantIconMuted {
	height: 1rem;
	width: 1rem;
	flex-shrink: 0;
	color: var(--text-primary-muted);
}

.participantIconRed {
	height: 1rem;
	width: 1rem;
	flex-shrink: 0;
	color: var(--status-danger);
}

.participantIconWhite {
	height: 1rem;
	width: 1rem;
	flex-shrink: 0;
	color: white;
}

.participantNameText {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 500;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: white;
}

.participantConnectionText {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: rgb(255 255 255 / 0.7);
	font-size: 0.75rem;
	line-height: 1rem;
}

.menuButton {
	cursor: pointer;
	transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menuButton:hover {
	background-color: rgb(0 0 0 / 0.9);
}

.menuButtonIcon {
	height: 1rem;
	width: 1rem;
}

.avatarFlexShrink {
	flex-shrink: 0;
}

.previewPopover {
	position: absolute;
	top: 0;
	right: -10rem;
	width: 9.5rem;
	height: 6rem;
	background: rgb(0 0 0 / 0.85);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 0.25rem;
	gap: 0.5rem;
	z-index: 25;
}

.previewImage {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--radius-sm);
}

.previewFallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: rgb(255 255 255 / 0.7);
	font-size: 0.85rem;
	text-align: center;
	padding: 0.5rem;
}

.previewWatchButton {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.previewWatchButtonInner {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background-color: var(--status-danger);
	color: white;
	font-weight: 600;
	padding: 0.4rem 0.75rem;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
}

.selfStreamOverlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	pointer-events: none;
	border-radius: var(--radius-lg);
}

.selfStreamPreviewActive {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
}

.selfStreamPreviewPaused {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1.5rem;
	background-color: rgb(0 0 0 / 0.75);
	border-radius: var(--radius-lg);
	text-align: center;
}

.pausedIcon {
	height: 2rem;
	width: 2rem;
	color: var(--text-secondary);
}

.pausedText {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-primary);
}

.pausedSubtext {
	font-size: 0.75rem;
	color: var(--text-secondary);
}

.viewersContainer {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.375rem 0.5rem;
	background-color: rgb(0 0 0 / 0.7);
	border-radius: var(--radius-md);
	z-index: 10;
}

.viewersIcon {
	height: 1rem;
	width: 1rem;
	color: var(--text-secondary);
	flex-shrink: 0;
}

.viewersAvatars {
	display: flex;
	align-items: center;
	gap: -0.25rem;
}

.viewerAvatarWrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: -0.25rem;
	border-radius: 9999px;
	border: 2px solid rgb(0 0 0 / 0.7);
	cursor: pointer;
}

.viewerAvatarWrapper:first-child {
	margin-left: 0;
}

.viewerCountBadge {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	min-width: 24px;
	padding: 0 0.375rem;
	margin-left: -0.25rem;
	background-color: var(--background-tertiary);
	color: var(--text-secondary);
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 9999px;
	border: 2px solid rgb(0 0 0 / 0.7);
	cursor: pointer;
}
