/* ---- DoneTech festive season (switched on by festive.js between 20 Nov and 7 Jan) ---- */

/* Fairy lights hanging under the main menu */
.xmas-lights { position: absolute; left: 0; right: 0; top: 100%; height: 34px; pointer-events: none; overflow: visible; z-index: 1; }
.xmas-lights { transition: opacity .35s, transform .35s; }
.header:has(.nav__drop:hover:not(.is-dismissed)) .xmas-lights, .header:has(.nav__drop.is-open) .xmas-lights, .xmas-lights.is-away { opacity: 0; transform: translateY(-10px); }
.xmas-lights svg { display: block; width: 100%; height: 34px; overflow: visible; }
.xmas-lights .wire { fill: none; stroke: #2e4a3e; stroke-width: 1.6; }
.xmas-lights .cap { fill: #2e4a3e; }
.xmas-lights .bulb { animation: xmas-twinkle 2.4s ease-in-out infinite; }
.xmas-lights .b1 { fill: #ff4d5e; filter: drop-shadow(0 0 4px #ff4d5e); }
.xmas-lights .b2 { fill: #ffd23f; filter: drop-shadow(0 0 4px #ffd23f); animation-delay: -.6s; }
.xmas-lights .b3 { fill: #3ddc84; filter: drop-shadow(0 0 4px #3ddc84); animation-delay: -1.2s; }
.xmas-lights .b4 { fill: #06ADEF; filter: drop-shadow(0 0 5px #06ADEF); animation-delay: -1.8s; }
@keyframes xmas-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Santa hat on the logo */
.logo { position: relative; }
.xmas-hat { position: absolute; left: 8px; top: -11px; width: 30px; height: 26px; transform: rotate(-18deg); pointer-events: none; }
.logo--foot .xmas-hat { display: none; }

/* Snow resting on the header quote button and the hero photo */
.header__cta { position: relative; overflow: visible; }
.xmas-cap { position: absolute; left: 14px; right: 14px; top: -4px; height: 12px; pointer-events: none; z-index: 2; filter: drop-shadow(0 1px 1.5px rgba(0, 21, 32, .3)); }
.xmas-cap svg { display: block; width: 100%; height: 100%; }
.hero__photo .xmas-cap { left: 0; right: 0; top: -2px; height: 22px; filter: none; }

/* Falling snow */
.xmas-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* Visitor switch for the snow */
.xmas-toggle { position: fixed; left: 18px; bottom: 18px; z-index: 61; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--night, #071923); color: #fff; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .55); transition: background-color .15s, transform .15s; }
.xmas-toggle:hover { background: var(--blue, #06ADEF); color: #001520; }
.xmas-toggle:focus-visible { outline: 2px solid var(--blue, #06ADEF); outline-offset: 3px; }
.xmas-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.xmas-toggle[aria-pressed="false"] svg { opacity: .45; }

/* Festive item in the homepage to-do card */
.todo__list li.xmas-item { color: #c8102e; font-weight: 600; }
.todo__list li.xmas-item.is-done { color: #c8102e; }

@media (max-width: 720px) {
  .xmas-lights { height: 28px; }
  .xmas-hat { left: 6px; top: -10px; width: 26px; height: 22px; }
  .xmas-toggle { width: 40px; height: 40px; left: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .xmas-lights .bulb { animation: none; }
}
@media print { .xmas-lights, .xmas-hat, .xmas-cap, .xmas-snow, .xmas-toggle { display: none !important; } }
