/*
 * Seasonal theme — Christmas (redesign 19 Nov 2026; EC_SeasonalTheme + assets/js/themes/christmas.js).
 *
 * A polished winter version of Essential Comps: navy, teal and icy white. Frost is a faint sheen, settled snow is
 * a few soft drifts on real ledges, the tree stands in a drift, Santa crosses the homepage sky above the headline.
 * Every decoration is aria-hidden and pointer-events: none, and never covers navigation, prices, ticket selectors,
 * legal text, form fields or buttons. Checkout gets frost only — no falling snow, characters or moving lights.
 */

.ec-season--christmas {
	--xmas-ice: #eaf8ff;
	--xmas-glow: rgba(95, 224, 232, 0.35);
	--xmas-sky-band: 3.6rem; /* the night sky the sleigh crosses, above the homepage headline */
}

/* The engine's canvas (snow): above page backgrounds, below header menus / modals / toasts; never takes a click. */
.ec-season-canvas {
	position: fixed;
	inset: 0;
	z-index: 19; /* below the sticky header (20), menus / overlays (30), modals (40) and toasts (50) */
	pointer-events: none;
}

.ec-xmas,
.ec-xmas * {
	pointer-events: none !important;
	user-select: none;
}

/* ------------------------------------------------------------ frost: a faint cold sheen, no shapes */
.ec-season--christmas .ec-site-header {
	box-shadow: inset 0 -1px 0 rgba(234, 248, 255, 0.22), 0 8px 26px rgba(95, 224, 232, 0.07);
}

.ec-xmas-frost-edge {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -10px;
	height: 10px;
	background: linear-gradient(180deg, rgba(225, 244, 255, 0.16), rgba(225, 244, 255, 0));
}

.ec-season--christmas .ec-competition-card {
	box-shadow: 0 0 0 1px rgba(234, 248, 255, 0.07), 0 10px 26px rgba(4, 16, 32, 0.35);
}

.ec-season--christmas .ec-competition-card:hover,
.ec-season--christmas .ec-competition-card:focus-within {
	box-shadow: 0 0 0 1px rgba(234, 248, 255, 0.22), 0 0 26px rgba(95, 224, 232, 0.16), 0 12px 30px rgba(4, 16, 32, 0.4);
}

/* ------------------------------------------------------------ drifts on ledges */
.ec-xmas-drift {
	position: absolute;
	display: block;
	line-height: 0;
	filter: drop-shadow(0 2px 2px rgba(6, 20, 34, 0.35));
}

.ec-xmas-drift svg {
	display: block;
}

.ec-xmas-ledge--footer {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 0;
	z-index: 1;
}

.ec-xmas-ledge--footer .ec-xmas-drift {
	bottom: -1px; /* resting on the footer's top edge */
}

.ec-xmas-card-drifts {
	position: absolute;
	left: 0;
	top: 0;
	width: 0;
	height: 0;
	z-index: 5;
}

.ec-xmas-glint {
	fill: #ffffff;
	opacity: 0;
	animation: ec-xmas-glint 5.5s ease-in-out infinite;
	animation-delay: calc(var(--i) * -1.7s);
}

@keyframes ec-xmas-glint {
	0%, 82%, 100% { opacity: 0; }
	88% { opacity: 1; }
	93% { opacity: 0.2; }
}

/* ------------------------------------------------------------ the tree (stands in its own drift) */
.ec-xmas-tree {
	position: absolute;
	display: block;
	line-height: 0;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.32));
}

.ec-xmas-tree--hero {
	right: max(18px, 3vw);
	z-index: 2;
}

.ec-xmas-tree--header {
	right: 18px;
	bottom: 0;
	opacity: 0.92;
}

/* ------------------------------------------------------------ snowflakes that catch the light (19 Nov) */
/* The fallback page banner's seasonal icon (the homepage with no competitions to show): a small cluster where the
   banner tree stood. */
.ec-xmas-flakes--hero {
	position: absolute;
	right: max(18px, 3vw);
	bottom: 10px;
	width: 70px;
	height: 62px;
	z-index: 2;
}

.ec-xmas-flakes__f {
	position: absolute;
	display: block;
	line-height: 0;
	filter: drop-shadow(0 0 6px rgba(127, 227, 238, 0.35));
}

.ec-xmas-flakes__f svg {
	width: 100%;
	height: 100%;
	display: block;
}

.ec-xmas-flakes__f--a { right: 4px; top: 8px; width: 44px; height: 44px; }
.ec-xmas-flakes__f--b { left: 0; top: 0; width: 20px; height: 20px; opacity: 0.85; }
.ec-xmas-flakes__f--c { left: 10px; bottom: 0; width: 14px; height: 14px; opacity: 0.7; }

/* The homepage rating's snowflake, in place of the decorative star (same size and position). */
.ec-season--christmas.ec-xmas-flake-rating .ec-home-hero__trust-item--rating .ec-pearl-star {
	display: none;
}

/* 20 Nov: review cards — five snowflakes in place of the five star characters (rating and label unchanged). */
.ec-season--christmas.ec-xmas-flake-reviews .ec-home-review__stars > span:not(.ec-xmas-review-flakes) {
	display: none;
}

.ec-xmas-review-flakes {
	display: inline-flex;
	align-items: center;
	gap: 0.22em;
	vertical-align: middle;
	line-height: 0;
}

.ec-xmas-review-flake {
	display: inline-block;
	width: 1.08em;
	height: 1.08em;
	line-height: 0;
	filter: drop-shadow(0 0 0.16em rgba(127, 227, 238, 0.5));
}

.ec-xmas-review-flake svg {
	width: 100%;
	height: 100%;
	display: block;
	overflow: visible;
}

.ec-xmas-review-flake.is-off {
	opacity: 0.22;
	filter: none;
}

.ec-xmas-review-flake.is-off .ec-xmas-flake,
.ec-xmas-review-flake.is-off .ec-xmas-flake__glint {
	animation: none;
}

.ec-xmas-flake-icon--sm {
	width: 1.25em;
	height: 1.25em;
	margin-top: 0;
}

.ec-xmas-flake-icon {
	display: inline-block;
	flex-shrink: 0;
	width: 1.45em;
	height: 1.45em;
	margin-top: -0.12em;
	line-height: 0;
	filter: drop-shadow(0 0 0.2em rgba(127, 227, 238, 0.55));
}

.ec-xmas-flake-icon svg {
	width: 100%;
	height: 100%;
	display: block;
	overflow: visible;
}

.ec-xmas-flake {
	overflow: visible;
	animation: ec-xmas-flake-shine 7s ease-in-out infinite;
	animation-delay: var(--d, 0s);
}

.ec-xmas-flake__glint {
	opacity: 0;
	transform-box: fill-box;
	transform-origin: 50% 50%;
	animation: ec-xmas-flake-glint 7s ease-in-out infinite;
	animation-delay: var(--d, 0s);
}

@keyframes ec-xmas-flake-shine {
	0%, 80%, 100% { filter: none; }
	88% { filter: brightness(1.3) drop-shadow(0 0 2px rgba(255, 255, 255, 0.9)); }
}

@keyframes ec-xmas-flake-glint {
	0%, 82%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
	88% { opacity: 1; transform: scale(1.2) rotate(45deg); }
	94% { opacity: 0.25; transform: scale(0.8) rotate(80deg); }
}

.ec-xmas-tree--footer {
	right: max(16px, 4vw);
	bottom: -2px; /* its drift settles on the footer's top edge */
}

.ec-season--christmas .ec-hero:not(.ec-home-hero) {
	position: relative;
}

.ec-xmas-light {
	fill: #fff3d6;
	opacity: 0.95;
	animation: ec-xmas-twinkle 4.2s ease-in-out infinite;
	animation-delay: calc(var(--i) * -0.61s);
	animation-duration: calc(3.2s + (var(--i) * 0.37s) - (var(--i) / 3) * 0.9s);
}

.ec-xmas-light--t {
	fill: #5fe0e8;
}

.ec-xmas-light--i {
	fill: #e6f6ff;
}

.ec-xmas-star-glow {
	animation: ec-xmas-glow 5s ease-in-out infinite;
}

@keyframes ec-xmas-twinkle {
	0%, 100% { opacity: 0.95; }
	40% { opacity: 0.4; }
	55% { opacity: 1; }
}

@keyframes ec-xmas-glow {
	0%, 100% { opacity: 0.7; }
	50% { opacity: 1; }
}

/* ------------------------------------------------------------ the homepage sky: a band above the headline */
.ec-season--christmas.ec-xmas-has-sky .ec-home-hero__intro {
	padding-top: calc(var(--ec-space-5) + var(--xmas-sky-band));
}

.ec-xmas-hero-sky {
	position: absolute;
	inset: 0;
	z-index: 2; /* above the hero's dimmed ambient layer, below its content (3+) */
	overflow: hidden;
}

.ec-xmas-moon {
	position: absolute;
	top: calc(var(--xmas-sky-band) * 0.2);
	left: 9%;
	width: calc(var(--xmas-sky-band) * 0.95);
	height: calc(var(--xmas-sky-band) * 0.95);
	border-radius: 50%;
	background: radial-gradient(circle at 38% 36%, #fbfdff 0%, #e4f1f8 55%, #c6dbe8 100%);
	box-shadow: 0 0 22px 6px rgba(220, 240, 255, 0.18), 0 0 60px 18px rgba(95, 224, 232, 0.08);
	opacity: 0.85;
}

.ec-xmas-sleigh {
	position: absolute;
	left: 0;
	top: 0;
	color: #0b1824; /* a dark silhouette — crisp against the moon, outlined in moonlight against the sky */
	opacity: 0;
	filter: drop-shadow(0 0 1px rgba(230, 246, 255, 0.85)) drop-shadow(0 0 6px rgba(160, 225, 240, 0.35));
	will-change: transform, opacity;
}

.ec-xmas-sleigh svg {
	width: 100%;
	height: 100%;
	display: block;
	overflow: visible;
}

.ec-xmas-sleigh::before {
	/* a faint trail of sparkle behind the sleigh */
	content: "";
	position: absolute;
	right: 96%;
	top: 64%;
	width: 34%;
	height: 6px;
	background: radial-gradient(circle, rgba(236, 248, 255, 0.85) 0 0.8px, rgba(236, 248, 255, 0) 1.6px) 0 0 / 9px 6px repeat-x,
		radial-gradient(circle, rgba(170, 236, 244, 0.7) 0 0.6px, rgba(170, 236, 244, 0) 1.4px) 4px 3px / 13px 6px repeat-x;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000);
	mask-image: linear-gradient(90deg, transparent, #000);
}

@supports (translate: 0 1px) {
	.ec-xmas-sleigh.is-flying .ec-xmas-deer {
		animation: ec-xmas-gallop 0.9s ease-in-out infinite;
		animation-delay: calc(var(--i) * -0.22s);
	}
}

.ec-xmas-nose {
	fill: #5fe0e8;
	filter: drop-shadow(0 0 2px #5fe0e8);
}

/* Each reindeer's group keeps its own transform (its place in the team); the gallop bob uses the separate
   `translate` property, so it is applied only where that exists — elsewhere the team simply glides. */
@supports (translate: 0 1px) {
	@keyframes ec-xmas-gallop {
		0%, 100% { translate: 0 0; }
		50% { translate: 0 -2.5px; }
	}
}

/* ------------------------------------------------------------ the elf (peeks over a card's top edge) */
.ec-xmas-elf {
	position: absolute;
	z-index: 6;
	overflow: hidden; /* its lower edge is the card's top edge: the elf rises from behind it */
}

.ec-xmas-elf__body {
	position: absolute;
	inset: 0;
	transform: translateY(102%);
	transition: transform 0.75s cubic-bezier(0.25, 0.9, 0.3, 1);
}

.ec-xmas-elf__body svg {
	width: 100%;
	height: auto;
	display: block;
}

.ec-xmas-elf.is-peeking .ec-xmas-elf__body {
	transform: translateY(0);
}

/* 19 Nov: once up, the elf glances one way, then the other, and blinks before ducking back down. */
.ec-xmas-elf__eyes,
.ec-xmas-elf__lids {
	transform-box: fill-box;
}

.ec-xmas-elf.is-peeking .ec-xmas-elf__eyes {
	animation: ec-xmas-glance 3.4s ease-in-out 0.75s both;
}

.ec-xmas-elf.is-peeking .ec-xmas-elf__lids {
	transform-origin: 50% 0;
	animation: ec-xmas-blink 3.4s linear 0.75s both;
}

@keyframes ec-xmas-glance {
	0%, 14% { transform: translateX(0); }
	24%, 44% { transform: translateX(-1.3px); }
	54%, 74% { transform: translateX(1.3px); }
	84%, 100% { transform: translateX(0); }
}

@keyframes ec-xmas-blink {
	0%, 47%, 53%, 100% { transform: scaleY(0); }
	50% { transform: scaleY(1); }
}

/* Fallback: from behind the bottom edge of the card's picture. */
.ec-xmas-elf--inside {
	left: 14px;
	bottom: 0;
	z-index: 3;
}

/* ------------------------------------------------------------ restraint */
/* Checkout: frost only. */
.ec-season-page--checkout .ec-xmas-tree--header,
.ec-season-page--checkout .ec-xmas-card-drifts {
	display: none;
}

/* Draw night: a touch more moonlight, same layout. */
.ec-season--christmas.ec-season-drawnight .ec-site-header {
	box-shadow: inset 0 -1px 0 rgba(234, 248, 255, 0.32), 0 8px 30px rgba(95, 224, 232, 0.12);
}

.ec-season--christmas.ec-season-drawnight .ec-xmas-moon {
	opacity: 1;
}

/* Phones: a smaller sky band, smaller moon; the footer tree is the anchor. */
@media (max-width: 760px) {
	.ec-season--christmas {
		--xmas-sky-band: 3.1rem;
	}

	/* 19 Nov: on phones the moon is small — it lights the scene without taking it over. */
	.ec-xmas-moon {
		left: 7%;
		top: calc(var(--xmas-sky-band) * 0.24);
		width: calc(var(--xmas-sky-band) * 0.5);
		height: calc(var(--xmas-sky-band) * 0.5);
		box-shadow: 0 0 12px 3px rgba(220, 240, 255, 0.14), 0 0 28px 8px rgba(95, 224, 232, 0.06);
	}

	.ec-xmas-flakes--hero {
		display: none;
	}

	.ec-xmas-tree--header {
		display: none;
	}

	.ec-xmas-tree--footer {
		transform: scale(0.8);
		transform-origin: 100% 100%;
	}

	.ec-xmas-ledge--footer .ec-xmas-drift--wide {
		display: none;
	}
}

/* Measured: the hero tree has clear room only from 1300px (below, the carousel and trust strip fill the hero); the
   footer tree rises above the footer and meets page content between 761px and 1099px. */
@media (max-width: 1299px) {
	.ec-xmas-tree--hero {
		display: none;
	}
}

@media (min-width: 761px) and (max-width: 1099px) {
	.ec-xmas-tree--footer {
		display: none;
	}
}

/* Reduced motion: every still decoration stays; nothing twinkles, flies or peeks, and no sky band opens. */
@media (prefers-reduced-motion: reduce) {
	.ec-xmas-light,
	.ec-xmas-star-glow,
	.ec-xmas-glint,
	.ec-xmas-flake,
	.ec-xmas-flake__glint,
	.ec-xmas-deer {
		animation: none !important;
	}

	.ec-xmas-glint {
		opacity: 0.6;
	}

	.ec-xmas-hero-sky,
	.ec-xmas-elf {
		display: none !important;
	}
}

@media (forced-colors: active) {
	.ec-xmas,
	.ec-season-canvas {
		display: none !important;
	}
}
