/* Light decoration above opaque sections, without intercepting clicks. */
body.christmas-theme.christmas-campaigns {
  isolation: isolate;
}

/* Original courtyard artwork; keeps its decoration at the edges of the board. */
body.christmas-theme.christmas-campaigns::after {
  content: "";
  position: fixed;
  inset: -3%;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 7, 11, .2), rgba(5, 7, 11, .05) 55%, rgba(5, 7, 11, .3)),
    url('../img/christmas-courtyard-v1.jpg') right center / cover no-repeat;
  animation: upskins-christmas-courtyard 42s ease-in-out infinite alternate;
}

.christmas-campaigns.christmas-theme :is(.campaign-page, .campaign-intro, .campaign-list) {
  background: transparent;
}

@keyframes upskins-christmas-courtyard {
  from { transform: scale(1.015) translate3d(-.35%, 0, 0); }
  to { transform: scale(1.04) translate3d(.35%, -.45%, 0); }
}

.christmas-snow {
  position: fixed;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
}

.christmas-snow > span {
  position: absolute;
  top: -12px;
  left: var(--snow-x);
  width: var(--snow-size);
  height: var(--snow-size);
  border-radius: 50%;
  background: #e9f4ff;
  opacity: var(--snow-opacity);
  animation: upskins-christmas-snow var(--snow-duration) var(--snow-delay) linear infinite;
}

@keyframes upskins-christmas-snow {
  from { transform: translate3d(0, -12px, 0); }
  to { transform: translate3d(var(--snow-drift), calc(100vh + 24px), 0); }
}

.christmas-theme :is(.brand, .auth-brand, .auth-mobile-logo, .payment-brand):has(.brand-wordmark-img) {
  position: relative;
  overflow: visible;
}

.christmas-theme :is(.brand, .auth-brand, .auth-mobile-logo, .payment-brand):has(.brand-wordmark-img)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -32%;
  left: 32%;
  width: 24%;
  max-width: 44px;
  aspect-ratio: 96 / 80;
  background: url('../img/christmas-hat.svg') center / contain no-repeat;
  transform: rotate(-16deg);
  transform-origin: 50% 85%;
  pointer-events: none;
}

@media (max-width: 640px) {
  body.christmas-theme.christmas-campaigns::after {
    background-position: center, right center;
    animation: none;
  }
  .christmas-snow > span:nth-child(n + 11) { display: none; }
  .christmas-snow > span { opacity: calc(var(--snow-opacity) * .8); }
}

/* Snow was explicitly requested even with reduced motion. The public stylesheet
   forces every animation to .01ms !important; retain only this effect's slow fall. */
@media (prefers-reduced-motion: reduce) {
  body.christmas-theme.christmas-campaigns::after {
    animation: none !important;
  }
  .christmas-snow > span {
    animation-duration: var(--snow-duration) !important;
  }
}

@media print {
  body.christmas-theme.christmas-campaigns::after,
  .christmas-snow,
  .christmas-theme :is(.brand, .auth-brand, .auth-mobile-logo, .payment-brand)::after { display: none; }
}
