/* Real-time digital twin status pulses — Propshaft / vanilla CSS (no Tailwind). */

.digital-twin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  max-width: 100%;
}

.digital-twin-badge--idle {
  display: none;
}

.digital-twin-badge .badge-indicator {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.digital-twin-badge .badge-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-twin-canvas-node {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.digital-twin-canvas-node__name {
  font-weight: 600;
  font-size: 0.9rem;
}

.digital-twin-pulse-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

.digital-twin-pulse-rail__item {
  min-width: 0;
}

.pulse-pending {
  animation: twin-pulse-slate 1.5s infinite;
  border-color: #94a3b8;
  color: #64748b;
}

.pulse-dispatched {
  animation: twin-pulse-blue 1.5s infinite;
  border-color: #3b82f6;
  color: #2563eb;
}

.pulse-in_transit {
  animation: twin-pulse-orange 1.5s infinite;
  border-color: #f59e0b;
  color: #d97706;
}

.pulse-delivered {
  animation: twin-pulse-green 1.5s infinite;
  border-color: #10b981;
  color: #059669;
}

.pulse-cancelled {
  animation: twin-pulse-red 1.5s infinite;
  border-color: #ef4444;
  color: #dc2626;
}

@keyframes twin-pulse-orange {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes twin-pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes twin-pulse-blue {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

@keyframes twin-pulse-slate {
  0% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(148, 163, 184, 0); }
  100% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0); }
}

@keyframes twin-pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
