/* ============================================================
   Diwali — Festival of Lights (Deepavali)

   Celebrating the victory of light over darkness, knowledge over
   ignorance, and good over evil. Warm, elegant, and professional
   with refined diyas, rangoli, lanterns, and tasteful fireworks.
   ============================================================ */

body[data-bg=default].cl-festival-diwali {
  /* Diwali in golden hour: rich marigold, saffron and rose on warm ivory. */
  --cl-primary-color: #b45309;
  --cl-primary-color-darken-5: #92400e;
  --cl-primary-link-color: #9a3412;
  --plyr-color-main: #b45309;

  --cl-primary-bg-color: #fff8f0;
  --cl-primary-bg-color-opacity: rgba(255, 248, 240, 0.88);
  --cl-secondary-bg-color: #fff8f0;
  --cl-primary-border-color: #f3e2c8;
  --cl-secondary-border-color: #ecd6a8;
  --cl-primary-text-color: #2b1d0e;
  --cl-secondary-text-color: #7c674d;
  --cl-tertiary-text-color: #9a8570;
  --cl-input-placeholder-color: rgba(124, 106, 88, 0.65);
  --cl-input-bg-color: #fff8f0;
  --cl-event-hover-bg: #fef3c7;
  --cl-primary-hover-color: #fef3c7;
  --plyr-audio-control-color: #7c674d;

  --cl-soft-yellow-bg: #fef3c7;
  --cl-soft-yellow-fg: #92400e;
  --cl-soft-orange-bg: #fed7aa;
  --cl-soft-orange-fg: #9a3412;
  --cl-soft-red-bg: #fce7f3;
  --cl-soft-red-fg: #be185d;
}

body[data-bg=dark].cl-festival-diwali {
  /* Diwali at night: deep midnight sky with golden diyas and rose glow. */
  --cl-primary-color: #f59e0b;
  --cl-primary-color-darken-5: #d97706;
  --cl-primary-link-color: #fbbf24;
  --plyr-color-main: #f59e0b;

  --cl-primary-bg-color: #0a0e1a;
  --cl-primary-bg-color-opacity: rgba(10, 14, 26, 0.88);
  --cl-secondary-bg-color: #0a0e1a;
  --cl-primary-border-color: #2a2f4a;
  --cl-secondary-border-color: #3a3f60;
  --cl-primary-text-color: #f8f7ff;
  --cl-secondary-text-color: #d4d0f0;
  --cl-tertiary-text-color: #a8a4c8;
  --cl-input-placeholder-color: rgba(212, 208, 240, 0.72);
  --cl-input-bg-color: #0a0e1a;
  --cl-event-hover-bg: #111827;
  --cl-primary-hover-color: #111827;
  --plyr-audio-control-color: #d4d0f0;
}

/* Subtle golden glow inspired by a sky full of diyas at twilight. */
body[data-bg=default].cl-festival-diwali main.main-content-container {
  background:
    radial-gradient(1200px 600px at 50% 0%, rgba(251, 191, 36, 0.08), transparent 60%),
    linear-gradient(180deg, #fff8f0 0%, #fff7ed 100%);
}

body[data-bg=dark].cl-festival-diwali main.main-content-container {
  background:
    radial-gradient(1400px 700px at 50% 0%, rgba(251, 191, 36, 0.06), transparent 65%),
    radial-gradient(800px 400px at 20% 10%, rgba(244, 114, 182, 0.04), transparent 60%),
    linear-gradient(180deg, #0a0e1a 0%, #080b14 100%);
}

/* A warm hairline under the sticky timeline header. */
body.cl-festival-diwali main.main-content-container div.main-content-container-inner div.timeline-container-wrapper div.timeline-container-inner div.timeline-container div.timeline-header {
  border-bottom-color: rgba(192, 118, 55, 0.28);
  box-shadow: 0 1px 3px rgba(120, 72, 30, 0.04), 0 8px 30px rgba(160, 100, 40, 0.05);
}

/* Cards lift with a soft marigold shadow instead of neutral grey. */
body.cl-festival-diwali main.main-content-container div.main-content-container-inner div.timeline-container-wrapper div.timeline-container-inner div.timeline-container div.timeline-posts-container div.timeline-posts-ls div.post-list-item:hover {
  border-color: rgba(192, 118, 55, 0.35);
  box-shadow: 0 10px 34px rgba(160, 100, 40, 0.10), 0 2px 8px rgba(160, 100, 40, 0.05);
}

body[data-bg=dark].cl-festival-diwali main.main-content-container div.main-content-container-inner div.timeline-container-wrapper div.timeline-container-inner div.timeline-container div.timeline-posts-container div.timeline-posts-ls div.post-list-item:hover {
  border-color: rgba(215, 154, 91, 0.38);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(215, 154, 91, 0.10);
}

/* Keep the theme's custom buttons in the same warm family as the skin. */
body.cl-festival-diwali button.btn-custom.main-inline,
body.cl-festival-diwali div.btn-custom.main-inline {
  background-color: #c07637 !important;
  border-color: #c07637 !important;
  color: #ffffff !important;
}
body.cl-festival-diwali button.btn-custom.main-outline,
body.cl-festival-diwali div.btn-custom.main-outline {
  border-color: #c07637 !important;
  color: #a65f26 !important;
}
body[data-bg=dark].cl-festival-diwali button.btn-custom.main-inline,
body[data-bg=dark].cl-festival-diwali div.btn-custom.main-inline {
  background-color: #b06a2f !important;
  border-color: #b06a2f !important;
}
body[data-bg=dark].cl-festival-diwali button.btn-custom.main-outline,
body[data-bg=dark].cl-festival-diwali div.btn-custom.main-outline {
  color: #e0aa70 !important;
}

/* Elegant golden ribbon with a rose glow — representing the light of diyas. */
body.cl-festival-diwali::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #b45309, #f59e0b 25%, #fbbf24 50%, #f472b6 75%, #b45309);
  background-size: 200% 100%;
  animation: fd-ribbon-shimmer 8s linear infinite;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.25);
}

@keyframes fd-ribbon-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

body.cl-festival-diwali button.btn-custom.main-inline,
body.cl-festival-diwali div.btn-custom.main-inline {
  box-shadow: 0 6px 18px rgba(192, 118, 55, 0.22) !important;
}

/* ============================================================
   Diwali motifs — diyas, sweets, rangoli, chakri and sparklers.
   Everything here is decorative: the markup is aria-hidden, the
   layers ignore the pointer, and motion stops for reduced-motion
   visitors. The scene sits after the feed; the corner clusters
   only appear on wide screens so they never crowd a phone.
   ============================================================ */

body.cl-festival-diwali {
  --fd-clay: #ea580c;
  --fd-clay-dark: #9a3412;
  --fd-flame: #fbbf24;
  --fd-flame-core: #fff9db;
  --fd-glow: rgba(251, 191, 36, 0.5);
  --fd-gold: #f59e0b;
  --fd-gold-bright: #fbbf24;
  --fd-title: #9a3412;
  --fd-rose: #ec4899;
  --fd-pink: #f472b6;
  --fd-green: #22c55e;
  --fd-rangoli-a: #f59e0b;
  --fd-rangoli-b: #ec4899;
  --fd-plate: #fef3c7;
  --fd-plate-2: #fde68a;
  --fd-sweet: #fb923c;
  --fd-sweet-dark: #ea580c;
  --fd-barfi: #fde68a;
  --fd-spark: #fef08a;
  --fd-shadow: rgba(146, 64, 14, 0.16);
  --fd-marigold: #f97316;
  --fd-lantern: #dc2626;
}

body[data-bg=dark].cl-festival-diwali {
  --fd-clay: #ea580c;
  --fd-clay-dark: #9a3412;
  --fd-flame: #fbbf24;
  --fd-flame-core: #fff7cc;
  --fd-glow: rgba(251, 191, 36, 0.48);
  --fd-gold: #fbbf24;
  --fd-gold-bright: #fde047;
  --fd-title: #fbbf24;
  --fd-rose: #f472b6;
  --fd-pink: #fb7185;
  --fd-green: #4ade80;
  --fd-rangoli-a: #fbbf24;
  --fd-rangoli-b: #f472b6;
  --fd-plate: #1e1b3a;
  --fd-plate-2: #2a2650;
  --fd-sweet: #fb923c;
  --fd-sweet-dark: #ea580c;
  --fd-barfi: #fde68a;
  --fd-spark: #fef08a;
  --fd-shadow: rgba(0, 0, 0, 0.55);
  --fd-marigold: #fb923c;
  --fd-lantern: #f87171;
}

/* ---------- Feed-end scene ---------- */

body.cl-festival-diwali .fd-diwali-scene {
  position: relative;
  margin: 18px 0 6px;
  padding: 24px 18px 0;
  border: 1px solid transparent;
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(520px 200px at 50% 115%, rgba(251, 191, 36, 0.22), transparent 70%),
    radial-gradient(380px 140px at 30% 0%, rgba(244, 114, 182, 0.12), transparent 65%),
    radial-gradient(380px 140px at 70% 0%, rgba(251, 191, 36, 0.14), transparent 65%),
    linear-gradient(180deg, #fffaf3 0%, #fef3e2 100%);
  box-shadow:
    0 20px 60px -30px rgba(146, 64, 14, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 0;
  animation: fd-scene-in 1s ease-out 0.15s forwards;
  isolation: isolate;
}

body.cl-festival-diwali .fd-diwali-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.6) 0%, rgba(244, 114, 182, 0.4) 50%, rgba(251, 191, 36, 0.6) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

body[data-bg=dark].cl-festival-diwali .fd-diwali-scene {
  background:
    radial-gradient(560px 220px at 50% 115%, rgba(251, 191, 36, 0.16), transparent 72%),
    radial-gradient(420px 160px at 25% -5%, rgba(244, 114, 182, 0.12), transparent 70%),
    radial-gradient(420px 160px at 75% -5%, rgba(251, 191, 36, 0.14), transparent 70%),
    linear-gradient(180deg, #141022 0%, #0a0e1a 100%);
  box-shadow:
    0 30px 70px -40px rgba(251, 191, 36, 0.3),
    inset 0 1px 0 rgba(251, 191, 36, 0.12);
}

body[data-bg=dark].cl-festival-diwali .fd-diwali-scene::before {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.5) 0%, rgba(244, 114, 182, 0.35) 50%, rgba(251, 191, 36, 0.5) 100%);
}

body.cl-festival-diwali .fd-diwali-scene__note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}

body.cl-festival-diwali .fd-diwali-scene__title {
  color: var(--fd-title);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(251, 191, 36, 0.18);
}

body[data-bg=dark].cl-festival-diwali .fd-diwali-scene__title {
  text-shadow: 0 2px 30px rgba(251, 191, 36, 0.25);
}

body.cl-festival-diwali .fd-diwali-scene__native {
  color: var(--fd-rose);
  font-size: 14px;
  letter-spacing: 0.12em;
  font-weight: 600;
}

body.cl-festival-diwali .fd-diwali-scene__sub {
  color: var(--cl-secondary-text-color);
  font-size: 12px;
  letter-spacing: 0.02em;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 640px) {
  body.cl-festival-diwali .fd-diwali-scene__sub {
    white-space: normal;
    max-width: 320px;
  }
}

body.cl-festival-diwali .fd-diwali-scene__art {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  max-height: 220px;
  margin: 4px auto -2px;
  overflow: visible;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 20px 40px rgba(146, 64, 14, 0.12));
}

body[data-bg=dark].cl-festival-diwali .fd-diwali-scene__art {
  filter: drop-shadow(0 30px 60px rgba(251, 191, 36, 0.16));
}

/* ---------- Fixed corner clusters ---------- */

body.cl-festival-diwali .fd-corner-decor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 14px 6px;
  pointer-events: none;
  user-select: none;
}

body.cl-festival-diwali .fd-corner svg {
  display: block;
  width: 132px;
  height: auto;
  opacity: 0.5;
}

body[data-bg=dark].cl-festival-diwali .fd-corner svg {
  opacity: 0.4;
}

body.cl-festival-diwali .fd-corner_right svg {
  width: 150px;
}

@media (max-width: 1439px) {
  body.cl-festival-diwali .fd-corner-decor {
    display: none;
  }
}

/* ---------- Motion ---------- */

@keyframes fd-scene-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fd-flame-flicker {
  0%, 100% { transform: scale(1, 1) translateY(0); opacity: 0.95; }
  18%      { transform: scale(0.96, 1.08) translateY(-0.6px); opacity: 1; }
  42%      { transform: scale(1.04, 0.94) translateY(0.4px); opacity: 0.9; }
  72%      { transform: scale(0.98, 1.04) translateY(-0.3px); opacity: 1; }
}

@keyframes fd-glow-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50%      { opacity: 0.85; transform: scale(1.04); }
}

@keyframes fd-rangoli-turn {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes fd-chakri-turn {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes fd-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50%      { opacity: 0.95; transform: scale(1.05); }
}

@keyframes fd-burst-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50%      { opacity: 0.95; transform: scale(1.06); }
}

body.cl-festival-diwali .fd-flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: fd-flame-flicker 2.8s ease-in-out infinite;
}

body.cl-festival-diwali .fd-flame_2 {
  animation-duration: 3.3s;
  animation-delay: -0.9s;
}

body.cl-festival-diwali .fd-flame_3 {
  animation-duration: 2.5s;
  animation-delay: -1.7s;
}

body.cl-festival-diwali .fd-diya__glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: fd-glow-pulse 3.6s ease-in-out infinite;
  filter: blur(5px);
}

body.cl-festival-diwali .fd-rangoli__spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: fd-rangoli-turn 90s linear infinite;
}

body.cl-festival-diwali .fd-chakri__spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: fd-chakri-turn 18s linear infinite;
}

body.cl-festival-diwali .fd-chakri__spin_rev {
  transform-box: fill-box;
  transform-origin: center;
  animation: fd-chakri-turn 14s linear infinite reverse;
}

@keyframes fd-spark-rise {
  0%   { opacity: 0; transform: translateY(0) scale(0.6); }
  25%  { opacity: 0.9; transform: translateY(-8px) scale(1); }
  100% { opacity: 0; transform: translateY(-34px) scale(0.7); }
}

body.cl-festival-diwali .fd-spark-rise {
  animation: fd-spark-rise 2.4s ease-out infinite;
}

body.cl-festival-diwali .fd-sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: fd-twinkle 3.6s ease-in-out infinite;
}

body.cl-festival-diwali .fd-sparkler__burst {
  transform-box: fill-box;
  transform-origin: center;
  animation: fd-burst-pulse 2.2s ease-in-out infinite;
}

@keyframes fd-firework-burst {
  0%   { opacity: 1; transform: scale(0.55); }
  55%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.3); }
}

body.cl-festival-diwali .fd-firework__burst {
  transform-box: fill-box;
  transform-origin: center;
  animation: fd-firework-burst 2.6s ease-out infinite;
}

@media (max-width: 640px) {
  body.cl-festival-diwali .fd-diwali-scene {
    margin-top: 14px;
    padding: 18px 12px 0;
    border-radius: 16px;
  }

  body.cl-festival-diwali .fd-diwali-scene__title {
    font-size: 14px;
    letter-spacing: 0.14em;
  }

  body.cl-festival-diwali .fd-diwali-scene__native {
    font-size: 13px;
  }

  body.cl-festival-diwali .fd-diwali-scene__sub {
    font-size: 11px;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding: 0 4px;
  }
}

  body.cl-festival-diwali .fd-diwali-scene__art {
    max-height: 148px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.cl-festival-diwali .fd-diwali-scene {
    opacity: 1;
    animation: none;
  }

  body.cl-festival-diwali .fd-flame,
  body.cl-festival-diwali .fd-diya__glow,
  body.cl-festival-diwali .fd-rangoli__spin,
  body.cl-festival-diwali .fd-chakri__spin,
  body.cl-festival-diwali .fd-chakri__spin_rev,
  body.cl-festival-diwali .fd-sparkle,
  body.cl-festival-diwali .fd-sparkler__burst,
  body.cl-festival-diwali .fd-spark-rise,
  body.cl-festival-diwali .fd-firework__burst,
  body.cl-festival-diwali .fd-bottom-line::before,
  body.cl-festival-diwali .fd-rocket {
    animation: none;
  }
}

/* ---------- Small floating cue (all screens) ---------- */
body.cl-festival-diwali .fd-mobile-decor {
  display: block;
  position: fixed;
  right: 16px;
  bottom: 78px;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  opacity: 0.72;
  filter: drop-shadow(0 12px 30px rgba(146, 64, 14, 0.18));
}

body[data-bg=dark].cl-festival-diwali .fd-mobile-decor {
  filter: drop-shadow(0 16px 40px rgba(251, 191, 36, 0.22));
}

body.cl-festival-diwali .fd-mobile-decor svg {
  width: 92px;
  height: auto;
  display: block;
}

/* ---------- Top floating cue ---------- */
body.cl-festival-diwali .fd-top-decor {
  display: block;
  position: fixed;
  right: 18px;
  top: 76px;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  opacity: 0.68;
  filter: drop-shadow(0 10px 28px rgba(146, 64, 14, 0.16));
}

body[data-bg=dark].cl-festival-diwali .fd-top-decor {
  filter: drop-shadow(0 14px 36px rgba(251, 191, 36, 0.2));
}

body.cl-festival-diwali .fd-top-decor svg {
  width: 104px;
  height: auto;
  display: block;
}

@keyframes fd-rocket-rise {
  0%   { opacity: 0; transform: translateY(8px) scale(0.72); }
  12%  { opacity: 1; transform: translateY(0) scale(1); }
  70%  { opacity: 0.9; transform: translateY(-18px) scale(0.96); }
  100% { opacity: 0; transform: translateY(-34px) scale(0.82); }
}

body.cl-festival-diwali .fd-rocket {
  animation: fd-rocket-rise 3.2s ease-out infinite;
  transform-origin: 50% 80%;
}

/* ---------- Full-width bottom line ---------- */
body.cl-festival-diwali .fd-bottom-line {
  display: none;
}

/* ---------- Side bottom cues ---------- */
body.cl-festival-diwali .fd-side-bottom {
  position: fixed;
  bottom: 10px;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  opacity: 0.76;
  filter: drop-shadow(0 14px 34px rgba(146, 64, 14, 0.18));
}

body[data-bg=dark].cl-festival-diwali .fd-side-bottom {
  filter: drop-shadow(0 18px 44px rgba(251, 191, 36, 0.24));
}

body.cl-festival-diwali .fd-side-bottom.fd-side-bottom_left {
  left: 280px;
}

body.cl-festival-diwali.cl-app-guest .fd-side-bottom.fd-side-bottom_left {
  left: 16px;
}

body.cl-festival-diwali .fd-side-bottom.fd-side-bottom_right {
  right: 16px;
}

body.cl-festival-diwali .fd-side-bottom svg {
  width: 112px;
  height: auto;
  display: block;
}

@media (max-width: 1199px) {
  body.cl-festival-diwali .fd-side-bottom.fd-side-bottom_left {
    left: 140px;
  }
  body.cl-festival-diwali.cl-app-guest .fd-side-bottom.fd-side-bottom_left {
    left: 16px;
  }
}

body.cl-festival-diwali .fd-side-bottom_right svg {
  width: 108px;
}

@media (max-width: 768px) {
  body.cl-festival-diwali .fd-side-bottom {
    bottom: 72px;
    opacity: 0.82;
  }

  body.cl-festival-diwali .fd-side-bottom.fd-side-bottom_left {
    left: 12px;
  }
  body.cl-festival-diwali.cl-app-guest .fd-side-bottom.fd-side-bottom_left {
    left: 12px;
  }

  body.cl-festival-diwali .fd-side-bottom svg {
    width: 94px;
  }

  body.cl-festival-diwali .fd-side-bottom_right svg {
    width: 92px;
  }

  body.cl-festival-diwali .fd-mobile-decor {
    display: none;
  }

  body.cl-festival-diwali .fd-top-decor {
    top: 64px;
    right: 12px;
    opacity: 0.76;
  }

  body.cl-festival-diwali .fd-top-decor svg {
    width: 92px;
  }
}

@media (max-width: 768px) {
  body.cl-festival-diwali .fd-bottom-line {
    bottom: 72px;
  }
}

body.cl-festival-diwali .fd-bottom-line::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 80% at 50% 50%, rgba(251, 191, 36, 0.10), transparent 70%);
  animation: fd-bottom-glow 7s ease-in-out infinite;
}

@keyframes fd-bottom-glow {
  0%, 100% { opacity: 0.5; transform: translateX(-12%); }
  50%      { opacity: 0.9; transform: translateX(12%); }
}

body.cl-festival-diwali .fd-bottom-line svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56px;
}

@media (max-width: 768px) {
  body.cl-festival-diwali .fd-bottom-line svg {
    max-height: 40px;
  }
}
