/* Christmas Theme Styles */

/* ============================================
   Christmas Announcement Bar
   ============================================ */

/* CRITICAL: Force font-weight for CHRISTMAS SPECIAL - Maximum specificity */
#christmas-announcement-bar .badge-text,
#christmas-announcement-bar h2.christmas-special-badge,
#christmas-announcement-bar h2.christmas-special-badge .badge-text,
#christmas-announcement-bar .christmas-special-badge .badge-text,
#christmas-announcement-bar .christmas-badge-group .badge-text,
#christmas-announcement-bar .christmas-badge-group h2 .badge-text {
  font-weight: 800 !important;
}

.christmas-announcement-bar {
  position: sticky;
  top: 0;
  z-index: 102;
  width: 100%;
  background: linear-gradient(90deg, #16bbee, #c33f8f, #16bbee, #c33f8f);
  background-size: 200% 100%;
  animation: gradient-shift 3s ease infinite;
  overflow: hidden;
}

/* Ensure navbar appears below announcement bar */
.site-navbar.sticky-navbar {
  position: sticky;
  z-index: 101;
  top: 0;
  transition: top 0.3s ease;
}

/* When announcement bar is visible, adjust navbar top position to appear below it */
.site-navbar.sticky-navbar.has-announcement-bar {
  top: var(--announcement-bar-height, 0px) !important;
}

/* Fallback: ensure navbar is always below announcement bar when it exists */
body:has(#christmas-announcement-bar:not([style*="display: none"])) .site-navbar.sticky-navbar {
  top: var(--announcement-bar-height, 60px) !important;
}

/* Mobile-specific fixes for sticky positioning */
@media (max-width: 767px) {
  .christmas-announcement-bar {
    position: sticky;
    top: 0;
    z-index: 102;
  }

  .site-navbar.sticky-navbar {
    position: sticky !important;
    top: var(--announcement-bar-height, 0px) !important;
    z-index: 101;
  }

  .site-navbar.sticky-navbar.has-announcement-bar {
    top: var(--announcement-bar-height, 0px) !important;
  }

  /* Ensure navbar stays below announcement bar on scroll */
  body:has(#christmas-announcement-bar:not([style*="display: none"])) .site-navbar.sticky-navbar {
    top: var(--announcement-bar-height, 60px) !important;
  }

  /* Prevent any transform or translate that might move navbar */
  .site-navbar.sticky-navbar {
    transform: none !important;
    will-change: auto !important;
  }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.christmas-announcement-content {
  position: relative;
  width: 100%;
  padding: 8px 16px;
}

/* Only apply background pattern within announcement bar */
.christmas-announcement-bar .christmas-announcement-bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-size: 20px 20px;
  animation: pulse 2s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Prevent white circles from appearing on page backgrounds */
#main,
.site-section,
.container,
body > div:not(.christmas-announcement-bar) {
  background-image: none !important;
}

.christmas-snowflakes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.christmas-snowflakes .snowflake {
  position: absolute;
  color: white;
  font-size: 20px;
  animation: snow-fall linear infinite;
}

@keyframes snow-fall {
  0% {
    top: -10%;
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0.3;
  }
}

.christmas-announcement-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 100%;
  flex-wrap: wrap;
}

.christmas-announcement-left,
.christmas-announcement-right {
  display: none;
}

@media (min-width: 1280px) {
  .christmas-announcement-left,
  .christmas-announcement-right {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 24px;
    animation: bounce 2s ease-in-out infinite;
    flex-shrink: 0;
  }
}

.christmas-announcement-main {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  min-width: 0;
}

.christmas-tree-mobile {
  display: block;
  font-size: 18px;
  animation: bounce 2s ease-in-out infinite;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .christmas-tree-mobile {
    display: none;
  }
}

.christmas-badge-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0;
  line-height: 1;
}

.christmas-santa-icon,
.christmas-gift-icon {
  font-size: 20px;
  font-weight: bold;
  animation: pulse 2s ease-in-out infinite;
}

.christmas-special-badge {
  margin: 0 !important;
  padding: 0;
  font-size: 14px;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  line-height: 1;
}

/* Force font-weight on h2 element */
h2.christmas-special-badge {
  font-weight: 800 !important;
}

/* Override dark theme for special badge */
.dark-theme .christmas-special-badge,
body.dark-theme .christmas-special-badge,
.dark-theme h2.christmas-special-badge,
body.dark-theme h2.christmas-special-badge {
  color: inherit;
  font-weight: 800 !important;
}

.dark-theme .christmas-special-badge .badge-text,
body.dark-theme .christmas-special-badge .badge-text,
.dark-theme h2.christmas-special-badge .badge-text,
body.dark-theme h2.christmas-special-badge .badge-text {
  color: #c33f8f !important;
  font-weight: 800 !important;
}

.badge-text {
  background: white !important;
  color: #c33f8f !important;
  padding: 5px 14px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: pulse 2s ease-in-out infinite;
  font-size: 18px;
  font-weight: 800 !important;
}

/* More specific selector for badge text inside special badge */
.christmas-special-badge .badge-text,
h2.christmas-special-badge .badge-text,
.christmas-badge-group .badge-text,
.christmas-announcement-bar .badge-text,
.christmas-announcement-bar h2 .badge-text,
.christmas-announcement-bar .christmas-special-badge .badge-text {
  font-weight: 800 !important;
  font-family: inherit !important;
}

/* Force font-weight on the h2 element itself */
.christmas-announcement-bar h2.christmas-special-badge,
#christmas-announcement-bar h2.christmas-special-badge {
  font-weight: 800 !important;
}

/* Force font-weight on span inside h2 */
.christmas-announcement-bar h2.christmas-special-badge span.badge-text,
#christmas-announcement-bar h2.christmas-special-badge span.badge-text,
.christmas-announcement-bar .christmas-badge-group h2 span.badge-text {
  font-weight: 800 !important;
}

/* Override dark theme for badge text */
.dark-theme .badge-text,
.dark-theme .christmas-special-badge .badge-text,
body.dark-theme .badge-text {
  background: white !important;
  color: #c33f8f !important;
  font-weight: 800 !important;
}

.christmas-offer-text {
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  color: white !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  line-height: 1;
  vertical-align: middle;
}

/* Override dark theme for offer text */
.dark-theme .christmas-offer-text,
body.dark-theme .christmas-offer-text {
  color: white !important;
}

.christmas-offer-highlight {
  font-size: 18px;
  font-weight: 800;
  color: white !important;
  background: #c33f8f !important;
  padding: 6px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-left: 8px;
}

/* Override dark theme for offer highlight */
.dark-theme .christmas-offer-highlight,
body.dark-theme .christmas-offer-highlight {
  color: white !important;
  background: #c33f8f !important;
}

@media (min-width: 640px) {
  .christmas-offer-text {
    font-size: 18px;
  }
  .christmas-offer-highlight {
    font-size: 20px;
  }
}

@media (min-width: 768px) {
  .christmas-offer-text {
    font-size: 20px;
  }
  .christmas-offer-highlight {
    font-size: 22px;
  }
}

.christmas-claim-btn {
  position: relative;
  padding: 7px 18px;
  background: white !important;
  color: #c33f8f !important;
  font-weight: bold;
  font-size: 14px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  border: 2px solid white;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Override dark theme for claim button */
.dark-theme .christmas-claim-btn,
body.dark-theme .christmas-claim-btn {
  background: white !important;
  color: #c33f8f !important;
}

.dark-theme .christmas-claim-btn *,
body.dark-theme .christmas-claim-btn * {
  color: #c33f8f !important;
}

.christmas-claim-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.christmas-claim-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #16bbee, #c33f8f);
  border-radius: 9999px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.christmas-claim-btn:hover::before {
  opacity: 0.2;
}

.claim-arrow {
  transition: transform 0.3s ease;
  color: #c33f8f !important;
}

/* Override dark theme for arrow */
.dark-theme .claim-arrow,
body.dark-theme .claim-arrow {
  color: #c33f8f !important;
}

.christmas-claim-btn:hover .claim-arrow {
  transform: translateX(4px);
}

.christmas-end-date {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  color: white !important;
  margin: 0 !important;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Override dark theme for end date */
.dark-theme .christmas-end-date,
body.dark-theme .christmas-end-date {
  color: white !important;
}

@media (min-width: 640px) {
  .christmas-end-date {
    font-size: 16px;
  }
}

.christmas-close-btn {
  flex-shrink: 0;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  transition: all 0.2s ease;
  cursor: pointer;
  backdrop-filter: blur(4px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.christmas-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.christmas-announcement-shine {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, white, transparent);
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   Christmas Landing Theme Decorations
   ============================================ */
.christmas-landing-theme {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 30;
}

/* Top Left Corner */
.christmas-decoration-top-left {
  position: absolute;
  top: 128px;
  left: 0;
}

.christmas-svg-decoration {
  opacity: 0.7;
  width: 120px;
  height: 120px;
}

@media (min-width: 768px) {
  .christmas-decoration-top-left {
    top: 176px;
  }
  .christmas-svg-decoration {
    opacity: 0.8;
    width: 200px;
    height: 200px;
  }
}

.christmas-ribbon-banner {
  position: absolute;
  top: -64px;
  left: 0;
  width: 112px;
  height: 112px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .christmas-ribbon-banner {
    top: -112px;
    width: 160px;
    height: 160px;
  }
}

.ribbon-text {
  position: absolute;
  left: -40px;
  top: 24px;
  width: 128px;
  padding: 4px 8px;
  text-align: center;
  color: white;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: rotate(-45deg);
  background: linear-gradient(90deg, #16bbee, #c33f8f);
}

@media (min-width: 768px) {
  .ribbon-text {
    left: -64px;
    top: 32px;
    width: 192px;
    padding: 8px 16px;
    font-size: 12px;
  }
}

/* Top Right Corner */
.christmas-decoration-top-right {
  position: absolute;
  top: 128px;
  right: 0;
}

.christmas-star-decoration {
  position: absolute;
  top: -48px;
  right: 8px;
  font-size: 24px;
  opacity: 0.5;
  animation: twinkle 2.5s ease-in-out infinite;
}

@media (min-width: 768px) {
  .christmas-decoration-top-right {
    top: 176px;
  }
  .christmas-star-decoration {
    top: -96px;
    right: 16px;
    font-size: 48px;
    opacity: 0.6;
  }
}

/* Bottom Left Corner */
.christmas-decoration-bottom-left {
  position: absolute;
  bottom: 16px;
  left: 16px;
}

.snowman-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
}

.snowman-svg {
  width: 50px;
  height: 60px;
}

.candy-cane-svg {
  width: 25px;
  height: 50px;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .christmas-decoration-bottom-left {
    bottom: 32px;
    left: 32px;
  }
  .snowman-container {
    gap: 16px;
  }
  .snowman-svg {
    width: 80px;
    height: 100px;
  }
  .candy-cane-svg {
    width: 40px;
    height: 80px;
  }
}

/* Bottom Right Corner */
.christmas-decoration-bottom-right {
  position: absolute;
  bottom: 16px;
  right: 16px;
  opacity: 0.7;
}

.tree-svg {
  width: 70px;
  height: 85px;
}

@media (min-width: 768px) {
  .christmas-decoration-bottom-right {
    bottom: 32px;
    right: 32px;
  }
  .tree-svg {
    width: 120px;
    height: 140px;
  }
}

/* Floating Santa */
.christmas-santa-sleigh {
  position: fixed;
  top: 25%;
  left: 0;
  z-index: 30;
  pointer-events: none;
  animation: santa-landing 30s linear infinite;
}

.santa-emoji {
  font-size: 24px;
  opacity: 0.5;
  transform: rotate(-6deg);
}

@media (min-width: 768px) {
  .santa-emoji {
    font-size: 56px;
    opacity: 0.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .christmas-santa-sleigh {
    animation: none;
  }
}

/* Snowfall */
.christmas-snowfall-left,
.christmas-snowfall-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
}

.christmas-snowfall-left {
  left: 0;
}

.christmas-snowfall-right {
  right: 0;
}

@media (min-width: 768px) {
  .christmas-snowfall-left,
  .christmas-snowfall-right {
    width: 128px;
  }
}

.christmas-snowflake-edge {
  position: absolute;
  color: white;
  opacity: 0.2;
  animation: snowfall-edge linear infinite;
  pointer-events: none;
}

@media (min-width: 768px) {
  .christmas-snowflake-edge {
    opacity: 0.4;
  }
}

/* Sparkles */
.christmas-sparkle {
  position: absolute;
  color: #fbbf24;
  opacity: 0.25;
  animation: twinkle 2.5s ease-in-out infinite;
  pointer-events: none;
  font-size: 12px;
}

.sparkle-1 {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

.sparkle-2 {
  top: 30%;
  right: 20%;
  animation-delay: 1s;
  font-size: 10px;
}

.sparkle-3 {
  top: 60%;
  left: 10%;
  animation-delay: 2s;
}

.sparkle-4 {
  top: 70%;
  right: 15%;
  animation-delay: 1.5s;
  font-size: 10px;
}

.sparkle-5 {
  bottom: 30%;
  left: 85%;
  animation-delay: 2.5s;
}

@media (min-width: 768px) {
  .christmas-sparkle {
    font-size: 24px;
    opacity: 0.3;
  }
  .sparkle-2,
  .sparkle-4 {
    font-size: 20px;
    opacity: 0.25;
  }
}

/* ============================================
   Animations
   ============================================ */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

@keyframes snowfall-edge {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.4;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes santa-landing {
  0% {
    left: 100%;
    top: 10%;
    transform: rotate(-25deg);
  }
  50% {
    left: 50%;
    top: 25%;
    transform: rotate(-15deg);
  }
  100% {
    left: -15%;
    top: 30%;
    transform: rotate(-10deg);
  }
}

.christmas-swing {
  animation: swing 4s ease-in-out infinite;
  transform-origin: center top;
}

@keyframes swing {
  0%, 100% {
    transform: rotate(-8deg);
  }
  50% {
    transform: rotate(8deg);
  }
}

.christmas-bell-swing {
  animation: bell-swing 2.5s ease-in-out infinite;
  transform-origin: center top;
}

@keyframes bell-swing {
  0%, 100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(12deg);
  }
}

.christmas-float {
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

.christmas-twinkle {
  animation: twinkle 2.5s ease-in-out infinite;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .christmas-snowflake-edge,
  .christmas-twinkle,
  .christmas-swing,
  .christmas-bell-swing,
  .christmas-float,
  .christmas-santa-sleigh,
  .christmas-sparkle {
    animation: none;
  }

  .christmas-santa-sleigh {
    display: none;
  }
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
  .christmas-announcement-main {
    gap: 8px;
  }

  .christmas-badge-group {
    gap: 4px;
  }

  .christmas-special-badge {
    font-size: 12px;
  }

  .badge-text {
    padding: 3px 8px;
  }

  .christmas-offer-text {
    font-size: 12px;
  }

  .christmas-offer-highlight {
    font-size: 16px;
    padding: 3px 8px;
  }

  .christmas-claim-btn {
    padding: 5px 12px;
    font-size: 12px;
  }

  .christmas-end-date {
    font-size: 12px;
  }

  /* Hide some decorations on very small screens */
  .christmas-decoration-top-left,
  .christmas-decoration-top-right {
    display: none;
  }

  .christmas-decoration-bottom-left,
  .christmas-decoration-bottom-right {
    opacity: 0.5;
  }
}

