/* =========================================================
   HARVESTERKEN — HAPPY CHRISTMAS & NEW YEAR STYLES
   Centered bottom placement + timed fade-out + reappear on scroll
   ========================================================= */

.xmas-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147482000;
  overflow: hidden;
}

.xmas-sparkle {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  opacity: 0;
  animation: xmasDrift linear infinite;
}

@keyframes xmasDrift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.7);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.65;
  }
  100% {
    transform: translate3d(24px, 105vh, 0) rotate(180deg) scale(1.15);
    opacity: 0;
  }
}

/* Centered Sticky Floating Anchor */
.xmas-widget {
  position: fixed;
  bottom: 20px;
  left: 50%;
  right: auto;
  transform: translate3d(-50%, 0, 0);
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  max-width: calc(100% - 28px);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  touch-action: manipulation;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease;
}

/* Timed fade-out state (reappears when scrolling) */
.xmas-widget.is-faded-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(-50%, 26px, 0) scale(0.95);
}

/* Main Colorful Festive Glass Card */
.xmas-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 36px 14px 16px;
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    rgba(6, 78, 59, 0.96) 0%,
    rgba(15, 23, 42, 0.96) 55%,
    rgba(127, 29, 29, 0.94) 100%
  );
  border: 1.5px solid rgba(250, 204, 21, 0.72);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(250, 204, 21, 0.24),
    inset 0 1px 1px rgba(255, 255, 255, 0.28);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.xmas-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.58),
    0 0 32px rgba(250, 204, 21, 0.38),
    inset 0 1px 1px rgba(255, 255, 255, 0.38);
}

/* Festive Top Trim Bar */
.xmas-ribbon-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(
    90deg,
    #EF4444 0%,
    #FACC15 33%,
    #10B981 66%,
    #38BDF8 100%
  );
}

/* Light Sweep Effect */
.xmas-sheen {
  position: absolute;
  top: 0;
  left: -140%;
  width: 90%;
  height: 100%;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 80%
  );
  animation: xmasSheenMove 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes xmasSheenMove {
  0% { left: -140%; }
  45%, 100% { left: 160%; }
}

/* SVG Artwork */
.xmas-art {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xmas-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.xmas-orbit {
  transform-origin: 48px 48px;
  animation: xmasSpin 20s linear infinite;
}

.xmas-star-pulse {
  transform-origin: 48px 20px;
  animation: xmasPulse 2.2s ease-in-out infinite alternate;
}

.xmas-twinkle {
  animation: xmasBlink 1.8s ease-in-out infinite alternate;
}

.xmas-twinkle-delay {
  animation: xmasBlink 1.8s ease-in-out 0.9s infinite alternate;
}

@keyframes xmasSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes xmasPulse {
  from { transform: scale(0.92); }
  to { transform: scale(1.12); }
}

@keyframes xmasBlink {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

/* Text Styling */
.xmas-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.xmas-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #FDE047;
}

.xmas-copy h4 {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #FFFFFF 0%, #FEF08A 48%, #FCA5A5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.xmas-copy p {
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

/* Minimize Button */
.xmas-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #FEF08A;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.xmas-close:hover {
  background: rgba(239, 68, 68, 0.7);
  color: #FFFFFF;
  transform: scale(1.08);
}

/* Minimized Pill */
.xmas-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(250, 204, 21, 0.75);
  background: linear-gradient(
    135deg,
    rgba(6, 78, 59, 0.96) 0%,
    rgba(127, 29, 29, 0.95) 100%
  );
  color: #FEF9C3;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.xmas-pill:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 32px rgba(250, 204, 21, 0.3);
}

.xmas-mini-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  animation: xmasPulse 2.4s ease-in-out infinite alternate;
}

.xmas-widget.is-minimized .xmas-card {
  display: none;
}

.xmas-widget.is-minimized .xmas-pill {
  display: inline-flex;
}

/* =========================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================= */
@media (max-width: 768px) {
  .xmas-widget {
    left: 50%;
    right: auto;
    bottom: 76px;
    transform: translate3d(-50%, 0, 0);
    width: calc(100% - 24px);
    max-width: 400px;
  }

  .xmas-widget.is-faded-out {
    transform: translate3d(-50%, 26px, 0) scale(0.95);
  }

  .xmas-card {
    padding: 10px 32px 10px 12px;
    gap: 10px;
    border-radius: 18px;
  }

  .xmas-art {
    width: 44px;
    height: 44px;
  }

  .xmas-badge {
    font-size: 8px;
    letter-spacing: 1.1px;
  }

  .xmas-copy h4 {
    font-size: 13.5px;
  }

  .xmas-copy p {
    font-size: 11px;
  }

  .xmas-pill {
    padding: 8px 14px;
    font-size: 11.5px;
  }
}

@media (max-width: 380px) {
  .xmas-widget {
    bottom: 72px;
    width: calc(100% - 16px);
  }

  .xmas-art {
    width: 38px;
    height: 38px;
  }

  .xmas-copy h4 {
    font-size: 12.5px;
  }
}