/* SMAF Jul – pynt og sne. Alt ligger oven på siden og blokerer ikke klik. */

.smaf-jul-snow {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 99990;
}

/* ---------- Lyskæde ---------- */
.smaf-jul-lights {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 70px;
	pointer-events: none;
	z-index: 99991;
	overflow: hidden;
}
.admin-bar .smaf-jul-lights { top: 32px; }
@media (max-width: 782px) { .admin-bar .smaf-jul-lights { top: 46px; } }

.smaf-jul-lights svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.smaf-jul-wire { fill: none; stroke: #3b3b3b; stroke-width: 1.6; }

.smaf-jul-bulb {
	position: absolute;
	width: 9px;
	height: 14px;
	margin-left: -4.5px;
	border-radius: 50% 50% 55% 55% / 35% 35% 65% 65%;
	background: var(--c);
	box-shadow: 0 0 8px 2px var(--c);
	animation: smaf-jul-twinkle 2.4s ease-in-out infinite;
	animation-delay: var(--d);
}
.smaf-jul-bulb::before {
	content: "";
	position: absolute;
	left: 1.5px;
	top: -4px;
	width: 6px;
	height: 5px;
	background: #2c2c2c;
	border-radius: 1px;
}
@keyframes smaf-jul-twinkle {
	0%, 100% { opacity: 1; filter: brightness(1.15); }
	50% { opacity: 0.45; filter: brightness(0.8); }
}

/* ---------- Julekugler og stjerner ---------- */
.smaf-jul-orn {
	position: absolute;
	width: 0;
	transform-origin: 50% 0;
	animation: smaf-jul-swing 4s ease-in-out infinite;
	animation-delay: var(--d);
}
.smaf-jul-orn::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: var(--len);
	background: rgba(60, 60, 60, 0.55);
}
.smaf-jul-ball {
	position: absolute;
	left: -9px;
	top: var(--len);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: radial-gradient(circle at 32% 28%, #fff 0 8%, var(--c) 9% 70%, rgba(0, 0, 0, 0.35) 100%);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.smaf-jul-ball::before {
	content: "";
	position: absolute;
	left: 6px;
	top: -4px;
	width: 6px;
	height: 5px;
	background: #d4af37;
	border-radius: 1px;
}
.smaf-jul-star {
	position: absolute;
	left: -10px;
	top: var(--len);
	width: 20px;
	height: 20px;
	background: #f5c542;
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
	filter: drop-shadow(0 0 3px rgba(245, 197, 66, 0.9));
}
@keyframes smaf-jul-swing {
	0%, 100% { transform: rotate(-5deg); }
	50% { transform: rotate(5deg); }
}

/* ---------- Snedriver i bunden ---------- */
.smaf-jul-drift {
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 34px;
	pointer-events: none;
	z-index: 99989;
}
.smaf-jul-drift svg { display: block; width: 100%; height: 100%; }

/* ---------- Knap til at slå sne fra ---------- */
.smaf-jul-toggle {
	position: fixed;
	left: 14px;
	bottom: 44px;
	z-index: 99995;
	padding: 6px 12px;
	font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #fff;
	background: rgba(47, 75, 58, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.smaf-jul-toggle:hover, .smaf-jul-toggle:focus-visible { background: #C97B4A; outline: none; }

@media (max-width: 600px) {
	.smaf-jul-lights { height: 56px; }
	.smaf-jul-toggle { bottom: 40px; font-size: 11px; padding: 5px 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.smaf-jul-bulb, .smaf-jul-orn { animation: none; }
	.smaf-jul-snow { display: none; }
}

@media print {
	.smaf-jul-snow, .smaf-jul-lights, .smaf-jul-drift, .smaf-jul-toggle { display: none !important; }
}

/* Når besøgende har slået julepynten fra */
.smaf-jul-off .smaf-jul-lights,
.smaf-jul-off .smaf-jul-drift,
.smaf-jul-off .smaf-jul-snow { display: none !important; }
