/*
 * Seasonal Decorations (inc/seasonal.php). Loaded only while a theme is
 * active. The art itself (garland tile, logo accent) is printed inline for
 * the active theme only. Everything here is absolutely positioned inside the
 * header or one small line under it, ignores pointer events, and adds no
 * height to the header, so nothing moves.
 */

/* Cached page outlived its window (checked in <head> before first paint). */
html.tht-season-expired .tht-season-deco,
html.tht-season-expired .tht-season-greeting {
  display: none !important;
}

html.tht-season-expired .site-logo::after,
html.tht-season-expired .site-title::after {
  content: none !important;
}

/* The header is the positioning parent only while it sits in normal flow. */
.tht-season .site-header:not(.is-pinned) {
  position: relative;
}

.tht-season-deco {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

/* The slide-back (pinned) header stays exactly as it was. */
.site-header.is-pinned > .tht-season-deco,
.site-header.is-pinned .site-logo::after,
.site-header.is-pinned .site-title::after {
  display: none;
}

/* Garland: hangs from the header's bottom edge into its existing bottom margin. */
.tht-season-garland {
  background-position: left top;
  background-repeat: repeat-x;
  display: block;
  left: 0;
  margin-top: -1px;
  position: absolute;
  right: 0;
  top: 100%;
}

/* Small accent beside the logo. */
.tht-season .site-logo,
.tht-season .site-title {
  position: relative;
}

.tht-season .site-logo::after,
.tht-season .site-title::after {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  left: 100%;
  pointer-events: none;
  position: absolute;
}

/* Optional gentle snowfall: a few CSS flakes, header only, transform animation only. */
.tht-season-snow {
  inset: 0;
  overflow: hidden;
  position: absolute;
}

.tht-season-snow i {
  animation: tht-season-fall 12s linear infinite;
  background: #b9d6ee;
  border-radius: 50%;
  display: block;
  height: 4px;
  opacity: 0.85;
  position: absolute;
  top: -6px;
  width: 4px;
}

.tht-season-snow i:nth-child(3n) {
  height: 3px;
  width: 3px;
}

@keyframes tht-season-fall {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(18px, 190px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tht-season-snow {
    display: none;
  }
}

/* One small line under the header. */
.tht-season-greeting {
  color: var(--tht-season-tone, #444444);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.4;
  margin: 0;
  padding: 0.3rem var(--tht-pad, 40px) 0.2rem;
  text-align: center;
}

.tht-season-greeting a {
  color: inherit;
  text-decoration: underline;
}

.tht-season-note {
  color: #444444;
  font-style: italic;
}

@media print {
  .tht-season-deco,
  .tht-season-greeting,
  .tht-season .site-logo::after,
  .tht-season .site-title::after {
    display: none !important;
  }
}
