/* ============================================================================
   Harold Pill — Floating Assistant Widget Styles

   Uses CSS variables from shadcn/ui for theme consistency.
   Glassmorphism effect with backdrop-filter for the premium feel.
   ============================================================================ */

/* ── Base ──────────────────────────────────────────────────────────────────── */

.harold-pill {
  position: fixed;
  z-index: 9999;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  transition:
    width 250ms cubic-bezier(0.4, 0, 0.2, 1),
    height 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 250ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 250ms ease;
}

.harold-pill--dragging {
  transition: none;
  cursor: grabbing;
}

/* ── Collapsed orb ─────────────────────────────────────────────────────────── */

.harold-pill--collapsed {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.harold-pill__orb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--card) / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  transition:
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease;
}

.harold-pill__orb:hover {
  background: hsl(var(--card));
  border-color: hsl(var(--border));
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  color: hsl(var(--foreground));
}

/* ── Voice state glow effects on the collapsed orb ─────────────────────────── */

.harold-pill--listening .harold-pill__orb {
  border-color: hsl(142 71% 45% / 0.5);
  box-shadow:
    0 0 0 3px hsl(142 71% 45% / 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08);
  color: hsl(142 71% 45%);
  animation: harold-pulse-green 2s ease-in-out infinite;
}

.harold-pill--thinking .harold-pill__orb {
  border-color: hsl(38 92% 50% / 0.5);
  box-shadow:
    0 0 0 3px hsl(38 92% 50% / 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08);
  color: hsl(38 92% 50%);
}

/* ── Slow tool active badge (in expanded card state row) ───────────────── */

.harold-pill__tool-active-badge {
  background: hsl(38 92% 50% / 0.12) !important;
  color: hsl(38 92% 50%) !important;
  animation: harold-tool-pulse 2s ease-in-out infinite;
}

@keyframes harold-tool-pulse {
  0%, 100% {
    background: hsl(38 92% 50% / 0.10);
  }
  50% {
    background: hsl(38 92% 50% / 0.22);
  }
}

.harold-pill--speaking .harold-pill__orb {
  border-color: hsl(217 91% 60% / 0.5);
  box-shadow:
    0 0 0 3px hsl(217 91% 60% / 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08);
  color: hsl(217 91% 60%);
  animation: harold-pulse-blue 1.5s ease-in-out infinite;
}

/* ── Expanded card ─────────────────────────────────────────────────────────── */

.harold-pill--expanded {
  width: 280px;
  border-radius: 16px;
  background: hsl(var(--card) / 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid hsl(var(--border) / 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* ── Card internal layout ──────────────────────────────────────────────────── */

.harold-pill__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 12px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.harold-pill__header {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: grab;
  touch-action: none;
}

.harold-pill__header:active {
  cursor: grabbing;
}

.harold-pill__title {
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--foreground));
  flex: 1;
  letter-spacing: 0.01em;
}

.harold-pill__header-actions {
  display: flex;
  gap: 2px;
}

.harold-pill__header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.harold-pill__header-btn:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.harold-pill__header-btn--danger:hover {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

/* ── State indicator ───────────────────────────────────────────────────────── */

.harold-pill__state {
  display: flex;
  align-items: center;
}

.harold-pill__state-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.harold-pill__state-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
}

/* ── Connect button ────────────────────────────────────────────────────────── */

.harold-pill__connect-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
  width: 100%;
  justify-content: center;
}

.harold-pill__connect-btn:hover {
  background: hsl(var(--muted));
  border-color: hsl(var(--foreground) / 0.2);
}

/* ── Controls row ──────────────────────────────────────────────────────────── */

.harold-pill__controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.harold-pill__mic-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.harold-pill__mic-btn--active {
  background: hsl(142 71% 45% / 0.12);
  color: hsl(142 71% 45%);
}

.harold-pill__mic-btn--active:hover {
  background: hsl(142 71% 45% / 0.2);
}

.harold-pill__mic-btn--muted {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.harold-pill__mic-btn--muted:hover {
  background: hsl(var(--muted) / 0.8);
  color: hsl(var(--foreground));
}

.harold-pill__disconnect-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  cursor: pointer;
  margin-left: auto;
  transition: background 150ms ease;
}

.harold-pill__disconnect-btn:hover {
  background: hsl(var(--destructive) / 0.2);
}

/* ── Focus context ─────────────────────────────────────────────────────────── */

.harold-pill__focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid hsl(var(--border) / 0.3);
}

/* ── Tool grid ─────────────────────────────────────────────────────────────── */

.harold-pill__tools-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.harold-pill__tools-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
}

.harold-pill__tools-toggle:hover .h-3 {
  color: hsl(var(--foreground));
}

.harold-pill__tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-bottom: 2px;
}

.harold-pill__tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border) / 0.3);
}

.harold-pill__tool-name {
  font-size: 9px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-transform: capitalize;
}

.harold-pill__tool-badge {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 3px;
  border-radius: 3px;
}

.harold-pill__tool-badge--core {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.harold-pill__tool-badge--feature {
  background: hsl(38 92% 50% / 0.12);
  color: hsl(38 92% 50%);
}

/* ── Conversation log ──────────────────────────────────────────────────────── */

.harold-pill__log-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding-top: 4px;
}

.harold-pill__log-entries {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}

.harold-pill__log-entry {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 9px;
  line-height: 1.4;
}

.harold-pill__log-type {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 8px;
  flex-shrink: 0;
  margin-top: 1px;
}

.harold-pill__log-msg {
  color: hsl(var(--muted-foreground));
  word-break: break-word;
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
}

/* Log entry type colours */
.harold-pill__log-entry--system .harold-pill__log-type {
  background: hsl(var(--muted) / 0.6);
  color: hsl(var(--muted-foreground));
}

.harold-pill__log-entry--user .harold-pill__log-type {
  background: hsl(142 71% 45% / 0.12);
  color: hsl(142 71% 45%);
}

.harold-pill__log-entry--assistant .harold-pill__log-type {
  background: hsl(217 91% 60% / 0.12);
  color: hsl(217 91% 60%);
}

.harold-pill__log-entry--tool_call .harold-pill__log-type {
  background: hsl(38 92% 50% / 0.12);
  color: hsl(38 92% 50%);
}

.harold-pill__log-entry--tool_result .harold-pill__log-type {
  background: hsl(270 60% 55% / 0.12);
  color: hsl(270 60% 55%);
}

.harold-pill__log-entry--error .harold-pill__log-type {
  background: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
}

/* ── Cost ──────────────────────────────────────────────────────────────────── */

.harold-pill__cost {
  display: flex;
  justify-content: flex-end;
}

/* ── Animations ────────────────────────────────────────────────────────────── */

@keyframes harold-pulse-green {
  0%, 100% {
    box-shadow:
      0 0 0 3px hsl(142 71% 45% / 0.12),
      0 4px 16px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 6px hsl(142 71% 45% / 0.06),
      0 4px 16px rgba(0, 0, 0, 0.08);
  }
}

@keyframes harold-pulse-blue {
  0%, 100% {
    box-shadow:
      0 0 0 3px hsl(217 91% 60% / 0.12),
      0 4px 16px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 6px hsl(217 91% 60% / 0.06),
      0 4px 16px rgba(0, 0, 0, 0.08);
  }
}

@keyframes harold-ping {
  0%, 90%, 100% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.08),
      0 0 0 0 hsl(var(--primary) / 0.3);
  }
  95% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.08),
      0 0 0 8px hsl(var(--primary) / 0);
  }
}

/* Subtle ping when idle + disconnected to draw attention */
.harold-pill--idle .harold-pill__orb {
  animation: harold-ping 5s ease-in-out infinite;
}

/* ── Task Progress Panel ───────────────────────────────────────────────────── */

.harold-task-panel {
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding-top: 6px;
}

.harold-task-panel__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 2px 0;
  border-radius: 6px;
  transition: background 150ms ease;
}

.harold-task-panel__header:hover {
  background: hsl(var(--muted) / 0.3);
}

.harold-task-panel__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.harold-task-panel__title {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--foreground));
  line-height: 1.3;
}

.harold-task-panel__progress-bar {
  height: 3px;
  border-radius: 999px;
  background: hsl(var(--muted) / 0.6);
  overflow: hidden;
}

.harold-task-panel__progress-fill {
  height: 100%;
  border-radius: 999px;
  background: hsl(var(--primary));
  transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.harold-task-panel__progress-fill--error {
  background: hsl(38 92% 50%);
}

.harold-task-panel__progress-fill--done {
  background: hsl(142 71% 45%);
}

.harold-task-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.harold-task-panel__cancel-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  border: none;
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  cursor: pointer;
  transition: background 150ms ease;
}

.harold-task-panel__cancel-btn:hover {
  background: hsl(var(--destructive) / 0.2);
}

.harold-task-panel__steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 2px;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}

.harold-task-panel__step {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 4px;
}

.harold-task-panel__step-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.harold-task-panel__step-label {
  font-size: 10px;
  font-weight: 500;
  color: hsl(var(--foreground) / 0.85);
  line-height: 1.3;
}

.harold-task-panel__step-error {
  font-size: 9px;
  color: hsl(var(--destructive));
  line-height: 1.3;
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
}

/* ── Harold Settings Panel ─────────────────────────────────────────────────── */

.harold-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid hsl(var(--border) / 0.4);
  animation: harold-settings-in 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes harold-settings-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.harold-settings__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.harold-settings__title {
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--foreground));
  letter-spacing: 0.01em;
}

.harold-settings__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-size: 10px;
  transition: background 150ms ease, color 150ms ease;
}

.harold-settings__close:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.harold-settings__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.harold-settings__section--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.harold-settings__label {
  font-size: 10px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.harold-settings__sublabel {
  font-size: 9px;
  color: hsl(var(--muted-foreground) / 0.7);
  line-height: 1.3;
}

/* Personality card grid */
.harold-settings__personality-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.harold-settings__personality-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border) / 0.4);
  background: hsl(var(--background) / 0.5);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.harold-settings__personality-card:hover {
  border-color: hsl(var(--border));
  background: hsl(var(--muted) / 0.5);
}

.harold-settings__personality-card--active {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.06);
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.15);
}

.harold-settings__personality-card--active:hover {
  border-color: hsl(var(--primary) / 0.6);
  background: hsl(var(--primary) / 0.08);
}

.harold-settings__personality-header {
  display: flex;
  align-items: center;
  gap: 4px;
}

.harold-settings__personality-icon {
  font-size: 12px;
  line-height: 1;
}

.harold-settings__personality-name {
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--foreground));
  flex: 1;
}

.harold-settings__personality-desc {
  font-size: 9px;
  color: hsl(var(--muted-foreground));
  line-height: 1.3;
}

/* Voice select */
.harold-settings__select {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--background) / 0.5);
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: border-color 150ms ease;
  outline: none;
  width: 100%;
}

.harold-settings__select:hover {
  border-color: hsl(var(--border));
}

.harold-settings__select:focus {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.15);
}

/* Toggle switch */
.harold-settings__toggle-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.harold-settings__toggle {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  border: none;
  background: hsl(var(--muted));
  cursor: pointer;
  flex-shrink: 0;
  transition: background 200ms ease;
}

.harold-settings__toggle--on {
  background: hsl(var(--primary));
}

.harold-settings__toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.harold-settings__toggle--on .harold-settings__toggle-thumb {
  transform: translateX(14px);
}

.harold-settings__note {
  font-size: 9px;
  color: hsl(var(--muted-foreground) / 0.5);
  text-align: center;
  font-style: italic;
}

/* ── Dark mode adjustments ─────────────────────────────────────────────────── */

.dark .harold-pill__orb {
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 1px 4px rgba(0, 0, 0, 0.2);
}

.dark .harold-pill__orb:hover {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark .harold-pill--expanded {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Training Diagnostics Panel ────────────────────────────────────────────── */

.harold-pill__diag {
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding-top: 4px;
}

.harold-pill__diag-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  color: inherit;
}

.harold-pill__diag-toggle-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: hsl(var(--muted-foreground) / 0.7);
}

.harold-pill__diag-warn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: hsl(38 92% 50% / 0.2);
  color: hsl(38 92% 50%);
  font-size: 9px;
  font-weight: 700;
  padding: 0 3px;
}

.harold-pill__diag-chevron {
  transition: transform 200ms ease;
  display: flex;
  align-items: center;
  color: hsl(var(--muted-foreground) / 0.5);
}

.harold-pill__diag-chevron--open {
  transform: rotate(180deg);
}

.harold-pill__diag-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
  animation: harold-diag-in 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes harold-diag-in {
  from { opacity: 0; max-height: 0; }
  to   { opacity: 1; max-height: 250px; }
}

.harold-pill__diag-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.harold-pill__diag-section-title {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground) / 0.6);
  padding-bottom: 1px;
}

.harold-pill__diag-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 0;
}

.harold-pill__diag-key {
  font-size: 9px;
  color: hsl(var(--muted-foreground) / 0.7);
  flex-shrink: 0;
}

.harold-pill__diag-value {
  font-size: 9px;
  color: hsl(var(--foreground) / 0.85);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harold-pill__diag-mono {
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
}

.harold-pill__diag-status--ok {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: hsl(142 71% 45%);
}

.harold-pill__diag-status--warn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: hsl(38 92% 50%);
}

/* ── Warnings ──────────────────────────────────────────────────────────────── */

.harold-pill__diag-warnings {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.harold-pill__diag-warning {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  background: hsl(38 92% 50% / 0.08);
  border: 1px solid hsl(38 92% 50% / 0.15);
  font-size: 9px;
  color: hsl(38 92% 50%);
  line-height: 1.3;
}

.harold-pill__diag-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Transcript Feed ───────────────────────────────────────────────────────── */

.harold-pill__diag-feed-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 1px 0;
  color: inherit;
}

.harold-pill__diag-feed {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}

.harold-pill__diag-feed-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 4px;
  border-radius: 4px;
  border-left: 2px solid transparent;
}

.harold-pill__diag-feed-item--user {
  border-left-color: hsl(142 71% 45% / 0.5);
  background: hsl(142 71% 45% / 0.04);
}

.harold-pill__diag-feed-item--assistant {
  border-left-color: hsl(217 91% 60% / 0.5);
  background: hsl(217 91% 60% / 0.04);
}

.harold-pill__diag-feed-item--system {
  border-left-color: hsl(var(--muted-foreground) / 0.3);
  background: hsl(var(--muted) / 0.3);
}

.harold-pill__diag-feed-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.harold-pill__diag-feed-role {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.harold-pill__diag-feed-item--user .harold-pill__diag-feed-role {
  color: hsl(142 71% 45%);
}

.harold-pill__diag-feed-item--assistant .harold-pill__diag-feed-role {
  color: hsl(217 91% 60%);
}

.harold-pill__diag-feed-item--system .harold-pill__diag-feed-role {
  color: hsl(var(--muted-foreground));
}

.harold-pill__diag-feed-feature {
  font-size: 8px;
  color: hsl(var(--muted-foreground) / 0.5);
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
}

.harold-pill__diag-feed-time {
  font-size: 8px;
  color: hsl(var(--muted-foreground) / 0.4);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.harold-pill__diag-feed-content {
  font-size: 9px;
  color: hsl(var(--foreground) / 0.7);
  line-height: 1.3;
  word-break: break-word;
  max-height: 40px;
  overflow: hidden;
}

