/**
 * Christmas event skin — light theme only.
 * Admin → Settings → Frontend event theme → Default to restore.
 */

html.event-theme-christmas,
html.event-theme-christmas.light-theme,
html.light-theme.event-theme-christmas,
html.event-theme-christmas.dark-theme,
html.dark-theme.event-theme-christmas,
html.event-theme-christmas body,
html.event-theme-christmas body.light-theme,
html.event-theme-christmas body.dark-theme {
  --primary: #c41e3a;
  --primary-hover: #9b1830;
  --secondary: #1f7a4d;
  --border-color: rgba(196, 30, 58, 0.18);
  --glow-color: rgba(212, 168, 67, 0.35);
  --gradient-start: #c41e3a;
  --gradient-mid: #a31830;
  --gradient-end: #1f7a4d;
  --btn-primary-bg: #c41e3a;
  --btn-primary-hover-bg: #9b1830;
  --bs-btn-disabled-bg: #c41e3a;
  --bs-btn-disabled-border-color: #c41e3a;
  --scrollbar-thumb: #1f7a4d;
  --scrollbar-thumb-hover: #c41e3a;
  --dark-bg: #f7f3ea;
  --darker-bg: #fffdf8;
  --navbar-bg: rgba(255, 252, 247, 0.94);
  --section-bg-alt: rgba(255, 248, 240, 0.92);
  --text-color: #2a2118;
  --text-muted: rgba(42, 33, 24, 0.68);
  --card-bg: rgba(255, 255, 255, 0.94);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(196, 30, 58, 0.12);
}

html.event-theme-christmas body {
  isolation: isolate;
  background-color: #f7f3ea;
  background-image:
    radial-gradient(ellipse 70% 36% at 50% -6%, rgba(196, 30, 58, 0.12), transparent 60%),
    radial-gradient(ellipse 40% 28% at 100% 0%, rgba(31, 122, 77, 0.1), transparent 55%);
  color: #2a2118;
}

html.event-theme-christmas #theme-toggle,
html.event-theme-christmas #theme-toggle-mobile,
html.event-theme-christmas .mobile-theme-toggle {
  display: none !important;
}

html.event-theme-christmas .xm-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

html.event-theme-christmas .xm-ambient__wash {
  position: absolute;
  inset: 0;
  z-index: -1;
}

html.event-theme-christmas .xm-lights {
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  height: 28px;
  display: flex;
  justify-content: space-around;
  background: linear-gradient(#1f7a4d, #1f7a4d) center 4px / 100% 2px no-repeat;
}

html.event-theme-christmas .xm-bulb {
  width: 12px;
  height: 16px;
  margin-top: 6px;
  border-radius: 8px 8px 10px 10px;
  box-shadow: 0 0 10px currentColor;
  animation: xm-twinkle 1.8s ease-in-out infinite;
}

html.event-theme-christmas .xm-bulb--1 { color: #c41e3a; background: #c41e3a; animation-delay: 0s; }
html.event-theme-christmas .xm-bulb--2 { color: #1f7a4d; background: #1f7a4d; animation-delay: 0.4s; }
html.event-theme-christmas .xm-bulb--3 { color: #d4a843; background: #d4a843; animation-delay: 0.8s; }
html.event-theme-christmas .xm-bulb--4 { color: #2f6fed; background: #2f6fed; animation-delay: 1.2s; }

@keyframes xm-twinkle {
  0%, 100% { opacity: 1; filter: brightness(1.2); }
  50% { opacity: 0.45; filter: brightness(0.8); }
}

html.event-theme-christmas .xm-flake {
  position: absolute;
  top: -12px;
  left: var(--xm-left);
  width: var(--xm-size);
  height: var(--xm-size);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  animation: xm-fall var(--xm-dur) linear infinite;
  animation-delay: var(--xm-delay);
}

@keyframes xm-fall {
  0% { transform: translateY(-10px); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translateY(100vh); opacity: 0.3; }
}

html.event-theme-christmas .xm-lottie--snowman {
  position: absolute;
  pointer-events: none;
  right: 8px;
  bottom: 72px;
  width: 110px;
  height: 130px;
}

html.event-theme-christmas .xm-lottie--tree {
  position: relative;
  display: block;
  width: 92px;
  height: 108px;
  margin: 0 0 8px;
  pointer-events: none;
}

html.event-theme-christmas .xm-lottie--tree-center {
  margin-left: auto;
  margin-right: auto;
}

html.event-theme-christmas .site-header .navbar,
html.event-theme-christmas #main-navbar {
  background-color: #fffdf8 !important;
  background-image: none !important;
  border-bottom: 1px solid rgba(196, 30, 58, 0.16);
  isolation: isolate;
}

html.event-theme-christmas #main-navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background: url("/assets/images/christmas/header-scene.svg?v=3") left center / auto 100% repeat-x;
}

html.event-theme-christmas #main-navbar > .container {
  position: relative;
  z-index: 1;
}

html.event-theme-christmas .navbar .nav-link.active,
html.event-theme-christmas .navbar .nav-link:hover {
  color: #c41e3a;
}

html.event-theme-christmas .btn-primary,
html.event-theme-christmas .btn.btn-primary {
  background: #c41e3a !important;
  border-color: #c41e3a !important;
}

html.event-theme-christmas .btn-primary:hover,
html.event-theme-christmas .btn.btn-primary:hover {
  background: #9b1830 !important;
  border-color: #9b1830 !important;
}

html.event-theme-christmas .competition-card:not(.skeleton-card) {
  border: 1px solid rgba(31, 122, 77, 0.28);
  box-shadow: 0 10px 24px rgba(42, 33, 24, 0.08);
  position: relative;
  overflow: visible;
}

html.event-theme-christmas .xm-card-decor {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
}

html.event-theme-christmas .xm-bells {
  position: absolute;
  left: -10px;
  bottom: -8px;
  width: 64px;
  height: 64px;
  pointer-events: none;
}

html.event-theme-christmas .home-hero-title__accent {
  color: #c41e3a;
}

html.event-theme-christmas .site-footer,
html.event-theme-christmas .mobile-bottom-nav {
  background: #fffdf8;
  border-color: rgba(31, 122, 77, 0.2);
}

html.event-theme-christmas .nav-item-bottom.active,
html.event-theme-christmas .nav-item-bottom.active i {
  color: #c41e3a;
}

@media (max-width: 991.98px) {
  html.event-theme-christmas .xm-lottie--tree {
    width: 72px;
    height: 84px;
  }
  html.event-theme-christmas .xm-lottie--snowman {
    width: 72px;
    height: 88px;
  }
  html.event-theme-christmas .xm-lights {
    top: 56px;
  }
}

/* Square SVG frame from Christmas Frame Gallery: photo inset, frame covers the card. */
html.event-theme-christmas .competition-detail .main-image-container {
  aspect-ratio: 1 / 1;
  border: none !important;
  border-image: none !important;
  box-shadow: none !important;
  overflow: visible;
  background: transparent !important;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.35));
}

html.event-theme-christmas .competition-detail .main-gallery-image {
  position: absolute;
  left: 9.6%;
  top: 9.6%;
  width: 80.8%;
  height: 80.8%;
  object-fit: cover;
  border-radius: 2px;
}

html.event-theme-christmas .competition-detail .xm-photo-frame {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html.event-theme-christmas .xm-flake,
  html.event-theme-christmas .xm-bulb {
    animation: none;
  }
}
