/* Marketsz holiday theme (see holiday-20261202f.js). Everything that moves only changes transform/opacity
   of its own layer, so the browser never has to repaint the page for it. Nothing here applies until the script adds html.mzh-on. */

/* Snow / fireworks: full-screen, never takes clicks, under menus and dialogs. */
.mzh-canvas { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 28; }

/* String of lights under the header */
.mzh-garland { position: fixed; left: 0; top: 0; z-index: 29; pointer-events: none; line-height: 0; will-change: transform; }
.mzh-garland svg { display: block; overflow: visible; }
.mzh-garland-svg { position: relative; }
.mzh-halo { position: absolute; left: 0; top: 0; will-change: opacity; }
.mzh-halo-a { animation: mzh-twinkle 2.6s ease-in-out infinite; }
.mzh-halo-b { animation: mzh-twinkle 2.6s ease-in-out infinite; animation-delay: -1.3s; }
html.mzh-newyear .mzh-halo-a, html.mzh-newyear .mzh-halo-b { animation-duration: 1.4s; }
html.mzh-newyear .mzh-halo-b { animation-delay: -.7s; }
@keyframes mzh-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .42; } }

/* Hats on the logo (the logo's link carries data-holiday-hat) */
html.mzh-on [data-holiday-hat] { position: relative; display: inline-block; }
html.mzh-on [data-holiday-hat]::after {
  content: ""; position: absolute; pointer-events: none; z-index: 2;
  left: var(--mzh-hat-x, 0%); top: var(--mzh-hat-y, -60%); height: var(--mzh-hat-h, 105%); aspect-ratio: 1 / 1;
  background: url("santa-hat-20261202a.svg") no-repeat center / contain;
  transform: rotate(-16deg); transform-origin: 50% 100%;
}
html.mzh-newyear [data-holiday-hat]::after { background-image: url("party-hat-20261202a.svg"); transform: rotate(-12deg); }

/* Home hero: tree standing on the ground line, just left of the house */
.mzh-tree {
  position: absolute; right: 15.8%; bottom: 62%; width: 5.4%; min-width: 46px; max-width: 96px;
  z-index: 120; pointer-events: none;
}
.mzh-tree svg { display: block; width: 100%; height: auto; overflow: visible; }
.mzh-tree > svg { filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.mzh-tree-layer { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; will-change: opacity; }
.mzh-tl-a { animation: mzh-light 1.8s ease-in-out infinite; }
.mzh-tl-b { animation: mzh-light 1.8s ease-in-out infinite; animation-delay: -.9s; }
.mzh-star-glow { transform-origin: 50% 8.75%; will-change: transform, opacity; animation: mzh-glow 3.2s ease-in-out infinite; }
@keyframes mzh-light { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes mzh-glow { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }

/* Santa's sleigh: crosses the whole screen width every ~30s, entering and leaving off-screen */
.mzh-sky-host { position: relative; }
.mzh-sky { position: absolute; left: 0; right: 0; top: 0; height: 40%; overflow: hidden; pointer-events: none; z-index: 110; }
.mzh-sleigh {
  position: absolute; left: 0; top: 16%; width: clamp(150px, 15vw, 240px);
  transform: translate3d(-130%, 0, 0);
  animation: mzh-fly-x 30s linear infinite; animation-delay: 2s; will-change: transform;
}
.mzh-sleigh-arc { animation: mzh-fly-y 30s ease-in-out infinite; animation-delay: 2s; will-change: transform; }
.mzh-sleigh-bob { position: relative; animation: mzh-bob 1.5s ease-in-out infinite alternate; will-change: transform; }
.mzh-sleigh svg { position: relative; display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 0 7px rgba(255, 236, 170, .8)); }
/* glowing streak + twinkling sparkles behind the sleigh */
.mzh-trail {
  position: absolute; right: 97%; top: 70%; width: 85%; height: 3px; border-radius: 3px;
  background: linear-gradient(to left, rgba(255, 236, 170, .85), rgba(255, 236, 170, 0)); filter: blur(.6px);
}
.mzh-sparks {
  position: absolute; right: 96%; top: 52%; width: 70%; height: 26px;
  background:
    radial-gradient(circle at 8% 40%, #fff6cf 0 1.6px, transparent 2.4px),
    radial-gradient(circle at 22% 75%, #ffe08a 0 1.2px, transparent 2px),
    radial-gradient(circle at 37% 30%, #fff6cf 0 1.4px, transparent 2.2px),
    radial-gradient(circle at 55% 65%, #ffe08a 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 72% 35%, #fff6cf 0 1px, transparent 1.6px),
    radial-gradient(circle at 88% 60%, #ffe08a 0 .9px, transparent 1.5px);
  -webkit-mask-image: linear-gradient(to left, #000 30%, transparent); mask-image: linear-gradient(to left, #000 30%, transparent);
  animation: mzh-sparkle .9s steps(2) infinite; will-change: opacity;
}
@keyframes mzh-sparkle { 50% { opacity: .35; } }
@keyframes mzh-fly-x {
  0% { transform: translate3d(-130%, 0, 0); }
  42% { transform: translate3d(calc(100vw + 30%), 0, 0); }
  100% { transform: translate3d(calc(100vw + 30%), 0, 0); }
}
@keyframes mzh-fly-y {
  0% { transform: translateY(38px) rotate(-5deg); }
  14% { transform: translateY(-6px) rotate(-2deg); }
  28% { transform: translateY(-18px) rotate(1deg); }
  42% { transform: translateY(6px) rotate(4deg); }
  100% { transform: translateY(6px) rotate(4deg); }
}
@keyframes mzh-bob { from { transform: translateY(-3px); } to { transform: translateY(3px); } }

/* Snow on the top edge of the footer */
.mzh-has-cap { position: relative; }
.mzh-snowcap {
  position: absolute; left: 0; right: 0; top: -12px; height: 34px; z-index: 5; pointer-events: none;
  background: url("snowcap-20261202a.svg") repeat-x 0 0 / 240px 34px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .12));
}

/* New Year countdown in the home hero */
.mzh-cd-wrap { position: absolute; left: 50%; top: 15%; transform: translateX(-50%); z-index: 125; pointer-events: none; }
.mzh-cd-card {
  text-align: center; color: #fff; padding: 16px 22px 14px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(70, 8, 14, .78), rgba(24, 0, 5, .7));
  border: 1px solid rgba(255, 213, 74, .55);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 12px 40px rgba(0, 0, 0, .35), 0 0 32px rgba(255, 196, 0, .25);
  font-family: inherit;
}
.mzh-cd-title { font-size: 15px; letter-spacing: .18em; text-transform: uppercase; color: #ffe9a8; margin-bottom: 8px; white-space: nowrap; }
.mzh-cd-title b { color: #ffd54a; font-weight: 800; }
.mzh-cd-grid { display: flex; gap: 10px; justify-content: center; }
.mzh-cd-cell { min-width: 74px; padding: 8px 6px 6px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 213, 74, .25); }
.mzh-cd-num {
  display: block; font-size: 44px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff8d6 0%, #ffd54a 55%, #f0a800 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 18px rgba(255, 200, 40, .35);
}
.mzh-cd-num.mzh-tick { animation: mzh-tick .45s ease-out; will-change: transform, opacity; }
@keyframes mzh-tick { 0% { transform: translateY(-6px) scale(1.08); opacity: .4; } 100% { transform: none; opacity: 1; } }
.mzh-cd-lbl { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }

.mzh-happy { display: flex; flex-direction: column; align-items: center; text-align: center; white-space: nowrap; }
.mzh-happy-small { font-size: 26px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff3c4; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.mzh-happy-year {
  font-size: 96px; line-height: 1; font-weight: 900;
  background: linear-gradient(180deg, #fff8d6 0%, #ffd54a 50%, #f0a800 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 196, 0, .45));
  animation: mzh-pulse 2.4s ease-in-out infinite; will-change: transform;
}
.mzh-happy-sub { margin-top: 6px; font-size: 15px; color: rgba(255, 255, 255, .85); }
@keyframes mzh-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* Countdown pill hanging from the lights (other pages) */
.mzh-pill {
  position: absolute; left: 50%; top: 26px; transform: translateX(-50%); pointer-events: auto;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 6px 8px 6px 14px; border-radius: 999px; font-size: 13px; line-height: 1.2; color: #fff;
  background: linear-gradient(135deg, rgba(40, 4, 10, .88), rgba(110, 16, 24, .88));
  border: 1px solid rgba(255, 213, 74, .6); box-shadow: 0 6px 20px rgba(0, 0, 0, .25), 0 0 16px rgba(255, 196, 0, .25);
  font-variant-numeric: tabular-nums; font-family: inherit;
}
.mzh-pill b { color: #ffd54a; }
.mzh-pill-x {
  width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer; line-height: 20px; padding: 0;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 14px;
}
.mzh-pill-x:hover { background: rgba(255, 255, 255, .3); }

@media (max-width: 1100px) {
  .mzh-tree { right: 20.4%; width: 6.4%; }
}
@media (max-width: 768px) {
  .mzh-tree { bottom: 68%; right: 19.5%; width: 7.6%; min-width: 26px; }
  .mzh-sky { height: 26%; }
  .mzh-sleigh { top: 30%; width: 140px; }
  .mzh-cd-wrap { top: 8.5%; }
  .mzh-cd-card { padding: 12px 12px 10px; border-radius: 18px; }
  .mzh-cd-title { font-size: 12px; margin-bottom: 6px; }
  .mzh-cd-grid { gap: 6px; }
  .mzh-cd-cell { min-width: 58px; padding: 6px 4px 5px; border-radius: 12px; }
  .mzh-cd-num { font-size: 30px; }
  .mzh-cd-lbl { font-size: 9px; }
  .mzh-happy-small { font-size: 18px; }
  .mzh-happy-year { font-size: 64px; }
  .mzh-happy-sub { font-size: 12px; }
  .mzh-pill { top: 22px; font-size: 12px; }
}

/* Small phones: the site raises the ground line to 78% */
@media (max-width: 480px) {
  .mzh-tree { bottom: 78%; right: 19.5%; width: 8%; }
  [data-holiday-hat] { --mzh-hat-y: -56%; }
}

/* Corporate style (business.marketsz.com, business accounts): no hats, navy and gold note */
html.mzh-corporate [data-holiday-hat]::after { display: none; }
html.mzh-corporate .mzh-pill {
  background: linear-gradient(135deg, rgba(11, 31, 51, .94), rgba(20, 44, 72, .94));
  border-color: rgba(212, 169, 76, .7); box-shadow: 0 6px 20px rgba(11, 31, 51, .25);
  font-weight: 500; letter-spacing: .01em;
}
html.mzh-corporate .mzh-pill b { color: #e8c26a; font-weight: 700; }
.mzh-flake { color: #e8c26a; margin-right: 2px; }

/* App pages (one page that changes without reloading): while the page is not part of the suite, e.g. admin
   pages, the script takes html.mzh-on off and everything it drew stays hidden. */
html:not(.mzh-on) .mzh-canvas, html:not(.mzh-on) .mzh-garland, html:not(.mzh-on) .mzh-hdr-tree { display: none !important; }

/* Small lit tree in the empty middle of the suite header (customer accounts, wide screens only) */
.mzh-hdr-tree {
  position: absolute; left: 50%; top: 50%; width: 31px; height: 42px; transform: translate(-50%, -54%);
  pointer-events: none;
}
.mzh-hdr-tree svg { display: block; width: 100%; height: auto; overflow: visible; }
.mzh-hdr-tree > svg { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .18)); }
html.mzh-corporate .mzh-hdr-tree { display: none; }
@media (max-width: 1023px) { .mzh-hdr-tree { display: none; } }

/* Hero scrolled out of view: its animations wait. */
.mzh-paused .mzh-sleigh, .mzh-paused .mzh-sleigh *, .mzh-paused .mzh-tree *, .mzh-paused .mzh-happy-year { animation-play-state: paused !important; }

/* Visitors who prefer less motion: everything stays, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  .mzh-halo, .mzh-tree *, .mzh-hdr-tree *, .mzh-sleigh, .mzh-sleigh *, .mzh-cd-num.mzh-tick, .mzh-happy-year { animation: none !important; }
}
