/* ==========================================================================
   Sugarista Seasonal & Occasion Menu Themes
   Ultra-refined, poetic, zero-clutter themes for Light & Dark modes:
   - yalda (شب یلدا)
   - christmas (کریسمس و سال نو میلادی)
   - valentine (ولنتاین)
   - nowruz (عید نوروز و بهار)
   Default theme remains untouched when [data-seasonal-theme] is absent.
   ========================================================================== */

/* ── Ambient Top Occasion Ribbon (Slim, Poetic, Refined) ── */
.seasonal-ribbon {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.52rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.seasonal-ribbon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.16) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: seasonalRibbonSheen 7s ease-in-out infinite;
  pointer-events: none;
}

.seasonal-ribbon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.seasonal-ribbon-badge svg {
  display: block;
  width: 17px;
  height: 17px;
}

.seasonal-ribbon-copy {
  letter-spacing: -0.01em;
}

/* ── Bespoke Glassmorphic Brand Crest Pill inside Menu Header ── */
.seasonal-brand-crest {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.24rem 0.65rem;
  margin-bottom: 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
}

.seasonal-crest-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.seasonal-crest-emblem svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ── Subtle Fine-Line Corner Ornament on Header ── */
html[data-seasonal-theme] .menu-page-header {
  position: relative;
  overflow: hidden;
}

.seasonal-header-ornament {
  position: absolute;
  bottom: -6px;
  inset-inline-end: 14px;
  pointer-events: none;
  opacity: 0.13;
  color: var(--accent);
  z-index: 0;
}

html[data-seasonal-theme][data-theme="dark"] .seasonal-header-ornament {
  opacity: 0.18;
}

.seasonal-header-ornament svg {
  display: block;
  width: 170px;
  height: auto;
}

@media (max-width: 640px) {
  .seasonal-header-ornament svg {
    width: 120px;
  }
}

@keyframes seasonalRibbonSheen {
  0%, 60% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ── Subtle Ambient Particles Layer (CSS-only, zero JS loop, pointer-events: none) ── */
.seasonal-ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.seasonal-particle {
  position: absolute;
  top: -8%;
  opacity: 0;
  will-change: transform, opacity;
  user-select: none;
  animation-name: seasonalDriftDown;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes seasonalDriftDown {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: var(--sp-opacity, 0.55);
  }
  85% {
    opacity: var(--sp-opacity, 0.45);
  }
  100% {
    transform: translate3d(var(--sp-sway, 24px), 108vh, 0) rotate(220deg);
    opacity: 0;
  }
}

@keyframes seasonalFloatUp {
  0% {
    transform: translate3d(0, 105vh, 0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: var(--sp-opacity, 0.42);
  }
  85% {
    opacity: var(--sp-opacity, 0.35);
  }
  100% {
    transform: translate3d(var(--sp-sway, 18px), -8vh, 0) scale(1.1);
    opacity: 0;
  }
}

@keyframes seasonalTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.85); }
  50% { opacity: var(--sp-opacity, 0.65); transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .seasonal-ambient-layer,
  .seasonal-ribbon::after {
    display: none !important;
  }
}

/* ==========================================================================
   1. 🍉 SHAB-E YALDA (شب یلدا — Pomegranate Ruby, Warm Gold & Emerald)
   ========================================================================== */
html[data-seasonal-theme="yalda"] {
  --bg: #fcf6f5;
  --surface: #ffffff;
  --surface-soft: #f9ecea;
  --line: #eedad6;
  --line-strong: #dfc0ba;
  --primary: #6b1226;
  --accent: #be123c;
  --accent-strong: #9f1239;
  --accent-soft: rgba(190, 18, 60, 0.1);
  --accent-border: rgba(190, 18, 60, 0.28);
  --sticky-shell-bg: rgba(252, 246, 245, 0.9);
}

html[data-seasonal-theme="yalda"][data-theme="dark"] {
  --bg: #13090c;
  --surface: #1d0f14;
  --surface-soft: #27141b;
  --text: #fbf1f3;
  --muted: #c9a7b0;
  --line: #381d26;
  --line-strong: #4d2834;
  --primary: #e11d48;
  --accent: #fb7185;
  --accent-strong: #f43f5e;
  --accent-soft: rgba(251, 113, 133, 0.14);
  --accent-border: rgba(251, 113, 133, 0.34);
  --sticky-shell-bg: rgba(19, 9, 12, 0.9);
  --bar-bg: rgba(29, 15, 20, 0.95);
}

html[data-seasonal-theme="yalda"] .seasonal-ribbon {
  background: linear-gradient(90deg, #6b1226 0%, #9f1239 48%, #14532d 100%);
}

html[data-seasonal-theme="yalda"] .menu-page-header {
  background-image:
    radial-gradient(circle at 12% 18%, rgba(190, 18, 60, 0.11), transparent 46%),
    radial-gradient(circle at 88% 24%, rgba(217, 119, 6, 0.1), transparent 44%);
}

html[data-seasonal-theme="yalda"] .seasonal-particle {
  color: #be123c;
  animation-name: seasonalTwinkle;
  top: var(--sp-top, 12%);
}

html[data-seasonal-theme="yalda"][data-theme="dark"] .seasonal-particle {
  color: #fbbf24;
}

/* ==========================================================================
   2. 🎄 CHRISTMAS (کریسمس — Pine Evergreen, Winter Crimson & Champagne Gold)
   ========================================================================== */
html[data-seasonal-theme="christmas"] {
  --bg: #f5f8f6;
  --surface: #ffffff;
  --surface-soft: #eaf2ed;
  --line: #d6e4db;
  --line-strong: #bdd3c5;
  --primary: #14532d;
  --accent: #b91c1c;
  --accent-strong: #991b1b;
  --accent-soft: rgba(185, 28, 28, 0.1);
  --accent-border: rgba(185, 28, 28, 0.26);
  --sticky-shell-bg: rgba(245, 248, 246, 0.9);
}

html[data-seasonal-theme="christmas"][data-theme="dark"] {
  --bg: #08130f;
  --surface: #10201a;
  --surface-soft: #162b23;
  --text: #f0f9f5;
  --muted: #9ebdb0;
  --line: #213d32;
  --line-strong: #2d5345;
  --primary: #15803d;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-border: rgba(245, 158, 11, 0.34);
  --sticky-shell-bg: rgba(8, 19, 15, 0.9);
  --bar-bg: rgba(16, 32, 26, 0.95);
}

html[data-seasonal-theme="christmas"] .seasonal-ribbon {
  background: linear-gradient(90deg, #14532d 0%, #166534 46%, #991b1b 100%);
}

html[data-seasonal-theme="christmas"] .menu-page-header {
  background-image:
    radial-gradient(circle at 14% 20%, rgba(22, 101, 52, 0.11), transparent 45%),
    radial-gradient(circle at 86% 22%, rgba(202, 138, 4, 0.1), transparent 45%);
}

html[data-seasonal-theme="christmas"] .seasonal-particle {
  color: #94a3b8;
}

html[data-seasonal-theme="christmas"][data-theme="dark"] .seasonal-particle {
  color: #e2e8f0;
}

/* ==========================================================================
   3. 💝 VALENTINE (ولنتاین — Velvet Rose, Blush Silk & Rose Gold)
   ========================================================================== */
html[data-seasonal-theme="valentine"] {
  --bg: #fdf5f8;
  --surface: #ffffff;
  --surface-soft: #fae9ef;
  --line: #f2d5e0;
  --line-strong: #e5b8c9;
  --primary: #831843;
  --accent: #e11d48;
  --accent-strong: #be123c;
  --accent-soft: rgba(225, 29, 72, 0.1);
  --accent-border: rgba(225, 29, 72, 0.28);
  --sticky-shell-bg: rgba(253, 245, 248, 0.9);
}

html[data-seasonal-theme="valentine"][data-theme="dark"] {
  --bg: #160a10;
  --surface: #22101a;
  --surface-soft: #2e1523;
  --text: #fdf2f6;
  --muted: #d1a3b7;
  --line: #421f32;
  --line-strong: #592b44;
  --primary: #db2777;
  --accent: #fb7185;
  --accent-strong: #f43f5e;
  --accent-soft: rgba(251, 113, 133, 0.15);
  --accent-border: rgba(251, 113, 133, 0.34);
  --sticky-shell-bg: rgba(22, 10, 16, 0.9);
  --bar-bg: rgba(34, 16, 26, 0.95);
}

html[data-seasonal-theme="valentine"] .seasonal-ribbon {
  background: linear-gradient(90deg, #831843 0%, #be185d 52%, #e11d48 100%);
}

html[data-seasonal-theme="valentine"] .menu-page-header {
  background-image:
    radial-gradient(circle at 16% 18%, rgba(225, 29, 72, 0.11), transparent 46%),
    radial-gradient(circle at 84% 25%, rgba(219, 39, 119, 0.09), transparent 44%);
}

html[data-seasonal-theme="valentine"] .seasonal-particle {
  color: #f43f5e;
  animation-name: seasonalFloatUp;
}

/* ==========================================================================
   4. 🌸 NOWRUZ (عید نوروز — Persian Turquoise, Spring Sabzeh & Blossom Gold)
   ========================================================================== */
html[data-seasonal-theme="nowruz"] {
  --bg: #f3faf7;
  --surface: #ffffff;
  --surface-soft: #e6f4ee;
  --line: #cce7dc;
  --line-strong: #add8c7;
  --primary: #0f5f59;
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.11);
  --accent-border: rgba(13, 148, 136, 0.28);
  --sticky-shell-bg: rgba(243, 250, 247, 0.9);
}

html[data-seasonal-theme="nowruz"][data-theme="dark"] {
  --bg: #071514;
  --surface: #0e2321;
  --surface-soft: #14302d;
  --text: #effcf9;
  --muted: #93c5be;
  --line: #1d423e;
  --line-strong: #285a55;
  --primary: #0d9488;
  --accent: #2dd4bf;
  --accent-strong: #14b8a6;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --accent-border: rgba(45, 212, 191, 0.34);
  --sticky-shell-bg: rgba(7, 21, 20, 0.9);
  --bar-bg: rgba(14, 35, 33, 0.95);
}

html[data-seasonal-theme="nowruz"] .seasonal-ribbon {
  background: linear-gradient(90deg, #0f766e 0%, #0d9488 52%, #15803d 100%);
}

html[data-seasonal-theme="nowruz"] .menu-page-header {
  background-image:
    radial-gradient(circle at 14% 20%, rgba(13, 148, 136, 0.12), transparent 46%),
    radial-gradient(circle at 86% 24%, rgba(234, 179, 8, 0.11), transparent 44%);
}

html[data-seasonal-theme="nowruz"] .seasonal-particle {
  color: #f472b6;
}
