/* Scene e rotazione */
[data-christmas-backdrop] {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #12251c;
}

[data-christmas-backdrop]::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(10 23 17 / 48%) 0%, rgb(10 23 17 / 76%) 34%, rgb(10 23 17 / 24%) 54%, transparent 64%),
    linear-gradient(0deg, rgb(10 23 17 / 60%) 0%, transparent 25%);
  pointer-events: none;
}

[data-christmas-scene] {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: #12251c;
  animation: hp-christmas-slideshow 24s linear infinite both;
}

[data-christmas-scene]:first-child {
  animation-delay: -1.2s;
}

[data-christmas-scene]:nth-child(2) {
  background: #351314;
  animation-delay: 4.8s;
}

[data-christmas-scene]:nth-child(3) {
  animation-delay: 10.8s;
}

[data-christmas-scene="labelled-products"] {
  background: linear-gradient(90deg, #12251c 35%, #351314);
  animation-delay: 16.8s;
}

[data-christmas-scene] > div {
  position: absolute;
  inset: 0;
}

[data-christmas-scene] > div img {
  object-fit: cover;
  object-position: center 62%;
}

[data-christmas-scene]:first-child img {
  object-position: left 65%;
}

@keyframes hp-christmas-slideshow {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  5% {
    opacity: 1;
  }
  25% {
    opacity: 1;
  }
  30%, 100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

@media (min-width: 761px) {
  [data-christmas-scene="labelled-products"] > div {
    inset: auto auto 0 0;
    width: 73%;
    max-height: 100%;
    aspect-ratio: 3 / 2;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 90%, transparent),
      linear-gradient(180deg, transparent, #000 12%);
    mask-composite: intersect;
  }
}

@media (max-width: 760px) {
  [data-christmas-backdrop]::after {
    background: linear-gradient(
      180deg,
      rgb(10 23 17 / 24%) 0%,
      transparent 47%,
      transparent 78%,
      rgb(10 23 17 / 45%) 100%
    );
  }

  [data-christmas-scene] > div {
    inset: clamp(275px, 39svh, 390px) 0 auto;
    height: clamp(255px, 44svh, 425px);
    mask-image: linear-gradient(180deg, transparent, #000 14%, #000 88%, transparent);
  }

  [data-christmas-scene]:first-child img {
    object-position: left 62%;
  }

  [data-christmas-scene]:nth-child(2) img {
    object-position: 82% 60%;
  }

  [data-christmas-scene]:nth-child(3) img {
    object-position: 72% 64%;
  }

  [data-christmas-scene="labelled-products"] > div img {
    object-position: 91% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) [data-christmas-scene] {
    animation: none;
  }

  html:not([data-motion="full"]) [data-christmas-scene]:first-child {
    opacity: 1;
  }
}

/* Palette della hero */
[data-event-hero="christmas"] {
  --christmas-fir: #163b2b;
  --christmas-wine: #781e31;
  --christmas-gold: var(--christmas-gold-on-dark);
  --christmas-ivory: #fff6e1;
  --christmas-foil: linear-gradient(115deg, #f8d478 5%, #fff5cf 36%, #ffe7a3 66%, #f6ce73 100%);
  background: #12251c;
}

[data-event-hero="christmas"] > [data-hero-artwork]::after {
  content: none;
}

[data-event-hero="christmas"] #hero-title > span,
[data-event-hero="christmas"] [data-hero-kicker] {
  color: var(--christmas-ivory);
  text-shadow: 0 2px 18px rgb(7 20 13 / 75%);
}

[data-event-hero="christmas"] [data-hero-kicker] {
  color: var(--christmas-gold);
  text-shadow: 0 1px 3px #0a1711, 0 2px 12px #0a1711;
}

[data-event-hero="christmas"] [data-hero-kicker]::before,
[data-event-hero="christmas"] #hero-title b,
[data-event-hero="christmas"] #hero-title b::after {
  background-image: var(--christmas-foil);
}

[data-event-hero="christmas"] #hero-title b {
  text-shadow: none;
  filter: drop-shadow(0 2px 2px rgb(10 23 17 / 90%));
}

[data-event-hero="christmas"] [data-hero-actions] > a {
  background-image: linear-gradient(105deg, #9d2940 0%, #791f31 45%, #5f1323 100%);
  border-color: rgb(243 212 140 / 58%) !important;
  color: var(--christmas-ivory);
  box-shadow: 0 14px 32px rgb(20 9 10 / 44%), 0 0 0 5px rgb(243 212 140 / 16%) !important;
}

[data-event-hero="christmas"] [data-hero-actions] > a::after {
  background: conic-gradient(
    from calc(var(--hero-light-angle) + 120deg),
    transparent 0deg 288deg,
    rgb(244 213 151 / 28%) 302deg,
    #e6b860 316deg,
    #fff0be 330deg,
    #f3d48c 344deg,
    transparent 356deg
  );
  filter: drop-shadow(0 0 6px rgb(240 199 114 / 72%));
}

[data-event-hero="christmas"] [data-hero-actions] > a:is(:hover, :focus-visible) {
  box-shadow: 0 16px 36px rgb(20 9 10 / 50%), 0 0 0 6px rgb(243 212 140 / 29%) !important;
}

[data-event-hero="christmas"] :is([data-hero-actions] > a, [data-hero-promo]):focus-visible {
  outline: 2px solid var(--christmas-gold);
  outline-offset: 5px;
}

[data-event-hero="christmas"] [data-hero-promo] {
  background: linear-gradient(115deg, #fff6df, #e8d4a8);
  border-color: #f3d48c;
  color: var(--christmas-fir);
  box-shadow: 0 12px 28px rgb(15 25 18 / 42%), 0 0 0 4px rgb(243 212 140 / 18%);
}

@media (max-width: 480px) {
  [data-event-hero="christmas"] [data-hero-promo] {
    margin-block-start: calc(var(--navbar-garland-height) - 10px);
  }
}

[data-event-hero="christmas"] [data-hero-promo] strong,
[data-event-hero="christmas"] [data-hero-promo-part="hint"] {
  color: var(--christmas-wine);
}

[data-event-hero="christmas"] [data-hero-promo] strong + span {
  color: var(--christmas-fir);
}

[data-event-hero="christmas"] [data-hero-promo-part="icon"] {
  background: linear-gradient(135deg, #a4384c, #671728);
  color: var(--christmas-ivory);
  box-shadow: 0 5px 14px rgb(74 14 27 / 30%);
}

[data-event-hero="christmas"] [data-hero-promo-part="icon"] svg {
  filter: drop-shadow(0 3px 6px rgb(74 14 27 / 28%));
}

[data-event-hero="christmas"] [data-hero-promo-part="icon"]::after {
  background: #fff1c4;
  box-shadow: 0 0 8px 2px #f3d48c, 0 0 14px 4px rgb(243 212 140 / 53%);
}

[data-event-hero="christmas"] [data-norah-collapse-boundary] {
  background: #f6ecd4;
  border-color: #caa866;
  color: var(--christmas-fir);
}

[data-event-hero="christmas"] [data-norah-collapse-boundary] p {
  color: #435546;
}

[data-event-hero="christmas"] [data-norah-collapse-boundary] article:nth-child(n) > span {
  color: var(--christmas-fir);
  border-color: #c6cbb1;
  background: #e8ebd9;
  box-shadow: 0 5px 14px rgb(29 51 37 / 12%);
}

[data-event-hero="christmas"] [data-norah-collapse-boundary] article:nth-child(even) > span {
  color: var(--christmas-wine);
  border-color: #e4c7bd;
  background: #f9e7dc;
}

[data-event-hero="christmas"] [data-reviews-version] {
  background: #eadab8;
}

[data-event-hero="christmas"] [data-reviews-version] article,
[data-event-hero="christmas"] [data-reviews-version] > a {
  border-color: #f4e5c3;
  background: #fffaec;
}

[data-event-hero="christmas"] [data-reviews-version] :is(strong, time, button) {
  color: var(--christmas-fir);
}

/* Norah's hero card is portalled to the body. The docked and expanded views
   use their standard presentation. */
body:has([data-event-hero="christmas"]) [data-norah-hero-card] {
  --christmas-fir: #163b2b;
  --christmas-wine: #781e31;
  --norah-hat-width: clamp(96px, 10vw, 144px);
  --norah-hat-overhang: calc(var(--norah-hat-width) * 0.27);
  margin-inline-end: var(--norah-hat-overhang);
  overflow: visible;
  color: var(--christmas-fir);
  border-color: #d9ad61;
  background:
    radial-gradient(circle at 95% 0%, #f7dfc8, transparent 52%),
    linear-gradient(150deg, #fffaf0, #f3e5c9);
  box-shadow: 0 23px 58px rgb(9 26 17 / 48%), 0 0 0 3px rgb(243 212 140 / 18%), inset 0 1px 0 #fff8e5;
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card]::before {
  content: none;
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card]::after {
  inset: auto calc(-1 * var(--norah-hat-overhang)) calc(100% - var(--norah-hat-width) * 0.18 - 3px) auto;
  z-index: 3;
  width: var(--norah-hat-width);
  aspect-ratio: 3 / 2;
  border-radius: 0;
  background: url("/images/event-themes/christmas/santa-hat.webp") center / contain no-repeat;
  filter: drop-shadow(0 3px 3px rgb(47 15 19 / 38%));
  opacity: 1;
  rotate: 24deg;
  transform-origin: bottom center;
}

@media (min-width: 761px) {
  [data-event-hero="christmas"] #norah-hero-slot {
    min-height: var(--norah-hero-content-height, 510px);
  }

  html[data-event-palette="christmas"] body:has([data-event-hero="christmas"]) [data-norah-hero-card] {
    /* NorahExperience reserves this height in the hero slot, above the pluses. */
    top: var(--norah-hero-top, 140px);
    height: auto;
    translate: none;
  }
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card]
  :is(h2, p:has(+ div [data-category]), [data-category] > span, section a, textarea) {
  color: var(--christmas-fir);
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] small,
body:has([data-event-hero="christmas"]) [data-norah-hero-card] textarea::placeholder {
  color: #4b6352;
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] > header {
  padding: 5px 10px;
  margin-bottom: 5px;
  border: 1px solid #d9ad61;
  border-radius: 13px;
  background:
    repeating-linear-gradient(135deg, transparent 0 7px, rgb(255 231 163 / 9%) 7px 8px, transparent 8px 12px) right / 29% 100% no-repeat,
    linear-gradient(115deg, #61182b, #872b42 70%, #5f1729);
  box-shadow: inset 0 1px 0 rgb(255 231 163 / 31%);
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] > header strong {
  color: #fff8e7;
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] > header small {
  color: #ffe6a8;
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] > header > span:not([data-norah-state]) {
  color: #214631;
  border-color: #e4bb6f;
  background: #fff2d5;
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] section a > span:first-child {
  background: var(--christmas-fir);
  color: #fff6e1;
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] [data-analytics-label="norah_configurator"] > span:first-child {
  background: var(--christmas-wine);
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] form:has(#norah-chat-message) {
  border-color: #c9aa71;
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgb(173 139 72 / 12%);
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] form button[type="submit"] {
  background: linear-gradient(135deg, #9c344a, var(--christmas-wine));
}

body:has([data-event-hero="christmas"]) [data-norah-hero-card] form button[aria-pressed="false"] {
  color: var(--christmas-fir);
  border-color: #c9c6a4;
  background: #eeebd5;
  box-shadow: none;
}

@media (max-width: 760px) {
  body:has([data-event-hero="christmas"]) [data-norah-hero-card] {
    right: max(calc((100% - 364px) / 2), calc(var(--norah-hat-overhang) + 6px));
    left: auto;
    width: min(364px, calc(100% - var(--norah-hat-overhang) - 16px));
    margin-inline-end: 0;
    translate: none;
  }

  body:has([data-event-hero="christmas"]) [data-norah-hero-card] > header {
    padding-inline: 6px;
  }

  body:has([data-event-hero="christmas"]) [data-norah-hero-card] > header small {
    white-space: normal;
  }
}
