/* ============================================================
   MyLagosApp — Custom Animations
   animations.css
   ============================================================ */

/* ── Page Entrance ─────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── Utility Animation Classes ─────────────────────────── */
.anim-fade-up {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.anim-fade-down {
  animation: fadeInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.anim-fade {
  animation: fadeIn 0.4s ease both;
}

.anim-scale {
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.anim-slide-left {
  animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.anim-slide-right {
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ── Staggered Children ────────────────────────────────── */
.stagger > * { opacity: 0; animation: fadeInUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) both; }
.stagger > *:nth-child(1)  { animation-delay: 0.05s; }
.stagger > *:nth-child(2)  { animation-delay: 0.10s; }
.stagger > *:nth-child(3)  { animation-delay: 0.15s; }
.stagger > *:nth-child(4)  { animation-delay: 0.20s; }
.stagger > *:nth-child(5)  { animation-delay: 0.25s; }
.stagger > *:nth-child(6)  { animation-delay: 0.30s; }
.stagger > *:nth-child(7)  { animation-delay: 0.35s; }
.stagger > *:nth-child(8)  { animation-delay: 0.40s; }
.stagger > *:nth-child(9)  { animation-delay: 0.45s; }
.stagger > *:nth-child(10) { animation-delay: 0.50s; }
.stagger > *:nth-child(11) { animation-delay: 0.55s; }
.stagger > *:nth-child(12) { animation-delay: 0.60s; }

/* ── Ripple Effect ─────────────────────────────────────── */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transform: scale(0);
  animation: rippleExpand 0.55s linear;
  pointer-events: none;
}

@keyframes rippleExpand {
  to { transform: scale(4); opacity: 0; }
}

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

.shimmer {
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.6) 50%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

/* ── Floating ──────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

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

/* ── Pulse Ring ────────────────────────────────────────── */
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(255,156,32,.45); }
  70%  { box-shadow: 0 0 0 14px rgba(255,156,32,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,156,32,0); }
}

.pulse-ring { animation: pulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ── Ticker / News Marquee ─────────────────────────────── */
@keyframes ticker {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
}

.ticker-text {
  display: inline-block;
  animation: ticker 18s linear infinite;
  padding-left: 100%;
}

/* ── Traffic Light Blink ───────────────────────────────── */
@keyframes trafficBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.traffic-blink { animation: trafficBlink 1.2s ease-in-out infinite; }

/* ── Bounce Arrow ──────────────────────────────────────── */
@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

.bounce-arrow { animation: bounceArrow 1.2s ease-in-out infinite; }

/* ── Onboarding Slide Animations ───────────────────────── */
@keyframes onboardSlideIn {
  from { opacity: 0; transform: translateX(50px) scale(0.97); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes onboardSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(-50px) scale(0.97); }
}

.slide-enter { animation: onboardSlideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) both; }
.slide-exit  { animation: onboardSlideOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* ── Logo Reveal ───────────────────────────────────────── */
@keyframes logoReveal {
  0%   { opacity: 0; transform: scale(0.7) translateY(20px); }
  60%  { opacity: 1; transform: scale(1.05) translateY(-5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.logo-reveal { animation: logoReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ── Notification Pop ──────────────────────────────────── */
@keyframes notifPop {
  0%   { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.notif-pop { animation: notifPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ── Card Hover Lift ───────────────────────────────────── */
.hover-lift {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

/* ── Spinner ───────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ── Page Transition Overlay ───────────────────────────── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 9999;
  transform: translateX(-100%);
  pointer-events: none;
}

@keyframes pageSlideIn {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

@keyframes pageSlideOut {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}

/* ── Animate.css Overrides for App Feel ────────────────── */
:root {
  --animate-duration: 0.45s;
  --animate-delay: 0s;
}

/* Faster bounces for mobile */
.animate__bounceIn { --animate-duration: 0.4s; }
.animate__fadeInUp { --animate-duration: 0.4s; }
.animate__slideInUp { --animate-duration: 0.38s; }
.animate__zoomIn { --animate-duration: 0.35s; }

/* ── Haptic Feel Classes ───────────────────────────────── */
.tap-scale {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tap-scale:active { transform: scale(0.93); }
