/*
 * Xmas Woo Decor – front end
 * Every selector is scoped to the plugin's own IDs (#xwdec26-*) and uses the
 * unique "xwdec26-" prefix, so it never changes your theme and your theme
 * cannot change it.
 */

/* ---------- Isolation reset (blocks theme styles from leaking in) ---------- */
#xwdec26-bells,
#xwdec26-bells *,
#xwdec26-santa,
#xwdec26-santa * {
	box-sizing: content-box !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	float: none !important;
	min-width: 0 !important;
	max-width: none !important;
	min-height: 0 !important;
	max-height: none !important;
	background: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	outline: 0 !important;
	transition: none !important;
	vertical-align: baseline !important;
}

/* ---------- Snow ---------- */
#xwdec26-snow {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: auto !important;
	bottom: auto !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	opacity: 1 !important;
	transform: none !important;
	pointer-events: none !important;
	z-index: 99997 !important;
}

/* ---------- Jingle bells ---------- */
#xwdec26-bells {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	height: 0 !important;
	overflow: visible !important;
	z-index: 99998 !important;
	pointer-events: none !important;
}
#xwdec26-bells .xwdec26-bell-holder {
	position: absolute !important;
	top: 0 !important;
	display: block !important;
	width: 96px;
	height: auto !important;
	transform-origin: 50% 0;
	animation: xwdec26-swing 3.6s ease-in-out infinite;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25));
	pointer-events: auto !important;
	cursor: default;
}
#xwdec26-bells .xwdec26-bell-left { left: 4%; right: auto; }
#xwdec26-bells .xwdec26-bell-right { right: 4%; left: auto; animation-delay: -1.8s; }
#xwdec26-bells.xwdec26-size-small .xwdec26-bell-holder { width: 70px; }
#xwdec26-bells.xwdec26-size-large .xwdec26-bell-holder { width: 128px; }

#xwdec26-bells svg {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	overflow: visible;
	fill: none;
}
#xwdec26-bells .xwdec26-bell { transform-box: view-box; transform-origin: 60px 50px; }
#xwdec26-bells .xwdec26-bell-a { animation: xwdec26-ring-a 3.6s ease-in-out infinite; }
#xwdec26-bells .xwdec26-bell-b { animation: xwdec26-ring-b 3.6s ease-in-out infinite; }
#xwdec26-bells .xwdec26-bell-holder:hover { animation-duration: .9s; }
#xwdec26-bells .xwdec26-bell-holder:hover .xwdec26-bell-a,
#xwdec26-bells .xwdec26-bell-holder:hover .xwdec26-bell-b { animation-duration: .45s; }

@keyframes xwdec26-swing  { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes xwdec26-ring-a { 0%, 100% { transform: rotate(4deg); }  50% { transform: rotate(-6deg); } }
@keyframes xwdec26-ring-b { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(6deg); } }

/* ---------- Walking Santa ---------- */
#xwdec26-santa {
	--xwdec26-santa-w: 96px;
	position: fixed !important;
	top: auto !important;
	right: auto !important;
	left: 0 !important;
	bottom: 6px !important;
	display: block;
	width: var(--xwdec26-santa-w) !important;
	height: auto !important;
	z-index: 99996 !important;
	pointer-events: none !important;
	will-change: transform;
}
#xwdec26-santa[hidden] { display: none !important; }
#xwdec26-santa.xwdec26-size-small { --xwdec26-santa-w: 70px; }
#xwdec26-santa.xwdec26-size-large { --xwdec26-santa-w: 128px; }

#xwdec26-santa svg {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	overflow: visible;
	fill: none;
}
#xwdec26-santa .xwdec26-santa-flip { display: block; }
#xwdec26-santa .xwdec26-santa-flip.xwdec26-is-left { transform: scaleX(-1); }
#xwdec26-santa .xwdec26-santa-bob {
	display: block;
	animation: xwdec26-bob .32s ease-in-out infinite alternate;
	filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .2));
}
#xwdec26-santa .xwdec26-santa-shadow {
	display: block;
	width: 60%;
	height: 7px;
	margin: -6px auto 0 !important;
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, .28), transparent 70%) !important;
	border-radius: 50%;
}
#xwdec26-santa .xwdec26-leg { transform-box: fill-box; transform-origin: 50% 0; }
#xwdec26-santa .xwdec26-leg-front { animation: xwdec26-step .64s ease-in-out infinite alternate; }
#xwdec26-santa .xwdec26-leg-back  { animation: xwdec26-step .64s ease-in-out infinite alternate-reverse; }
#xwdec26-santa .xwdec26-arm { transform-box: fill-box; transform-origin: 0 0; animation: xwdec26-arm .64s ease-in-out infinite alternate-reverse; }

@keyframes xwdec26-bob  { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes xwdec26-step { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes xwdec26-arm  { from { transform: rotate(-18deg); } to { transform: rotate(16deg); } }

/* ---------- Responsive, accessibility, print ---------- */
@media (max-width: 680px) {
	#xwdec26-bells .xwdec26-bell-holder { width: 58px; }
	#xwdec26-bells.xwdec26-size-large .xwdec26-bell-holder { width: 72px; }
	#xwdec26-santa { --xwdec26-santa-w: 68px; }
}
@media (prefers-reduced-motion: reduce) {
	#xwdec26-bells .xwdec26-bell-holder,
	#xwdec26-bells .xwdec26-bell-a,
	#xwdec26-bells .xwdec26-bell-b { animation: none !important; }
}
@media print {
	#xwdec26-snow, #xwdec26-bells, #xwdec26-santa { display: none !important; }
}
