/*
 * Christmas profile. Loaded only while Christmas is active.
 *
 * The theme and custom blocks read their brand colors from these custom properties, so one
 * rule recolors buttons, the red-component-image block and everything else that used the purple.
 * Available: --stancatos-purple, --stancatos-red, --stancatos-green, --stancatos-yellow,
 *            --stancatos-tan, --stancatos-beige, --stancatos-black, --stancatos-brown
 *
 * Pieces (delete a block to drop that touch):
 *   1. Colors          2. Wrapping paper (header + footer)   3. String lights under the header
 *   4. Snowfall canvas (christmas.js)   5. Popup accents
 */

/* 1. Colors: purple becomes Christmas green. Red and gold are already festive and stay. */
:root {
	--stancatos-purple: #1F5E3B;
}

/* 2. Wrapping paper: a transparent gold-snowflake tile over the theme's red.
      Images uploaded under Settings > Season: Christmas override this (inline CSS, same selectors). */
body.season-christmas #navbar-container,
body.season-christmas .footerwrapper {
	background-image: url(wrapping-paper.svg);
	background-repeat: repeat;
	background-size: 96px 96px;
}

/* 3. String lights hanging from the header's bottom edge. */
body.season-christmas #navbar-container::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -12px;
	height: 14px;
	pointer-events: none;
	background:
		linear-gradient(rgba(43, 38, 26, 0.85), rgba(43, 38, 26, 0.85)) 0 0 / 100% 2px no-repeat,
		radial-gradient(circle at 10px 8px, #FF6B6B 0 2.6px, rgba(255, 107, 107, 0.45) 3.6px, transparent 6px) 0 0 / 80px 14px repeat-x,
		radial-gradient(circle at 30px 8px, #FFD166 0 2.6px, rgba(255, 209, 102, 0.45) 3.6px, transparent 6px) 0 0 / 80px 14px repeat-x,
		radial-gradient(circle at 50px 8px, #6EE7A0 0 2.6px, rgba(110, 231, 160, 0.45) 3.6px, transparent 6px) 0 0 / 80px 14px repeat-x,
		radial-gradient(circle at 70px 8px, #7CC4FF 0 2.6px, rgba(124, 196, 255, 0.45) 3.6px, transparent 6px) 0 0 / 80px 14px repeat-x;
	animation: stancatos-xmas-twinkle 2.4s ease-in-out infinite alternate;
}

@keyframes stancatos-xmas-twinkle {
	from { opacity: 0.65; }
	to   { opacity: 1; }
}

/* 4. Snowfall canvas (created by christmas.js). Sits above the page, below the popup. */
.stancatos-christmas-snow {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9990;
}

/* 5. Popup: wrapping-paper band across the top instead of the plain border. */
body.season-christmas .stancatos-season-popup-dialog {
	border-top: 0;
}

body.season-christmas .stancatos-season-popup-dialog::before {
	content: '';
	display: block;
	height: 16px;
	background: var(--stancatos-red, #AD101D) url(wrapping-paper.svg) repeat 0 0 / 96px 96px;
}

@media (prefers-reduced-motion: reduce) {
	body.season-christmas #navbar-container::after {
		animation: none;
	}
}
