/* ================================================
   LUNAAR ANIMATIONS CSS - Keyframes & Transitions
   ================================================ */

/* ---- Spin ---- */
@keyframes lunaarSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---- Fade In ---- */
@keyframes lunaarFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Fade In Up ---- */
@keyframes lunaarFadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Fade In Scale ---- */
@keyframes lunaarFadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ---- Slide In Right ---- */
@keyframes lunaarSlideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---- Slide In Left ---- */
@keyframes lunaarSlideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---- Pulse ---- */
@keyframes lunaarPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ---- Shimmer (loading placeholder) ---- */
@keyframes lunaarShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.lunaar-shimmer {
  background: linear-gradient(90deg, #F0EAF8 25%, #E0D4F0 50%, #F0EAF8 75%);
  background-size: 200% 100%;
  animation: lunaarShimmer 1.5s infinite;
}

/* ---- Bounce ---- */
@keyframes lunaarBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

/* ---- Glow ---- */
@keyframes lunaarGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(98, 42, 242, 0.2); }
  50% { box-shadow: 0 0 20px rgba(98, 42, 242, 0.4); }
}

/* ---- Progress Fill ---- */
@keyframes lunaarProgressFill {
  from { width: 0%; }
  to { width: 100%; }
}

.lunaar-progress-animated .lunaar-progress-bar {
  animation: lunaarProgressFill 3s ease forwards;
}

/* ---- Count Up (used with JS) ---- */
@keyframes lunaarCountUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Stagger Children ---- */
.lunaar-stagger > * {
  opacity: 0;
  animation: lunaarFadeInUp 0.4s ease forwards;
}

.lunaar-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.lunaar-stagger > *:nth-child(2) { animation-delay: 0.10s; }
.lunaar-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.lunaar-stagger > *:nth-child(4) { animation-delay: 0.20s; }
.lunaar-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.lunaar-stagger > *:nth-child(6) { animation-delay: 0.30s; }
.lunaar-stagger > *:nth-child(7) { animation-delay: 0.35s; }

/* ---- Typing dots ---- */
.lunaar-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: 4px;
}

.lunaar-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--lunaar-primary);
  border-radius: 50%;
  animation: lunaarTypingDot 1.4s infinite;
}

.lunaar-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.lunaar-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes lunaarTypingDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* ---- SKU List Animation ---- */
@keyframes lunaarSkuSlide {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.lunaar-sku-item {
  animation: lunaarSkuSlide 0.3s ease forwards;
}

/* ---- Floating Badge ---- */
@keyframes lunaarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.lunaar-float {
  animation: lunaarFloat 3s ease-in-out infinite;
}

/* ---- Success Check ---- */
@keyframes lunaarCheckDraw {
  from { stroke-dashoffset: 24; }
  to { stroke-dashoffset: 0; }
}

.lunaar-check-animated {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: lunaarCheckDraw 0.5s ease 0.3s forwards;
}

/* ---- Ripple effect on click ---- */
.lunaar-ripple {
  position: relative;
  overflow: hidden;
}

.lunaar-ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.lunaar-ripple:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* ---- Hover lift ---- */
.lunaar-hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lunaar-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
