/* ===== AMOM Animations ===== */

/* Entry animations */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes countUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Staggered children */
.stagger-children > * { animation: slideInUp 0.4s ease both; }
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.30s; }

/* Glow pulse on stat cards */
.glow-primary { animation: glowPrimary 3s ease-in-out infinite; }
.glow-secondary { animation: glowSecondary 3s ease-in-out infinite; }
@keyframes glowPrimary {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14,165,233,0); }
  50%       { box-shadow: 0 0 20px rgba(14,165,233,0.3); }
}
@keyframes glowSecondary {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20,184,166,0); }
  50%       { box-shadow: 0 0 20px rgba(20,184,166,0.3); }
}

/* Floating animation for banner elements */
.float {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* Gradient animated background */
.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Wave animation for login banner */
.wave-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  overflow: hidden;
  pointer-events: none;
}
.wave-bg svg { position: absolute; bottom: 0; }
.wave1 { animation: waveMove 6s linear infinite; }
.wave2 { animation: waveMove 8s linear infinite reverse; opacity: 0.7; }
@keyframes waveMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Chart entry */
.chart-animate { animation: chartIn 0.6s ease; }
@keyframes chartIn {
  from { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
  to   { opacity: 1; transform: scaleY(1); }
}

/* Sidebar nav ripple */
.nav-item { overflow: hidden; }
.nav-item::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(56,189,248,0.3);
  transform: scale(0);
  animation: none;
  pointer-events: none;
  width: 100px; height: 100px;
  left: 50%; top: 50%;
  margin-left: -50px; margin-top: -50px;
}

/* Number count animation on stat cards */
.count-animate { animation: countUp 0.5s ease; }

/* Loading dots */
.loading-dots {
  display: inline-flex; gap: 4px; align-items: center;
}
.loading-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-primary);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-8px); }
}

/* Pulse ring for notifications */
@keyframes ring-pulse {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}
.pulse-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-danger);
  animation: ring-pulse 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Skeleton shimmer */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Smooth expand */
.expand-enter {
  animation: expandDown 0.3s ease;
}
@keyframes expandDown {
  from { max-height: 0; opacity: 0; }
  to   { max-height: 500px; opacity: 1; }
}

/* Map pin bounce */
.pin-bounce { animation: pinBounce var(--transition-spring) both; }
@keyframes pinBounce {
  0%   { transform: translateY(-20px); opacity: 0; }
  60%  { transform: translateY(4px); }
  100% { transform: translateY(0); opacity: 1; }
}

/* Success checkmark */
.check-animate {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkDraw 0.5s ease forwards;
}
@keyframes checkDraw {
  to { stroke-dashoffset: 0; }
}
