/* ============================================================
   ANIMATIONS.CSS — All keyframes and utility classes
   ============================================================ */

/* --- Keyframes --- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes flicker {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

@keyframes blink-acquire {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

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

@keyframes ink-drop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes agent-pulse {
  0%, 100% { box-shadow: 0 0 4px var(--amber-glow); }
  50% { box-shadow: 0 0 12px var(--amber-dim); }
}

@keyframes threat-red-pulse {
  0%, 100% { background: var(--critical); box-shadow: 0 0 8px rgba(255, 51, 102, 0.4); }
  50% { background: #cc1a4a; box-shadow: 0 0 16px rgba(255, 51, 102, 0.6); }
}

@keyframes marker-ring {
  0% { box-shadow: 0 0 0 0 var(--amber-dim); }
  100% { box-shadow: 0 0 0 12px transparent; }
}

@keyframes absence-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.05; }
}

/* ── Focus transition ── */
@keyframes focus-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Conflict zone pulse ── */
@keyframes conflict-pulse {
  0%, 100% { stroke-opacity: 0.5; fill-opacity: 0.08; }
  50%       { stroke-opacity: 0.8; fill-opacity: 0.14; }
}

/* ── Cascade flow dash animation ── */
@keyframes cascade-flow-dash {
  to { stroke-dashoffset: -20; }
}

/* ── Signal gauge fill ── */
@keyframes gauge-reveal {
  from { stroke-dashoffset: 314; }
}

/* ── Nav item hover shimmer ── */
@keyframes nav-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── Marker appear ── */
@keyframes marker-appear {
  0%   { opacity: 0; transform: scale(0); }
  70%  { opacity: 1; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Filter panel appear ── */
@keyframes filter-panel-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Utility classes --- */
.flicker {
  animation: flicker 40ms;
}

.cursor-blink {
  display: inline-block;
  width: 6px;
  height: 11px;
  background: var(--amber);
  animation: cursor-pulse 1s step-end infinite;
}

.acquiring {
  animation: blink-acquire 1s ease-in-out infinite;
}

/* Focus content reveal */
.focus-content.visible {
  animation: focus-in 0.2s ease forwards;
}

.context-content.visible {
  animation: focus-in 0.2s ease forwards;
}

/* Cascade flow line animation */
.cascade-flow path,
.leaflet-interactive.cascade-flow {
  stroke-dasharray: 12 6;
  animation: cascade-flow-dash 1s linear infinite;
}

/* Conflict zone pulse */
.leaflet-interactive.conflict-zone {
  animation: conflict-pulse 3s ease-in-out infinite;
}

/* Signal gauge fill animation */
.gauge-fill {
  animation: gauge-reveal 0.8s ease-out forwards;
}

/* Map filter panel slide in */
.map-filter-panel {
  animation: filter-panel-in 0.2s ease forwards;
}

/* Nav item active indicator */
.nav-item.active .nav-item-header {
  position: relative;
}

.nav-item.active .nav-item-header::after {
  content: ' ◆';
  color: var(--amber-bright);
  font-size: 7px;
}
