/* =============================================================================
   SoulCore Billing - Animations
   TASK-025: CSS Animations for Billing UI
   ============================================================================= */

/* === KEYFRAMES === */

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

@keyframes billing-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes billing-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes billing-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes billing-scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes billing-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === UTILITY CLASSES === */

.billing-animate-pulse { animation: billing-pulse 2s ease-in-out infinite; }
.billing-animate-shake { animation: billing-shake 0.5s ease-in-out; }
.billing-animate-fade-in { animation: billing-fade-in 0.3s ease-out forwards; }
.billing-animate-slide-up { animation: billing-slide-up 0.3s ease-out forwards; }
.billing-animate-scale-in { animation: billing-scale-in 0.2s ease-out forwards; }
.billing-animate-spin { animation: billing-spin 1s linear infinite; }

/* === COUNTDOWN TIMER (используется countdown_controller.js) === */

.billing-countdown--warning {
  color: var(--warning);
  animation: billing-pulse 1s ease-in-out infinite;
}

.billing-countdown--critical {
  color: var(--error);
  animation: billing-pulse 0.5s ease-in-out infinite;
}

.billing-countdown--finished {
  color: var(--error);
  animation: billing-shake 0.5s ease-in-out;
}

/* === REDUCED MOTION === */

@media (prefers-reduced-motion: reduce) {
  .billing-animate-pulse,
  .billing-animate-shake,
  .billing-animate-spin,
  .billing-countdown--warning,
  .billing-countdown--critical,
  .billing-countdown--finished {
    animation: none;
  }

  .billing-animate-fade-in,
  .billing-animate-slide-up,
  .billing-animate-scale-in {
    animation-duration: 0.01ms;
  }
}
