/* v1.216: festive switches on every page during the Christmas period – decorations and falling snow.
   inc/festive.php puts .dwf-season (and .dwf-deco / .dwf-snow when chosen) on <html>. */

.dwf-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Switches (shared by the tab and the account bar) ---------- */
.dwf-switch {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px 6px 12px; box-sizing: border-box;
	border: 1px solid var(--dw-line-strong, rgba(217, 185, 138, .5)); border-radius: 999px; background: transparent;
	color: var(--dw-cream, #F6EEDD); font: 500 15px/1.2 var(--dw-sans, sans-serif); cursor: pointer; text-align: left;
}
.dwf-switch:hover { background: rgba(217, 185, 138, .1); }
.dwf-switch:focus-visible, .dwf-fab__btn:focus-visible { outline: 2px solid var(--dw-gold, #D9B98A); outline-offset: 2px; }
.dwf-switch__icon { font-size: 16px; line-height: 1; }
.dwf-switch__label { flex: 1; }
.dwf-switch__track { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .18); transition: background .2s; }
.dwf-switch__knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .2s; }
.dwf-switch[aria-checked="true"] { border-color: var(--dw-gold, #D9B98A); }
.dwf-switch[aria-checked="true"] .dwf-switch__track { background: #2F6B4C; }
.dwf-switch[aria-checked="true"] .dwf-switch__knob { transform: translateX(16px); }
.dwf-note { margin: 0; font-size: 13px; line-height: 1.4; color: var(--dw-muted, #B9B3C9); }

/* ---------- The tab on every page: left edge, halfway down (the corners are taken) ---------- */
.dwf-fab { position: fixed; left: 0; top: 50%; z-index: 99989; transform: translateY(-50%); font-family: var(--dw-sans, sans-serif); }
.dwf-fab__btn {
	display: grid; place-items: center; width: 44px; height: 48px; padding: 0 0 0 2px; box-sizing: border-box;
	border: 1px solid var(--dw-gold, #D9B98A); border-left: 0; border-radius: 0 14px 14px 0;
	background: var(--dw-night, #010F2A); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .4); opacity: .88; transition: opacity .2s, width .2s;
}
.dwf-fab__btn:hover, .dwf-fab.is-open .dwf-fab__btn { opacity: 1; width: 50px; }
.dwf-fab.is-on .dwf-fab__btn { box-shadow: 0 6px 18px rgba(0, 0, 0, .4), 0 0 14px rgba(255, 217, 138, .45); }
.dwf-fab__panel {
	position: absolute; left: 56px; top: 50%; transform: translateY(-50%); display: grid; gap: 8px; width: 220px; padding: 12px;
	border: 1px solid var(--dw-gold, #D9B98A); border-radius: 14px; background: var(--dw-night, #010F2A); box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.dwf-fab__panel[hidden] { display: none; }
.dwf-fab__h { margin: 0 0 2px; font: 700 12px/1.2 var(--dw-sans, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--dw-gold, #D9B98A); }
.dwf-fab .dwf-switch { width: 100%; }
@media print { .dwf-fab, .dwf-garland, .dwf-snowfall { display: none !important; } }

/* ---------- The account dashboard bar ---------- */
.dwf-bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
	margin: 0 0 18px; padding: 10px 16px; border: 1px solid var(--dw-line, rgba(217, 185, 138, .3)); border-radius: 14px;
	background: rgba(1, 15, 42, .55);
}
.dwf-bar__h { margin: 0; font: 600 15px/1.3 var(--dw-sans, sans-serif); letter-spacing: .06em; color: var(--dw-cream, #F6EEDD); }
.dwf-bar__switches { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.dwf-bar .dwf-note { flex-basis: 100%; }

/* ---------- Decorations: the garland under the header (every page) ---------- */
.dwf-garland { display: none; }
.dwf-deco .dwf-garland { display: block; position: absolute; left: 0; right: 0; height: 74px; pointer-events: none; z-index: 50; }
.dwf-garland__swag { position: absolute; inset: 0 0 auto 0; width: 100%; height: 60px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.dwf-garland__lights, .dwf-garland__baubles { position: absolute; inset: 0; }
.dwf-bulb { position: absolute; width: 8px; height: 12px; margin-left: -4px; border-radius: 50% 50% 45% 45%; animation: dwf-twinkle 2.4s ease-in-out infinite; }
.dwf-bulb::before { content: ""; position: absolute; top: -3px; left: 2px; width: 4px; height: 4px; border-radius: 1px; background: #4A4A3A; }
.dwf-bulb--r { background: #FF5A5A; box-shadow: 0 0 8px 2px rgba(255, 90, 90, .75); }
.dwf-bulb--g { background: #6BE39A; box-shadow: 0 0 8px 2px rgba(107, 227, 154, .7); }
.dwf-bulb--y { background: #FFD98A; box-shadow: 0 0 8px 2px rgba(255, 217, 138, .8); }
.dwf-bulb--b { background: #8EC5FF; box-shadow: 0 0 8px 2px rgba(142, 197, 255, .75); }
.dwf-bulb--w { background: #FFF6E4; box-shadow: 0 0 8px 2px rgba(255, 246, 228, .8); }
@keyframes dwf-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* baubles hang from the high points, where the swags meet */
.dwf-bauble { position: absolute; top: 4px; width: 2px; height: 16px; margin-left: -1px; background: rgba(217, 185, 138, .85); transform-origin: 50% 0; animation: dwf-sway 4s ease-in-out infinite; }
.dwf-bauble b { position: absolute; top: 16px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; box-shadow: inset -3px -4px 6px rgba(0, 0, 0, .35), 0 3px 6px rgba(0, 0, 0, .4); }
.dwf-bauble b::before { content: ""; position: absolute; top: -4px; left: 7px; width: 6px; height: 5px; border-radius: 1px; background: #C9A86A; }
.dwf-bauble b::after { content: ""; position: absolute; top: 4px; left: 4px; width: 5px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.dwf-bauble--red b { background: radial-gradient(circle at 35% 30%, #C4525F, #7A2E3E 70%); }
.dwf-bauble--gold b { background: radial-gradient(circle at 35% 30%, #F2DDB0, #B8955E 70%); }
@keyframes dwf-sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* holly, used at the garland's ends and on account panels */
.dwf-garland__holly, .dwf-holly-bg {
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 40'%3E%3Cpath d='M22 22 C14 18 6 20 2 14 C8 14 8 8 4 5 C10 6 14 2 16 0 C17 6 22 8 22 14 Z' fill='%232F6B4C' stroke='%231F4A36' stroke-width='1'/%3E%3Cpath d='M24 22 C30 16 40 16 44 10 C38 11 38 5 41 2 C35 4 31 1 28 0 C28 6 24 9 24 14 Z' fill='%23367A56' stroke='%231F4A36' stroke-width='1'/%3E%3Ccircle cx='20' cy='24' r='4.2' fill='%23B3263A'/%3E%3Ccircle cx='27' cy='25' r='4.2' fill='%23C9303F'/%3E%3Ccircle cx='23.5' cy='30' r='4.2' fill='%23A31F33'/%3E%3Ccircle cx='19' cy='22.6' r='1.2' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='26' cy='23.6' r='1.2' fill='%23fff' opacity='.7'/%3E%3C/svg%3E") no-repeat center / contain;
}
.dwf-garland__holly { position: absolute; top: -6px; width: 52px; height: 44px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
.dwf-garland__holly--l { left: -6px; }
.dwf-garland__holly--r { right: -6px; transform: scaleX(-1); }

/* a snowy edge along the top of the footer */
.dwf-deco #main-footer, .dwf-deco .et-l--footer, .dwf-deco footer.site-footer { position: relative; }
.dwf-deco #main-footer::before, .dwf-deco .et-l--footer::before, .dwf-deco footer.site-footer::before {
	content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 22px; pointer-events: none; z-index: 5;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 22' preserveAspectRatio='none'%3E%3Cpath d='M0 22 V12 C14 4 26 4 38 10 C50 2 66 2 80 9 C94 3 108 5 120 11 C134 2 150 3 162 10 C176 4 190 3 202 9 C214 3 228 4 240 11 V22 Z' fill='%23F4F7FB'/%3E%3Cpath d='M0 22 V16 C30 10 60 12 90 15 C130 10 170 11 240 16 V22 Z' fill='%23DCE6F2'/%3E%3C/svg%3E") repeat-x left top / 240px 22px;
	filter: drop-shadow(0 -2px 3px rgba(0, 0, 0, .2));
}
.dwf-deco .et-l--footer #main-footer::before { content: none; } /* only once if both are present */

/* ---------- Decorations: extras on My account ---------- */
.dwf-deco .woocommerce-MyAccount-content > section,
.dwf-deco .woocommerce-MyAccount-content > div:not(.woocommerce-notices-wrapper) { position: relative; }
.dwf-deco .woocommerce-MyAccount-content > section::after,
.dwf-deco .woocommerce-MyAccount-content > div:not(.woocommerce-notices-wrapper)::after {
	content: ""; position: absolute; top: -10px; right: -8px; width: 46px; height: 40px; pointer-events: none; z-index: 3;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 40'%3E%3Cpath d='M22 22 C14 18 6 20 2 14 C8 14 8 8 4 5 C10 6 14 2 16 0 C17 6 22 8 22 14 Z' fill='%232F6B4C' stroke='%231F4A36' stroke-width='1'/%3E%3Cpath d='M24 22 C30 16 40 16 44 10 C38 11 38 5 41 2 C35 4 31 1 28 0 C28 6 24 9 24 14 Z' fill='%23367A56' stroke='%231F4A36' stroke-width='1'/%3E%3Ccircle cx='20' cy='24' r='4.2' fill='%23B3263A'/%3E%3Ccircle cx='27' cy='25' r='4.2' fill='%23C9303F'/%3E%3Ccircle cx='23.5' cy='30' r='4.2' fill='%23A31F33'/%3E%3Ccircle cx='19' cy='22.6' r='1.2' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='26' cy='23.6' r='1.2' fill='%23fff' opacity='.7'/%3E%3C/svg%3E") no-repeat center / contain;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4));
}
.dwf-deco .woocommerce-MyAccount-content > .dwf-bar::after,
.dwf-deco .woocommerce-MyAccount-content > .dw-xtree::after { content: none; } /* the bar, and the tree, which is dressed already */
.dwf-deco .woocommerce-MyAccount-content > section:not(.dwf-bar):not(.dw-xtree) {
	box-shadow: inset 0 3px 0 0 rgba(179, 38, 58, .75), 0 0 0 1px rgba(217, 185, 138, .18), 0 10px 30px -14px rgba(255, 217, 138, .25);
}
.dwf-deco .woocommerce-MyAccount-navigation { position: relative; }
.dwf-deco .woocommerce-MyAccount-navigation::before {
	content: ""; position: absolute; top: 0; bottom: 0; left: -10px; width: 5px; border-radius: 4px; opacity: .85;
	background: repeating-linear-gradient(135deg, #B3263A 0 8px, #F6EEDD 8px 16px, #2F6B4C 16px 24px, #F6EEDD 24px 32px);
}
.dwf-deco .woocommerce-MyAccount-navigation li.is-active > a::after { content: " ★"; color: var(--dw-gold, #D9B98A); }

/* ---------- Snow ---------- */
.dwf-snowfall { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 99970; }
.dwf-snowfall[hidden] { display: none; }

/* ---------- Calm motion / reduce motion ---------- */
.dw-calm .dwf-bulb, .dw-calm .dwf-bauble { animation: none; }
@media (prefers-reduced-motion: reduce) {
	.dwf-bulb, .dwf-bauble { animation: none; }
	.dwf-switch__track, .dwf-switch__knob, .dwf-fab__btn { transition: none; }
}
@media (max-width: 640px) {
	.dwf-garland__swag { height: 48px; }
	.dwf-bulb:nth-child(even) { display: none; }
	.dwf-garland__holly { width: 40px; height: 34px; }
	.dwf-deco .woocommerce-MyAccount-navigation::before { display: none; }
	.dwf-bar { padding: 10px 12px; }
	.dwf-fab { top: auto; bottom: 140px; transform: none; }
	.dwf-fab__btn { width: 38px; height: 42px; font-size: 19px; }
	.dwf-fab__panel { top: auto; bottom: 0; transform: none; left: 46px; }
}
