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

.root {
	position: relative;
	width: min(1040px, calc(100vw - 48px));
	height: min(780px, calc(100svh - 48px));
	max-height: calc(100svh - 48px);
	display: flex;
	flex-direction: column;
	border-radius: clamp(12px, 1.1vw, 16px);
	border: 1px solid var(--background-header-secondary);
	background: var(--background-secondary);
	box-shadow:
		0 0 0 1px hsla(223, 7%, 20%, 0.08),
		0 16px 40px hsla(0, 0%, 0%, 0.16);
	overflow: hidden;
	pointer-events: all;
}

.background {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-color: var(--brand-primary);
}

.splashImage {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center bottom;
	pointer-events: none;
}

.patternImage {
	position: absolute;
	inset: 0;
	background-size: 260px 260px;
	background-repeat: repeat;
	opacity: 0.06;
	filter: invert(1);
	background-color: transparent;
	pointer-events: none;
}

.cardHost {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	pointer-events: all;
}

.card {
	width: min(560px, calc(100% - 48px));
	max-height: calc(100% - 24px);
	display: flex;
	flex-direction: column;
	border-radius: 18px;
	border: 1px solid color-mix(in srgb, var(--background-modifier-accent) 70%, transparent);
	background: color-mix(in srgb, var(--background-secondary) 86%, transparent);
	backdrop-filter: blur(18px);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	overflow: auto;
	pointer-events: all;
}

.cardInner {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: clamp(20px, 2.6vw, 30px);
	min-height: 0;
}

.stateHost {
	min-height: 360px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(20px, 2.6vw, 30px);
}

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

.disabledText {
	margin: 0;
	text-align: center;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--text-tertiary);
}

.packDescriptionText {
	margin: 0;
	font-size: 0.9rem;
	color: var(--text-secondary);
	line-height: 1.4;
}

.packMetaRow {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	margin: 0.5rem 0;
}

.packMetaText {
	font-size: 0.78rem;
	color: var(--text-tertiary);
}

.packNote {
	margin: 0;
	font-size: 0.8rem;
	color: var(--text-tertiary-secondary);
}

@media screen and (max-width: 480px) {
	.root {
		width: calc(100vw - 24px);
		height: min(780px, calc(100svh - 24px));
		max-height: calc(100svh - 24px);
	}

	.cardHost {
		padding: 12px;
	}

	.card {
		width: calc(100% - 16px);
		max-height: calc(100% - 12px);
	}
}
