/* Times of Madeira - festive layer (see festive.js). Sits on top of the theme
   and changes none of its styles. */

.tom-fest-host { position: relative; }
[class^="tom-fest-"]:not(.tom-fest-host):not(.tom-fest-count) { pointer-events: none; }

/* Pine garland under the header */
.tom-fest-garland { position: absolute; left: 0; width: 100%; overflow: visible; z-index: 51; }
.tom-fest-garland--top { top: 56px; height: 52px; }

.tom-fest-bulb { animation: tom-twinkle var(--d, 4s) ease-in-out var(--dl, 0s) infinite; }
.tom-fest-halo { animation: tom-glow var(--d, 4s) ease-in-out var(--dl, 0s) infinite; }
@keyframes tom-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes tom-glow { 0%, 100% { opacity: .45; } 50% { opacity: .08; } }

/* Ornaments hanging from the garland */
.tom-fest-hang { position: absolute; top: 64px; z-index: 50; transform-origin: 50% 0; animation: tom-swing 5.5s ease-in-out infinite; }
.tom-fest-hang--1 { left: 5%; width: 44px; }
.tom-fest-hang--2 { left: 15%; width: 30px; animation-duration: 6.2s; animation-delay: -1.4s; }
.tom-fest-hang--3 { right: 15%; width: 36px; animation-duration: 4.8s; animation-delay: -2.6s; }
.tom-fest-hang--4 { right: 5%; top: 58px; width: 38px; animation-duration: 6.8s; animation-delay: -.8s; }
@keyframes tom-swing { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-4deg); } }

/* Snow over the masthead */
.tom-fest-snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero.tom-fest-host > .container { position: relative; z-index: 1; }

/* New Year countdown row (uses the theme's own .today__item styles) */
.tom-fest-count .today__value { font-variant-numeric: tabular-nums; font-weight: 500; }
.tom-fest-count .today__value b { font-weight: 600; color: #c91400; }

@media (max-width: 1023px) {
  .tom-fest-hang--2, .tom-fest-hang--3 { display: none; }
}
@media (max-width: 767px) {
  .tom-fest-hang--1 { left: 3%; width: 32px; }
  .tom-fest-hang--4 { right: 3%; width: 28px; }
  .tom-fest-count__tail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  [class^="tom-fest-"], [class^="tom-fest-"] * { animation: none !important; }
}
