/*
 * SFX Core — Loader Page Styles
 * Loaded only on the front-page loader (tracking-loader.php).
 * Design tokens match the master checkout design system.
 */

/* ── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design tokens ────────────────────────────────────────────────────────── */
:root {
	--pink:        #e967e8;
	--pink-dark:   #d94bdd;
	--text:        #1e1d24;
	--muted:       #777684;
	--border:      #ececf1;
	--shadow:      0 8px 25px rgba(26, 26, 34, 0.06);
}

/* ── Reset / base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.sfx-loader-page {
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	background: #ffffff;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--text);
}

/* ── Container ────────────────────────────────────────────────────────────── */
.sfx-loader-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	padding: 48px 24px;
	max-width: 420px;
	width: 100%;
	text-align: center;
}

/* ── Brand / logo ─────────────────────────────────────────────────────────── */
.sfx-loader-logo {
	max-width: 160px;
	height: auto;
}

.sfx-loader-wordmark {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.04em;
	color: var(--text);
	line-height: 1;
}

.sfx-loader-check {
	color: var(--pink);
	font-size: 20px;
	vertical-align: super;
}

/* ── Headline ──────────────────────────────────────────────────────────────── */
.sfx-loader-headline {
	font-size: 18px;
	font-weight: 700;
	color: var(--text);
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.sfx-loader-sub {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.5;
	max-width: 320px;
}

/* ── Progress bar ─────────────────────────────────────────────────────────── */
.sfx-progress {
	width: 100%;
	max-width: 320px;
	height: 4px;
	background: #f0f0f5;
	border-radius: 99px;
	overflow: hidden;
}

.sfx-progress-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--pink) 0%, var(--pink-dark) 100%);
	border-radius: 99px;
	transition: none; /* JS drives the width — no CSS transition needed */
}

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.sfx-spinner {
	width: 44px;
	height: 44px;
}

.sfx-spinner-ring {
	width: 44px;
	height: 44px;
	border: 3px solid #f0f0f5;
	border-top-color: var(--pink);
	border-radius: 50%;
	animation: sfx-spin 0.8s linear infinite;
}

@keyframes sfx-spin {
	to { transform: rotate(360deg); }
}

/* ── Dots ──────────────────────────────────────────────────────────────────── */
.sfx-dots {
	display: flex;
	gap: 8px;
	align-items: center;
}

.sfx-dots span {
	display: inline-block;
	width: 10px;
	height: 10px;
	background: var(--pink);
	border-radius: 50%;
	animation: sfx-dot-pulse 1.2s ease-in-out infinite;
}

.sfx-dots span:nth-child(2) { animation-delay: 0.2s; }
.sfx-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes sfx-dot-pulse {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
	40%           { transform: scale(1);   opacity: 1;   }
}

/* ── Fade pulse ───────────────────────────────────────────────────────────── */
.sfx-fade-pulse {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--pink);
	animation: sfx-fade 1.2s ease-in-out infinite;
}

@keyframes sfx-fade {
	0%, 100% { opacity: 0.3; transform: scale(0.9); }
	50%       { opacity: 1;   transform: scale(1.05); }
}

/* ── Manual fallback button ───────────────────────────────────────────────── */
.sfx-loader-manual-btn {
	display: inline-block;
	padding: 12px 28px;
	background: linear-gradient(90deg, #f175ef 0%, #d96be6 100%);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(223, 82, 224, 0.28);
	transition: opacity 0.15s;
	margin-top: 4px;
}

.sfx-loader-manual-btn:hover { opacity: 0.88; }

/* ── No-script fallback text ──────────────────────────────────────────────── */
.sfx-loader-noscript {
	font-size: 13px;
	color: var(--muted);
	margin-top: 8px;
}

.sfx-loader-noscript a {
	color: var(--pink);
	font-weight: 600;
	text-decoration: none;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.sfx-loader-wrap   { padding: 36px 20px; gap: 16px; }
	.sfx-loader-headline { font-size: 16px; }
}
