/* Realtime ticker */
.eq-ticker {
  display: flex;
  align-items: stretch;
  background: #1a1a1a;
  color: #fff;
  height: 36px;
  overflow: hidden;
  border-bottom: 2px solid var(--color-primary);
}

.live-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.live-status.live-on {
  background: #c0392b;
  animation: live-blink 1.6s ease-in-out infinite;
}

.live-status.live-off {
  background: #555;
}

@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.eq-ticker-track {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.eq-ticker-content {
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
  padding-left: 1rem;
}

.eq-ticker-content.scrolling {
  display: flex;
  width: max-content;
  animation: ticker-scroll 40s linear infinite;
  padding-left: 0;
}

.eq-ticker-content.scrolling span {
  padding-right: 4rem;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Flash banner for new quakes */
.eq-flash-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #c0392b, #e74c3c);
  color: #fff;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: flash-slide-in 0.35s ease-out;
}

.eq-flash-banner.severe {
  background: linear-gradient(90deg, #7b0000, #c0392b);
}

.eq-flash-banner.eew {
  background: linear-gradient(90deg, #8e44ad, #c0392b);
}

.eq-flash-banner[hidden] {
  display: none;
}

.eq-flash-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  max-width: 640px;
  margin: 0 auto;
  font-size: 0.875rem;
}

.eq-flash-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.eq-flash-time {
  opacity: 0.85;
  font-size: 0.75rem;
}

@keyframes flash-slide-in {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Wave HUD & legend */
.legend-ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
}

.legend-ring.legend-p {
  border: 2px solid #3498db;
  background: rgba(52, 152, 219, 0.15);
}

.legend-ring.legend-s {
  border: 2px solid #e74c3c;
  background: rgba(231, 76, 60, 0.15);
}

.legend-ring.legend-expected {
  border: 2px dashed #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

.wave-hud {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  pointer-events: none;
}

.wave-hud[hidden] {
  display: none;
}

.wave-hud-item {
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.wave-hud-item.wave-p {
  border-left: 3px solid #3498db;
}

.wave-hud-item.wave-s {
  border-left: 3px solid #e74c3c;
}

.wave-hud-item.wave-expected {
  border-left: 3px solid #f39c12;
}
