/* Tema natalizio Nobilis. Attivo solo con body.nobilis-natale. */

body.nobilis-natale .nn-snow,
body.nobilis-natale .nn-hat,
body.nobilis-natale .nn-lights,
body.nobilis-natale .nn-garland {
  pointer-events: none;
  user-select: none;
}

body.nobilis-natale .nn-snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block;
}

/* Il riepilogo sticky della box resta sopra la neve, senza toccare nobilis-box. */
body.nobilis-natale-snow .nobilis-box-panel,
body.nobilis-natale-snow .nobilis-box-dock {
  z-index: 40;
}

body.nobilis-natale-hat header.site-header a.logo,
body.nobilis-natale-hat .nn-logo-slot {
  position: relative;
}

body.nobilis-natale-hat .nn-logo-slot {
  display: inline-block;
  line-height: 0;
  vertical-align: top;
  max-width: 100%;
}

body.nobilis-natale-hat .nn-logo-slot > img {
  max-width: none;
}

body.nobilis-natale-hat header.site-header a.logo img,
body.nobilis-natale-hat .nn-logo-slot > img {
  position: relative;
  z-index: 1;
}

body.nobilis-natale-hat .nn-hat {
  position: absolute;
  left: 50%;
  top: 9%;
  width: 36%;
  height: auto;
  z-index: 2;
  line-height: 0;
  transform: translate(-50%, -100%) rotate(-15deg);
  transform-origin: 50% 100%;
}

body.nobilis-natale-hat .nn-hat svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

body.nobilis-natale-hat .nn-hat.is-hidden {
  display: none;
}

body.nobilis-natale-lights .nn-lights {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 14px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-evenly;
  margin: 0;
  padding: 0 10px;
  box-sizing: border-box;
  overflow: hidden;
  transform: translateY(100%);
}

body.nobilis-natale-lights .nn-lights::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: #c8a24c;
  opacity: 0.9;
}

body.nobilis-natale-lights .nn-bulb {
  position: relative;
  flex: 0 0 8px;
  width: 8px;
  height: 13px;
  opacity: 0.92;
}

body.nobilis-natale-lights .nn-bulb svg {
  display: block;
  width: 8px;
  height: 13px;
}

body.nobilis-natale-garland .site-footer {
  position: relative;
}

body.nobilis-natale-garland .nn-garland {
  position: absolute;
  width: 84px;
  height: 32px;
  z-index: 0;
}

body.nobilis-natale-garland .nn-garland svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

body.nobilis-natale-garland .nn-garland-tl { top: 8px; left: 8px; }
body.nobilis-natale-garland .nn-garland-tr { top: 8px; right: 8px; transform: scaleX(-1); }
body.nobilis-natale-garland .nn-garland-bl { bottom: 4px; left: 8px; transform: scaleY(-1); }
body.nobilis-natale-garland .nn-garland-br { bottom: 4px; right: 8px; transform: scale(-1); }

body.nobilis-natale .nn-preview {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 70;
  margin: 0;
  padding: 6px 10px;
  max-width: calc(100% - 28px);
  border: 1px solid rgba(200, 162, 76, 0.55);
  border-radius: 2px;
  background: rgba(12, 14, 16, 0.9);
  color: #f3ede1;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  body.nobilis-natale-lights .nn-bulb {
    animation: nn-bulb-pulse 2.8s ease-in-out infinite;
  }

  body.nobilis-natale-lights .nn-bulb:nth-child(even) {
    animation-delay: -1.4s;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.nobilis-natale .nn-snow {
    display: none;
  }

  body.nobilis-natale-lights .nn-bulb {
    animation: none;
    opacity: 0.92;
  }
}

@keyframes nn-bulb-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
