/* ============================================================
   MERCER WORLDWIDE WAR ROOM — ANIMATIONS
   ============================================================ */

/* ===== PULSE RED — Hotspot Pulsing ===== */
@keyframes pulse-red {
  0% {
    box-shadow: 0 0 4px rgba(255, 0, 64, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 12px rgba(255, 0, 64, 0.9), 0 0 24px rgba(255, 0, 64, 0.3);
    transform: scale(1.15);
  }
  100% {
    box-shadow: 0 0 4px rgba(255, 0, 64, 0.6);
    transform: scale(1);
  }
}

/* ===== PULSE AMBER — Warning Hotspots ===== */
@keyframes pulse-amber {
  0% {
    box-shadow: 0 0 4px rgba(255, 170, 0, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.9), 0 0 24px rgba(255, 170, 0, 0.3);
    transform: scale(1.1);
  }
  100% {
    box-shadow: 0 0 4px rgba(255, 170, 0, 0.6);
    transform: scale(1);
  }
}

/* ===== PULSE GREEN — Status Indicators ===== */
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 3px rgba(0, 255, 65, 0.5);
  }
  50% {
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.8), 0 0 16px rgba(0, 255, 65, 0.2);
  }
  100% {
    box-shadow: 0 0 3px rgba(0, 255, 65, 0.5);
  }
}

/* ===== RADAR SWEEP — Rotation Animation ===== */
@keyframes radar-sweep {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== BLINK — Classification Badge & Alerts ===== */
@keyframes blink {
  0% {
    opacity: 1;
  }
  40% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

/* ===== SLIDE IN TOP — New Feed Items ===== */
@keyframes slide-in-top {
  0% {
    opacity: 0;
    transform: translateY(-12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== FADE IN — Panel Loading ===== */
@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* ===== TYPING CURSOR — Boot Sequence ===== */
@keyframes typing-cursor {
  0% {
    opacity: 1;
  }
  49% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  99% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* ===== SCROLL LEFT — Ticker Tape ===== */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ===== GLOW PULSE — Panel Border on Update ===== */
@keyframes glow-pulse {
  0% {
    box-shadow:
      inset 0 0 20px rgba(0, 0, 0, 0.5),
      0 0 3px rgba(0, 255, 65, 0.08);
  }
  50% {
    box-shadow:
      inset 0 0 20px rgba(0, 0, 0, 0.5),
      0 0 10px rgba(0, 255, 65, 0.25),
      0 0 20px rgba(0, 255, 65, 0.1);
  }
  100% {
    box-shadow:
      inset 0 0 20px rgba(0, 0, 0, 0.5),
      0 0 3px rgba(0, 255, 65, 0.08);
  }
}

.panel-updating {
  animation: glow-pulse 1s ease-in-out;
}

/* ===== DATA FLASH — New Data Highlight ===== */
@keyframes data-flash {
  0% {
    background-color: rgba(0, 255, 65, 0.2);
  }
  30% {
    background-color: rgba(0, 255, 65, 0.35);
  }
  100% {
    background-color: transparent;
  }
}

.data-updated {
  animation: data-flash 1.5s ease-out;
}

/* ===== PULSE RING — Expanding Ring for Hotspots ===== */
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* ===== ALERT FLASH — Critical Alert Background ===== */
@keyframes alert-flash {
  0% {
    background-color: rgba(255, 0, 64, 0.15);
  }
  50% {
    background-color: rgba(255, 0, 64, 0.3);
  }
  100% {
    background-color: rgba(255, 0, 64, 0.15);
  }
}

.alert-critical.alert-new {
  animation: alert-flash 1s ease-in-out 3;
}

/* ===== BOOT PROGRESS GLOW ===== */
@keyframes progress-glow {
  0% {
    box-shadow: 0 0 5px rgba(62, 207, 142, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(62, 207, 142, 0.8), 0 0 30px rgba(62, 207, 142, 0.3);
  }
  100% {
    box-shadow: 0 0 5px rgba(62, 207, 142, 0.5);
  }
}

.boot-progress-bar {
  animation: progress-glow 1.5s ease-in-out infinite;
}

/* ===== STRIKE FLASH — Map Strike Event ===== */
@keyframes strike-flash {
  0% {
    opacity: 1;
    transform: scale(0.5);
  }
  20% {
    opacity: 1;
    transform: scale(2);
  }
  100% {
    opacity: 0;
    transform: scale(4);
  }
}

/* ===== SHIPPING ROUTE DASH — Animated Dashes ===== */
@keyframes dash-flow {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -20;
  }
}

/* ===== STATUS DOT BREATHE ===== */
@keyframes breathe {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

/* ===== TEXT REVEAL — Line by Line ===== */
@keyframes text-reveal {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== SPIN — Loading Indicator ===== */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== THREAT ESCALATION BORDER ===== */
@keyframes threat-border {
  0% {
    border-color: var(--accent-amber);
  }
  50% {
    border-color: var(--accent-red);
  }
  100% {
    border-color: var(--accent-amber);
  }
}

.panel-threat-elevated {
  animation: threat-border 3s ease-in-out infinite;
}
