/*
 * 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/>.
 */

.emptyState {
	display: flex;
	height: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	text-align: center;
}

.emptyStateIcon {
	margin-bottom: 1rem;
	height: 4rem;
	width: 4rem;
	color: var(--text-tertiary);
}

.emptyStateTitle {
	margin-bottom: 0.5rem;
	font-weight: 600;
	font-size: 1.25rem;
	line-height: 1.75rem;
	color: var(--text-primary);
}

.emptyStateDescription {
	max-width: 28rem;
	color: var(--text-tertiary);
}

.voiceCallContainer {
	position: relative;
	height: 100%;
	width: 100%;
}

.minimizeButton {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 50;
	display: flex;
	height: 2.5rem;
	width: 2.5rem;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-full);
	background-color: rgb(0 0 0 / 0.5);
	color: white;
	backdrop-filter: blur(8px);
	transition-property: color, background-color;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
	cursor: pointer;
}

.minimizeButton:hover {
	background-color: rgb(0 0 0 / 0.7);
}

.minimizeButtonIcon {
	height: 1.25rem;
	width: 1.25rem;
}

.callParticipantsRow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-content: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem;
	min-height: 6rem;
	max-height: 11.5rem;
	overflow-y: auto;
	background: linear-gradient(to bottom, rgb(0 0 0 / 0.58) 0%, rgb(0 0 0 / 0.18) 56%, transparent 100%);
}

.compactCallParticipantsLayout {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 0.5rem calc(5.75rem + env(safe-area-inset-bottom, 0px));
}

.compactCallParticipantsRow {
	width: min(100%, 42rem);
	max-height: none;
	overflow-y: visible;
}

.callParticipant {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px;
	border: none;
	background: transparent;
	cursor: context-menu;
	overflow: visible;
}

.callParticipantAvatar {
	position: relative;
	z-index: 2;
	border-radius: 9999px;
	will-change: transform;
}

.callParticipantRinging .callParticipantAvatar {
	filter: none;
}

.callParticipantRippleGroup {
	position: absolute;
	display: block;
	inset: 0;
	pointer-events: none;
	z-index: 1;
	transform-origin: center;
	will-change: transform, opacity;
}

.callParticipantRippleRing {
	position: absolute;
	display: block;
	inset: 0;
	margin: auto;
	border-radius: 9999px;
	background-color: rgb(170 170 170 / 0.1);
}

.callParticipantRippleRingOuter {
	width: var(--call-ripple-size-1);
	height: var(--call-ripple-size-1);
	background-color: rgb(140 140 140 / 0.08);
}

.callParticipantRippleRingMid {
	width: var(--call-ripple-size-2);
	height: var(--call-ripple-size-2);
	background-color: rgb(164 164 164 / 0.11);
}

.callParticipantRippleRingInner {
	width: var(--call-ripple-size-3);
	height: var(--call-ripple-size-3);
	background-color: rgb(188 188 188 / 0.14);
}

.callParticipantRippleRingCore {
	width: var(--call-ripple-size-4);
	height: var(--call-ripple-size-4);
	background-color: rgb(214 214 214 / 0.18);
}

.callBanner {
	position: relative;
	display: flex;
	flex-direction: column;
	background-color: #000;
	border-bottom: none;
	min-height: 0;
}

.callBannerBody {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1rem;
}

.callBannerResizable {
	height: 100%;
	min-height: 0;
}

.callControlBarSection {
	position: relative;
	display: flex;
	justify-content: center;
	padding: 0 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
	z-index: 2;
	pointer-events: none;
}

.callControlBarInner {
	position: relative;
	display: flex;
	width: 100%;
	justify-content: center;
	pointer-events: auto;
}

.callControls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.callControlButton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 56px;
	padding: 0 1.25rem;
	border-radius: 9999px;
	border: none;
	cursor: pointer;
	color: var(--text-primary);
	white-space: nowrap;
	font-size: 0.875rem;
	font-weight: 600;
	transition:
		background-color 150ms ease,
		color 150ms ease,
		opacity 150ms ease;
}

.callControlButton:disabled {
	cursor: not-allowed;
	opacity: 0.72;
}

.callControlButtonIcon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.callControlButtonLabel {
	display: inline-flex;
	align-items: center;
}

.callControlButtonPrimary {
	background-color: var(--voice-status-success-bg-solid);
	color: var(--voice-status-success);
}

.callControlButtonPrimary:hover:not(:disabled) {
	background-color: var(--voice-status-success-bg-strong-solid);
}

.callControlButtonDanger {
	background-color: var(--voice-status-danger-bg-solid);
	color: var(--voice-status-danger);
}

.callControlButtonDanger:hover:not(:disabled) {
	background-color: var(--voice-status-danger-bg-strong-solid);
}

.callControlButtonSecondary {
	background-color: var(--voice-surface-3);
	color: var(--text-primary);
}

.callControlButtonSecondary:hover:not(:disabled) {
	background-color: var(--voice-surface-4);
}

.callControlButtonSubmitting {
	animation: callControlButtonPulse 1.2s ease-in-out infinite;
}

@keyframes callControlButtonPulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.72;
	}
}

.callBannerMobile {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0 1rem 1rem;
	background-color: #000;
	border-bottom: none;
}

.callBannerMobileLabel {
	font-weight: 600;
	color: var(--text-primary);
	text-align: center;
}

.callControlsMobile {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.compactVoiceCallView {
	background-color: #000;
	width: 100%;
	border-radius: 0;
	overflow: hidden;
	min-height: 0;
}

.compactCallWrapper {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0;
	background-color: #000;
}

.compactCallWrapperResizing {
	user-select: none;
}

.compactCallResizeHandle {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: ns-resize;
	z-index: 2;
	touch-action: none;
}

.compactCallResizePill {
	width: 36px;
	height: 4px;
	border-radius: 9999px;
	background-color: rgb(255 255 255 / 0.75);
	transition: opacity 150ms ease;
}

.compactCallResizeHandle:hover .compactCallResizePill {
	opacity: 1;
}

.channelContainer {
	display: grid;
	grid-template-rows: auto 1fr;
	height: 100%;
	min-height: 0;
	width: 100%;
	min-width: 0;
	background-color: var(--background-secondary-lighter);
}

.channelLayout {
	display: grid;
	grid-template-columns: 1fr auto;
	height: 100%;
	min-height: 0;
	width: 100%;
	min-width: 0;
}
