/* ============================================================
   Christmas Wonderland — snowy photo backdrop, frosted glass
   cards, centered brand crest.
   Every rule is scoped to [data-latoza-style="christmas_wonderland"]
   so Christmas Cheer / White Christmas stay exactly as they were.
   ============================================================ */

html[data-latoza-style="christmas_wonderland"] {
  --bg: #f4fafb;
  --border: rgba(255, 255, 255, .78);
  --shadow: 0 12px 32px rgba(45, 95, 99, .13);
  --shadow-md: 0 20px 48px rgba(45, 95, 99, .18);
  --card-alpha: .82;
  /* Corner snowflake for widgets/boxes — drawn as a background so no card
     needs position:relative (which would re-anchor absolutely placed children). */
  --cw-flake: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e9b9e' stroke-width='1.3' stroke-linecap='round' opacity='.4'%3E%3Cpath d='M12 2.5v19M4.2 7.2l15.6 9M19.8 7.2l-15.6 9'/%3E%3Cpath d='M12 6.6 9.7 4.3M12 6.6l2.3-2.3M12 17.4l-2.3 2.3M12 17.4l2.3 2.3'/%3E%3Cpath d='M7.4 9.4 4.6 8.9M7.4 9.4 6.9 6.6M16.6 14.6l2.8.5M16.6 14.6l.5 2.8'/%3E%3Cpath d='M16.6 9.4l2.8-.5M16.6 9.4 17.1 6.6M7.4 14.6l-2.8.5M7.4 14.6 6.9 17.4'/%3E%3C/svg%3E");
}

/* The shared cream watermark is replaced by the crest below. */
html[data-latoza-style="christmas_wonderland"] body::before {
  display: none;
}

/* ── Backdrop ─────────────────────────────────────────────── */
/* Login screens load this file but their <html> has no data-latoza-style,
   so the scoped rules never match; keep the decor hidden there. */
.latoza-cw {
  display: none;
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw-bg {
  position: absolute;
  inset: 0;
  /* Anchored low so the gifts, lantern and snowbank survive the cover crop. */
  background: url("../img/christmas-wonderland-bg.png?v=4") center 90% / cover no-repeat;
}
/* Wash over the photo so dark text and white cards stay readable. */
html[data-latoza-style="christmas_wonderland"] .latoza-cw-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  
}

/* ── Centered brand crest ─────────────────────────────────── */
/* Sits low enough to clear the stat cards / first content row on most pages. */
html[data-latoza-style="christmas_wonderland"] .latoza-cw-crest {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%);
  width: min(74vw, 560px);
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
/* watermark.png is cream, so it is used as a mask to tint it teal. */
html[data-latoza-style="christmas_wonderland"] .latoza-cw-crest-logo {
  width: 100%;
  height: min(17vh, 124px);
  background: linear-gradient(180deg, #4d8e94, #2d5f63);
  -webkit-mask: url("../latozamark.png") center center / contain no-repeat;
  mask: url("../latozamark.png") center center / contain no-repeat;
  opacity: .88;
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw-greet {
  font-family: 'Great Vibes', 'Mountains of Christmas', cursive;
  font-size: clamp(24px, 4.4vw, 50px);
  line-height: 1.08;
  color: #2d5f63;
  opacity: .82;
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw-tag {
  font-size: clamp(8px, 1.05vw, 11px);
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #46666b;
  opacity: .68;
}

/* ── Falling snow ─────────────────────────────────────────── */
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow {
  position: absolute;
  inset: 0;
}
/* Six-pointed snowflake glyphs rather than plain dots. */
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span {
  position: absolute;
  top: -8vh;
  font-size: 16px;
  line-height: 1;
   /* Teal base: plain white flakes disappear against the bright snow photo. */
  color: rgba(94, 155, 158, .62);
  text-shadow: 0 1px 2px rgba(255, 255, 255, .85);
  animation-name: latozaCwFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
/* Alternate teal with warm gold for a festive two-tone snowfall. */
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(even) {
  color: rgba(210, 166, 67, .78);
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span::before {
  content: "\2744";
  display: block;
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(3n)::before  { content: "\2745"; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(4n)::before  { content: "\2746"; }
@keyframes latozaCwFall {
  0%   { transform: translate3d(0, -8vh, 0) rotate(0deg); opacity: 0; }
  12%  { opacity: .92; }
  100% { transform: translate3d(32px, 108vh, 0) rotate(300deg); opacity: .12; }
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(1)  { left: 4%;  animation-duration: 14s; animation-delay: 0s;    font-size: 33px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(2)  { left: 11%; animation-duration: 18s; animation-delay: 2.4s;  font-size: 21px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(3)  { left: 18%; animation-duration: 11s; animation-delay: 5.1s;  font-size: 37px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(4)  { left: 25%; animation-duration: 16s; animation-delay: 1.2s;  font-size: 31px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(5)  { left: 32%; animation-duration: 13s; animation-delay: 7.6s;  font-size: 32px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(6)  { left: 39%; animation-duration: 20s; animation-delay: 3.8s;  font-size: 25px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(7)  { left: 46%; animation-duration: 15s; animation-delay: 9.2s;  font-size: 31px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(8)  { left: 53%; animation-duration: 12s; animation-delay: 0.7s;  font-size: 29px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(9)  { left: 60%; animation-duration: 17s; animation-delay: 6.3s;  font-size: 34px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(10) { left: 67%; animation-duration: 13s; animation-delay: 4.5s;  font-size: 22px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(11) { left: 74%; animation-duration: 19s; animation-delay: 8.1s;  font-size: 36px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(12) { left: 81%; animation-duration: 14s; animation-delay: 2.9s;  font-size: 28px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(13) { left: 88%; animation-duration: 16s; animation-delay: 5.7s;  font-size: 31px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(14) { left: 95%; animation-duration: 12s; animation-delay: 10.4s; font-size: 25px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(15) { left: 8%;  animation-duration: 21s; animation-delay: 11.8s; font-size: 32px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(16) { left: 29%; animation-duration: 18s; animation-delay: 13.2s; font-size: 24px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(17) { left: 57%; animation-duration: 22s; animation-delay: 12.5s; font-size: 31px; }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow span:nth-child(18) { left: 78%; animation-duration: 15s; animation-delay: 14.9s; font-size: 30px; }

/* ── Falling candy canes ──────────────────────────────────── */
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy {
  position: absolute;
  inset: 0;
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span {
  position: absolute;
  top: -8vh;
  width: 56px;
  height: 56px;
  background: url("../candycane.png") center / contain no-repeat;
  opacity: .85;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, .6));
  animation-name: latozaCwCandyFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes latozaCwCandyFall {
  0%   { transform: translate3d(0, -8vh, 0) rotate(-20deg); opacity: 0; }
  12%  { opacity: .88; }
  100% { transform: translate3d(-20px, 108vh, 0) rotate(220deg); opacity: .15; }
}
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span:nth-child(1) { left: 9%;  width: 41px; height: 41px; animation-duration: 19s; animation-delay: 0.5s;  }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span:nth-child(2) { left: 22%; width: 35px; height: 45px; animation-duration: 15s; animation-delay: 6.2s;  }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span:nth-child(3) { left: 36%; width: 32px; height: 42px; animation-duration: 21s; animation-delay: 3.1s;  }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span:nth-child(4) { left: 48%; width: 34px; height: 44px; animation-duration: 17s; animation-delay: 9.4s;  }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span:nth-child(5) { left: 63%; width: 31px; height: 41px; animation-duration: 20s; animation-delay: 1.8s;  }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span:nth-child(6) { left: 74%; width: 36px; height: 46px; animation-duration: 16s; animation-delay: 7.6s;  }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span:nth-child(7) { left: 87%; width: 32px; height: 42px; animation-duration: 22s; animation-delay: 4.9s;  }
html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy span:nth-child(8) { left: 16%; width: 33px; height: 43px; animation-duration: 18s; animation-delay: 11.3s; }

/* Dim slightly with everything else in dark mode instead of hiding it */
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .latoza-cw-candy span {
  opacity: .7;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)) brightness(1.05);
}

/* ── Frosted glass surfaces ───────────────────────────────── */
html[data-latoza-style="christmas_wonderland"] .card,
html[data-latoza-style="christmas_wonderland"] .nav-card,
html[data-latoza-style="christmas_wonderland"] .stat-card {
  background: var(--cw-flake) right 11px top 10px / 19px 19px no-repeat,
              rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  backdrop-filter: blur(12px) saturate(1.05);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 12px 32px rgba(45, 95, 99, .13);
}
html[data-latoza-style="christmas_wonderland"] .table-wrapper {
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, .8);
}
/* Cards nested inside an already-frosted card should not stack blur. */
html[data-latoza-style="christmas_wonderland"] .card .card,
html[data-latoza-style="christmas_wonderland"] .card .stat-card {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(255, 255, 255, .72);
}

/* ── Dark mode: dim the snow scene instead of fighting it ─── */
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .latoza-cw-bg::after {
  background: linear-gradient(180deg, rgba(11, 15, 20, .72), rgba(11, 15, 20, .8));
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .latoza-cw-crest-logo {
  background: linear-gradient(180deg, #cfe8ea, #7fb8bc);
  opacity: .5;
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .latoza-cw-greet {
  color: #a2d2d6;
  opacity: .6;
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .latoza-cw-tag {
  color: #9aa4af;
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .latoza-cw-snow span {
  color: rgba(255, 255, 255, .7);
  text-shadow: none;
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .latoza-cw-snow span:nth-child(odd) {
  color: rgba(126, 190, 192, .78);
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .latoza-cw-snow span:nth-child(even) {
  color: rgba(235, 193, 92, .88);
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] {
  --cw-flake: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a2d2d6' stroke-width='1.3' stroke-linecap='round' opacity='.45'%3E%3Cpath d='M12 2.5v19M4.2 7.2l15.6 9M19.8 7.2l-15.6 9'/%3E%3Cpath d='M12 6.6 9.7 4.3M12 6.6l2.3-2.3M12 17.4l-2.3 2.3M12 17.4l2.3 2.3'/%3E%3Cpath d='M7.4 9.4 4.6 8.9M7.4 9.4 6.9 6.6M16.6 14.6l2.8.5M16.6 14.6l.5 2.8'/%3E%3Cpath d='M16.6 9.4l2.8-.5M16.6 9.4 17.1 6.6M7.4 14.6l-2.8.5M7.4 14.6 6.9 17.4'/%3E%3C/svg%3E");
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .card,
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .nav-card,
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .stat-card {
  background: var(--cw-flake) right 11px top 10px / 19px 19px no-repeat,
              rgba(22, 27, 34, .82);
  border-color: rgba(127, 184, 188, .22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
html[data-latoza-style="christmas_wonderland"][data-theme="dark"] .table-wrapper {
  background: rgba(22, 27, 34, .78);
  border-color: rgba(127, 184, 188, .2);
}

/* ── Small screens: crest would crowd the content ─────────── */
@media (max-width: 700px) {
  html[data-latoza-style="christmas_wonderland"] .latoza-cw-crest {
    top: 38%;
    width: 86vw;
  }
  html[data-latoza-style="christmas_wonderland"] .latoza-cw-crest-logo {
    height: 84px;
  }
  html[data-latoza-style="christmas_wonderland"] .latoza-cw-tag {
    letter-spacing: .18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-latoza-style="christmas_wonderland"] .latoza-cw-snow,
  html[data-latoza-style="christmas_wonderland"] .latoza-cw-candy {
    display: none;
  }
}

@media print {
  html[data-latoza-style="christmas_wonderland"] .latoza-cw {
    display: none;
  }
  html[data-latoza-style="christmas_wonderland"] .card,
  html[data-latoza-style="christmas_wonderland"] .nav-card,
  html[data-latoza-style="christmas_wonderland"] .stat-card,
  html[data-latoza-style="christmas_wonderland"] .table-wrapper {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}