/* TEAR · Health indicator · styles */

.health-slot {
  display: inline-flex;
  align-items: center;
}

.health-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 currentColor;
  animation: health-pulse 2.4s ease-out infinite;
}

@keyframes health-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.1); }
  50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0); }
}

/* ---------- Panel (click expands) ---------- */

.health-panel {
  position: fixed;
  top: 64px;
  right: var(--space-4);
  width: 320px;
  background: var(--surface-1);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-4);
  padding: var(--space-4);
  z-index: var(--z-dropdown);
  animation: health-slide-in var(--duration-normal) var(--easing-out);
}

@keyframes health-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.health-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-1);
}

.health-row {
  display: grid;
  grid-template-columns: 16px 1fr 70px 60px;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  border-bottom: 1px dashed var(--border-1);
}

.health-row:last-of-type { border-bottom: none; }

.health-row__label {
  color: var(--text-hi);
}

.health-row__state {
  font-size: var(--text-xs);
  color: var(--text-md);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.health-row__latency {
  font-size: var(--text-xs);
  color: var(--text-lo);
  text-align: right;
}

.health-panel__foot {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-1);
  font-size: var(--text-xs);
  color: var(--text-lo);
  text-align: center;
}
