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

.container {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #000;
	overflow: hidden;
	touch-action: manipulation;
}

.video {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hudOverlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	z-index: 2;
	pointer-events: none;
}

.topBar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	padding-top: calc(12px + env(safe-area-inset-top, 0px));
	pointer-events: auto;
}

.topBarButton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: var(--radius-full);
	background-color: rgba(0, 0, 0, 0.5);
	color: #fff;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.topBarButton:hover {
	background-color: rgba(0, 0, 0, 0.7);
}

.bottomArea {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0 16px 16px;
	padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	pointer-events: auto;
}

.muteButton {
	align-self: flex-end;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: var(--radius-full);
	background-color: rgba(0, 0, 0, 0.5);
	color: #fff;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.muteButton:hover {
	background-color: rgba(0, 0, 0, 0.7);
}

.controlsBar {
	display: flex;
	align-items: center;
	gap: 12px;
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: var(--radius-lg);
	padding: 8px 12px;
}

.playPauseButton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: var(--radius-full);
	background: transparent;
	color: #fff;
	cursor: pointer;
	flex-shrink: 0;
}

.progressBarWrapper {
	flex: 1;
	display: flex;
	align-items: center;
	height: 24px;
	cursor: pointer;
}

.progressTrack {
	position: relative;
	width: 100%;
	height: 4px;
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 2px;
	overflow: hidden;
}

.progressFill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background-color: #fff;
	border-radius: 2px;
	transition: width 100ms linear;
}

.timeDisplay {
	font-size: 12px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: rgba(255, 255, 255, 0.9);
	white-space: nowrap;
	flex-shrink: 0;
}

.tapSurface {
	position: absolute;
	inset: 0;
	z-index: 1;
}
