/*
 * Seasonal Theme Engine — shared components (banner, lights, snow, preview pill).
 * Only loaded while a seasonal theme is effective. Colors come from the active
 * theme's tokens (--ste-*), with neutral fallbacks.
 */

/* ---------- Announcement banner ---------- */
.ste-top {
	position: relative;
	z-index: 100; /* above the overlaid header (Aine: 99), below menu overlays and modals (997+) */
}

.ste-banner {
	background: var(--ste-banner-bg, #1f2937);
	color: var(--ste-banner-text, #ffffff);
	text-align: center;
}

.ste-banner__text {
	margin: 0 auto;
	max-width: 1200px;
	padding: 9px 16px;
	font-size: 14px;
	line-height: 1.45;
	font-weight: 500;
	letter-spacing: .01em;
	color: inherit;
}

.ste-banner__link {
	color: var(--ste-banner-link, currentColor);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.ste-banner__link:hover,
.ste-banner__link:focus-visible {
	color: var(--ste-banner-text, #ffffff);
}

.ste-banner__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------- String of lights (hangs over the header, takes no layout space) ---------- */
.ste-lights {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 22px;
	pointer-events: none;
	overflow: hidden;
	/* wire */
	background:
		radial-gradient(60px 14px at 30px -6px, transparent 11px, var(--ste-wire, rgba(0, 0, 0, .55)) 12px, transparent 13.5px) 0 0 / 60px 22px repeat-x;
}

.ste-lights::before,
.ste-lights::after {
	content: "";
	position: absolute;
	inset: 0;
	/* bulbs: four colors across a 240px repeat, sitting on the wire's low points */
	background:
		radial-gradient(4px 6px at 30px 12px, var(--ste-light-1, #e53935) 92%, transparent 100%) 0 0 / 240px 22px repeat-x,
		radial-gradient(4px 6px at 90px 12px, var(--ste-light-2, #fdd835) 92%, transparent 100%) 0 0 / 240px 22px repeat-x,
		radial-gradient(4px 6px at 150px 12px, var(--ste-light-3, #43a047) 92%, transparent 100%) 0 0 / 240px 22px repeat-x,
		radial-gradient(4px 6px at 210px 12px, var(--ste-light-4, #ffffff) 92%, transparent 100%) 0 0 / 240px 22px repeat-x;
}

.ste-lights::after {
	/* soft glow layer that twinkles */
	filter: blur(4px);
	opacity: .7;
}

.ste-motion .ste-lights::after {
	animation: ste-twinkle 3.2s ease-in-out infinite alternate;
}

@keyframes ste-twinkle {
	from { opacity: .25; }
	to   { opacity: .8; }
}

/* ---------- Snow (fixed, decorative, never intercepts input) ---------- */
.ste-snow {
	position: fixed;
	inset: 0;
	z-index: 996; /* below the theme's menu overlay (997), chat widget and popups */
	pointer-events: none;
	overflow: hidden;
	contain: strict;
}

.ste-snow span {
	position: absolute;
	--ste-tile: 380px;
	/* one tile taller than the viewport so moving down exactly one tile loops seamlessly */
	inset: calc(-1 * var(--ste-tile)) 0 0 0;
	background-image:
		radial-gradient(2.5px 2.5px at 40px 60px, var(--ste-snow, #fff) 60%, transparent 100%),
		radial-gradient(2px 2px at 180px 140px, var(--ste-snow, #fff) 60%, transparent 100%),
		radial-gradient(3px 3px at 300px 40px, var(--ste-snow, #fff) 60%, transparent 100%),
		radial-gradient(2px 2px at 110px 260px, var(--ste-snow, #fff) 60%, transparent 100%),
		radial-gradient(2.5px 2.5px at 250px 330px, var(--ste-snow, #fff) 60%, transparent 100%);
	background-size: 360px var(--ste-tile);
	opacity: .55;
	filter: drop-shadow(0 0 1px var(--ste-snow-shadow, rgba(20, 50, 80, .35)));
}

.ste-snow span + span {
	--ste-tile: 460px;
	background-size: 520px var(--ste-tile);
	background-position: 130px 90px;
	opacity: .35;
}

.ste-motion .ste-snow span {
	animation: ste-snowfall 14s linear infinite;
	will-change: transform;
}

.ste-motion .ste-snow span + span {
	animation-duration: 22s;
}

@keyframes ste-snowfall {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(0, var(--ste-tile), 0); }
}

/* ---------- Preview indicator (only rendered during an admin preview) ---------- */
.ste-preview-pill {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 100000;
	max-width: calc(100vw - 32px);
	padding: 10px 14px;
	border-radius: 8px;
	background: #1d2327;
	color: #f0f0f1;
	font: 500 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}

.ste-preview-pill a {
	color: #72aee6;
	font-weight: 600;
	margin-left: 6px;
}

.ste-preview-pill a:focus-visible {
	outline: 2px solid #72aee6;
	outline-offset: 2px;
}

/* ---------- Reduced motion: keep everything visible, stop movement ---------- */
@media (prefers-reduced-motion: reduce) {
	.ste-theme .ste-snow span,
	.ste-theme .ste-lights::after {
		animation: none !important; /* user preference must win over theme motion */
	}
}

@media (max-width: 767px) {
	.ste-banner__text {
		font-size: 13px;
		padding: 8px 12px;
	}
	.ste-snow span + span {
		display: none; /* lighter on small screens */
	}
}

@media print {
	.ste-top,
	.ste-snow,
	.ste-preview-pill {
		display: none;
	}
}
