/* === XPDevs seasonal theme ===
   Only applies between 1 December and 30 December.
   assets/js/seasonal.js adds .seasonal-theme to <html> while that window is open. */

html.seasonal-theme {
  --seasonal-bar-h: 40px;
  --festive-accent: #b3263c;
  --festive-green: #0f6b45;
  --festive-gold: #c99a2e;
  --festive-cream: #fdf6ec;
}

/* --- Light mode palette --- */
html.seasonal-theme body {
  --bg: #fffaf4;
  --text: #221b16;
  --sidebar: #f5ede2;
  --content-bg: #fffdfa;
  --input-bg: #f5ede2;
  --border: #e7d9c7;
  --primary: #0f6b45;
  --user-msg-bg: #f5ede2;
  --active-item: #efe2cf;
  --modal-bg: #fffdfa;
}

/* --- Dark mode palette (body.dark is set by the site's own theme switcher) --- */
html.seasonal-theme body.dark {
  --bg: #0d1411;
  --text: #e9e3da;
  --sidebar: #14201a;
  --content-bg: #101815;
  --input-bg: #14201a;
  --border: #2b3a31;
  --primary: #4fb484;
  --user-msg-bg: #1a2620;
  --active-item: #1f2d25;
  --modal-bg: #14201a;
}

/* --- Bar at the very top of the site --- */
.seasonal-bar { display: none; }

html.seasonal-theme .seasonal-bar {
  position: sticky;
  top: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--seasonal-bar-h);
  padding: 0 44px 0 16px;
  overflow: hidden;
  background: linear-gradient(100deg, #0e3f2b 0%, #12513a 62%, #7d1f2d 100%);
  color: var(--festive-cream);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* thin festive rule along the bottom of the bar */
html.seasonal-theme .seasonal-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--festive-accent), var(--festive-gold), #2f7d52, var(--festive-accent));
  opacity: 0.85;
}

html.seasonal-theme .seasonal-bar-art {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

html.seasonal-theme .seasonal-bar-art svg {
  width: 18px;
  height: 18px;
  display: block;
}

html.seasonal-theme .seasonal-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

html.seasonal-theme .seasonal-bar-link {
  color: var(--festive-cream);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(253, 246, 236, 0.14);
  font-weight: 500;
  transition: background 0.2s ease;
}

html.seasonal-theme .seasonal-bar-link:hover {
  background: rgba(253, 246, 236, 0.26);
  text-decoration: none;
}

html.seasonal-theme .seasonal-bar-link:focus-visible,
html.seasonal-theme .seasonal-bar-close:focus-visible {
  outline: 2px solid var(--festive-cream);
  outline-offset: 2px;
}

html.seasonal-theme .seasonal-bar-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-circle);
  background: transparent;
  color: var(--festive-cream);
  opacity: 0.65;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.2s ease, background 0.2s ease;
}

html.seasonal-theme .seasonal-bar-close:hover {
  opacity: 1;
  background: rgba(253, 246, 236, 0.16);
}

/* keep the site's sticky nav clear of the bar */
html.seasonal-theme .topbar { top: var(--seasonal-bar-h); }

/* --- Seasonal touches to the rest of the site --- */
html.seasonal-theme .hero-center {
  background: radial-gradient(120% 90% at 50% 0%, rgba(179, 38, 60, 0.07), transparent 65%);
}

html.seasonal-theme body.dark .hero-center {
  background: radial-gradient(120% 90% at 50% 0%, rgba(201, 154, 46, 0.09), transparent 65%);
}

html.seasonal-theme .card,
html.seasonal-theme .feature-card {
  border-color: var(--border);
}

html.seasonal-theme .site-footer {
  background: var(--sidebar);
}

/* --- Christmas note page --- */
.seasonal-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--festive-accent);
}

html.seasonal-theme body.dark .seasonal-eyebrow {
  color: var(--festive-gold);
}

.seasonal-page .hero-center {
  padding-bottom: 24px;
}

.seasonal-lede {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text);
  opacity: 0.72;
  font-size: 15px;
  line-height: 1.6;
}

.seasonal-card {
  max-width: 700px;
  margin: 0 auto;
  padding: 32px;
  border-top: 3px solid var(--festive-accent);
}

.seasonal-greeting {
  margin: 0 0 18px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.seasonal-card p {
  margin: 0 0 16px;
  line-height: 1.7;
  font-size: 15px;
}

.seasonal-sign {
  margin: 22px 0 0 !important;
  font-weight: 600;
  opacity: 0.85;
}

.seasonal-foot {
  margin: 18px 0 0 !important;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px !important;
  line-height: 1.6;
  opacity: 0.6;
}

.seasonal-card-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.seasonal-lock-art {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--primary);
}

.seasonal-lock-art svg {
  width: 40px;
  height: 40px;
}

.seasonal-card h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  text-align: center;
}

.seasonal-lock-status {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.7;
}

.seasonal-lock-status strong {
  font-weight: 600;
  color: var(--festive-accent);
}

html.seasonal-theme body.dark .seasonal-lock-status strong {
  color: var(--festive-gold);
}

/* --- Small screens --- */
@media (max-width: 768px) {
  html.seasonal-theme {
    --seasonal-bar-h: 36px;
  }

  html.seasonal-theme .seasonal-bar {
    font-size: 12px;
    gap: 8px;
    padding: 0 40px 0 12px;
  }

  html.seasonal-theme .seasonal-bar-art svg {
    width: 16px;
    height: 16px;
  }

  html.seasonal-theme .seasonal-bar-link {
    padding: 3px 8px;
  }

  .seasonal-card {
    padding: 24px 20px;
  }
}

@media (max-width: 420px) {
  html.seasonal-theme .seasonal-bar-link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.seasonal-theme .seasonal-bar-link,
  html.seasonal-theme .seasonal-bar-close {
    transition: none;
  }
}
