/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast notifications ── */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: toast-in 200ms ease;
  max-width: 360px;
}

.toast.error { border-color: var(--error); }
.toast.success { border-color: var(--success); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-muted);
  gap: 8px;
  padding: 40px;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  opacity: 0.3;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 400px;
  line-height: 1.6;
}

/* ── Badge / pill ── */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.local { background: rgba(34,197,94,0.15); color: var(--success); }
.badge.cloud { background: rgba(59,130,246,0.15); color: var(--accent); }
.badge.offline { background: rgba(239,68,68,0.15); color: var(--error); }

/* ── Streaming cursor blink ── */
.streaming-cursor::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── Provider health row ── */
.provider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.provider-row .provider-name {
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 100px;
}

.provider-row .provider-latency {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
