/* Mobility Disabled – Christmas Theme
   Decorative only. Every decoration is a pseudo-element or a fixed layer that
   ignores clicks, so nothing on the page moves or becomes harder to use. */

:root {
	--mdxmas-red: #b3121f;
	--mdxmas-red-dark: #8c0e18;
	--mdxmas-green: #1d5c36;
	--mdxmas-green-dark: #133f25;
	--mdxmas-gold: #e8b931;
	--mdxmas-cream: #fffaf0;
}

/* ---------- Message bar ---------- */
.mdxmas-bar {
	position: relative;
	z-index: 50;
	background: var(--mdxmas-green-dark);
	background-image:
		repeating-linear-gradient(135deg, var(--mdxmas-red) 0 10px, var(--mdxmas-cream) 10px 20px);
	background-size: 100% 4px;
	background-repeat: no-repeat;
	background-position: bottom;
	background-color: var(--mdxmas-green-dark);
	color: #fff;
	text-align: center;
	font-size: 0.95rem;
	line-height: 1.4;
	padding: 0.6rem 1rem calc(0.6rem + 4px);
}
.mdxmas-bar__text { font-weight: 600; letter-spacing: 0.01em; }
.mdxmas-bar__deco { color: var(--mdxmas-gold); margin: 0 0.35em; }
.mdxmas-bar__link,
.mdxmas-bar__link:visited {
	color: var(--mdxmas-gold);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	margin-left: 0.5em;
	white-space: nowrap;
}
.mdxmas-bar__link:hover,
.mdxmas-bar__link:focus-visible { color: #fff; }
.mdxmas-bar__link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Fairy lights under the header ---------- */
body.mdxmas-on-lights .wp-site-blocks > header,
body.mdxmas-on-lights header.wp-block-template-part {
	position: relative;
}
body.mdxmas-on-lights .wp-site-blocks > header::after,
body.mdxmas-on-lights header.wp-block-template-part::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -14px;
	height: 26px;
	pointer-events: none;
	z-index: 40;
	background-repeat: repeat-x;
	background-size: 160px 26px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cpath d='M0 4 Q20 12 40 4 T80 4 T120 4 T160 4' fill='none' stroke='%23224a2f' stroke-width='1.6'/%3E%3Cg%3E%3Crect x='18.5' y='7' width='3' height='4' rx='1' fill='%23555'/%3E%3Cellipse cx='20' cy='16' rx='4.2' ry='6.2' fill='%23e23b3b'/%3E%3Crect x='58.5' y='7' width='3' height='4' rx='1' fill='%23555'/%3E%3Cellipse cx='60' cy='16' rx='4.2' ry='6.2' fill='%23f2c230'/%3E%3Crect x='98.5' y='7' width='3' height='4' rx='1' fill='%23555'/%3E%3Cellipse cx='100' cy='16' rx='4.2' ry='6.2' fill='%2333a852'/%3E%3Crect x='138.5' y='7' width='3' height='4' rx='1' fill='%23555'/%3E%3Cellipse cx='140' cy='16' rx='4.2' ry='6.2' fill='%233b82e2'/%3E%3C/g%3E%3C/svg%3E");
	filter: drop-shadow(0 0 3px rgba(255, 220, 120, 0.7));
	animation: mdxmas-twinkle 2.4s ease-in-out infinite;
}
@keyframes mdxmas-twinkle {
	0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 220, 120, 0.5)) brightness(0.92); }
	50%      { filter: drop-shadow(0 0 6px rgba(255, 230, 150, 0.95)) brightness(1.15); }
}

/* ---------- Santa hat on the logo ---------- */
body.mdxmas-on-hat .wp-block-site-logo,
body.mdxmas-on-hat header.wp-block-template-part figure.wp-block-image:first-of-type {
	position: relative;
	overflow: visible;
}
body.mdxmas-on-hat .wp-block-site-logo::before,
body.mdxmas-on-hat header.wp-block-template-part figure.wp-block-image:first-of-type::before {
	content: "";
	position: absolute;
	top: -6px;
	left: 2px;
	width: 40px;
	height: 35px;
	pointer-events: none;
	z-index: 2;
	transform: rotate(-22deg);
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'%3E%3Cpath d='M8 44 C10 22 26 6 44 8 C52 9 58 16 56 24 C54 18 48 16 44 20 C40 26 46 36 50 44 Z' fill='%23c8102e'/%3E%3Cpath d='M20 18 C26 12 34 10 40 11' fill='none' stroke='%23e6394f' stroke-width='3' stroke-linecap='round' opacity='.7'/%3E%3Crect x='3' y='40' width='52' height='12' rx='6' fill='%23fff' stroke='%23e3e3e3'/%3E%3Ccircle cx='56' cy='25' r='6.5' fill='%23fff' stroke='%23e3e3e3'/%3E%3C/svg%3E");
}

/* ---------- Holly trim above the footer ---------- */
body.mdxmas-on-holly .wp-site-blocks > footer,
body.mdxmas-on-holly footer.wp-block-template-part {
	position: relative;
}
body.mdxmas-on-holly .wp-site-blocks > footer::before,
body.mdxmas-on-holly footer.wp-block-template-part::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -14px;
	height: 28px;
	z-index: 1;
	pointer-events: none;
	background-repeat: repeat-x;
	background-position: center;
	background-size: 120px 28px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='28' viewBox='0 0 120 28'%3E%3Cpath d='M30 14 C36 6 44 4 52 8 C48 10 50 14 46 15 C48 18 44 20 40 19 C38 22 34 20 30 14 Z' fill='%232f7d45'/%3E%3Cpath d='M30 14 C24 6 16 4 8 8 C12 10 10 14 14 15 C12 18 16 20 20 19 C22 22 26 20 30 14 Z' fill='%23246a38'/%3E%3Ccircle cx='27' cy='16' r='3.4' fill='%23d0202f'/%3E%3Ccircle cx='33' cy='16.5' r='3.4' fill='%23e02838'/%3E%3Ccircle cx='30' cy='20.5' r='3.4' fill='%23c41b29'/%3E%3Cpath d='M90 14 C96 6 104 4 112 8 C108 10 110 14 106 15 C108 18 104 20 100 19 C98 22 94 20 90 14 Z' fill='%23246a38'/%3E%3Cpath d='M90 14 C84 6 76 4 68 8 C72 10 70 14 74 15 C72 18 76 20 80 19 C82 22 86 20 90 14 Z' fill='%232f7d45'/%3E%3Ccircle cx='87' cy='16' r='3.4' fill='%23e02838'/%3E%3Ccircle cx='93' cy='16.5' r='3.4' fill='%23c41b29'/%3E%3Ccircle cx='90' cy='20.5' r='3.4' fill='%23d0202f'/%3E%3C/svg%3E");
}

/* ---------- Snow layer + stop button ---------- */
.mdxmas-snow {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9990;
}
.mdxmas-snow-toggle {
	position: fixed;
	left: 14px;
	bottom: 74px; /* sits above the cookie settings icon */
	z-index: 9991;
	font: 600 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #fff;
	background: rgba(19, 63, 37, 0.88);
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	padding: 8px 12px;
	cursor: pointer;
}
.mdxmas-snow-toggle:hover { background: var(--mdxmas-green); }
.mdxmas-snow-toggle:focus-visible { outline: 3px solid var(--mdxmas-gold); outline-offset: 2px; }

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
	body.mdxmas-on-lights .wp-site-blocks > header::after,
	body.mdxmas-on-lights header.wp-block-template-part::after { animation: none; }
	.mdxmas-snow, .mdxmas-snow-toggle { display: none !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	.mdxmas-bar { font-size: 0.85rem; }
	body.mdxmas-on-hat .wp-block-site-logo::before, body.mdxmas-on-hat header.wp-block-template-part figure.wp-block-image:first-of-type::before { width: 32px; height: 28px; top: -5px; left: 1px; }
}

@media print {
	.mdxmas-bar, .mdxmas-snow, .mdxmas-snow-toggle { display: none !important; }
	body.mdxmas header::after, body.mdxmas footer::before, body.mdxmas .wp-block-site-logo::before, body.mdxmas header figure.wp-block-image::before { display: none !important; }
}

/* ---------- After the end date (cached pages) ---------- */
html.mdxmas-expired .mdxmas-bar,
html.mdxmas-expired .mdxmas-snow,
html.mdxmas-expired .mdxmas-snow-toggle { display: none !important; }
html.mdxmas-expired body.mdxmas header::after,
html.mdxmas-expired body.mdxmas footer::before,
html.mdxmas-expired body.mdxmas .wp-block-site-logo::before,
html.mdxmas-expired body.mdxmas header figure.wp-block-image::before { content: none !important; display: none !important; }

/* ---------- New Year's Day (1 January only) ---------- */
.mdxmas-bar__ny { display: none; }
html.mdxmas-ny .mdxmas-bar__xmas { display: none; }
html.mdxmas-ny .mdxmas-bar__ny { display: inline; }
html.mdxmas-ny .mdxmas-bar {
	background-color: #0f1d3a;
	background-image: repeating-linear-gradient(135deg, var(--mdxmas-gold) 0 10px, #c9ced8 10px 20px);
}
html.mdxmas-ny .mdxmas-snow-toggle { background: rgba(15, 29, 58, 0.9); }
