/* ============================================================
   Hub Design System - Animations
   Keyframes, Utility Classes, Stagger, Skeleton, A11y
   ============================================================ */

/* ============================================================
   Keyframes
   ============================================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes statusPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

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

@keyframes ripple {
  from {
    transform: scale(0);
    opacity: 1;
  }
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ============================================================
   Animation Utility Classes
   ============================================================ */

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.4s ease-out forwards;
}

/* ============================================================
   Stagger Delays (.stagger-1 through .stagger-12)
   Increments of 0.05s (50ms)
   ============================================================ */

.stagger-1 {
  animation-delay: 0.05s;
}

.stagger-2 {
  animation-delay: 0.10s;
}

.stagger-3 {
  animation-delay: 0.15s;
}

.stagger-4 {
  animation-delay: 0.20s;
}

.stagger-5 {
  animation-delay: 0.25s;
}

.stagger-6 {
  animation-delay: 0.30s;
}

.stagger-7 {
  animation-delay: 0.35s;
}

.stagger-8 {
  animation-delay: 0.40s;
}

.stagger-9 {
  animation-delay: 0.45s;
}

.stagger-10 {
  animation-delay: 0.50s;
}

.stagger-11 {
  animation-delay: 0.55s;
}

.stagger-12 {
  animation-delay: 0.60s;
}

/* ============================================================
   Status Pulse (for online status dots)
   ============================================================ */

.status-pulse {
  animation: statusPulse 2s infinite;
}

/* ============================================================
   Skeleton Loading
   ============================================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--pt-surface-container) 25%,
    var(--pt-surface-container-high) 50%,
    var(--pt-surface-container) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--pt-radius-sm);
}

/* ============================================================
   Accessibility - Prefers Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-fade-in-up,
  .animate-fade-in,
  .animate-slide-in-left {
    opacity: 1;
    transform: none;
  }

  .status-pulse {
    animation: none;
    box-shadow: none;
  }

  .skeleton {
    animation: none;
    background: var(--pt-surface-container-high);
  }
}
