/* Claude on the dev server: the chat panel (assets/dev-claude.js). Drawn only
   on the dev server, for an admin. The chip sits just left of the bug button
   (bug-reporter.css .tmsbug-fab: 44px at right 18px), on the same bottom line,
   and the panel opens above both. */

.dvc-chip {
  position: fixed;
  right: 72px;
  bottom: calc(18px + var(--tmsbug-dock, 0px));
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid var(--blue, #1a5fb4);
  background: var(--blue, #1a5fb4);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  z-index: 2147482990;
}
.dvc-chip[aria-expanded="true"] { display: none; }
.dvc-chip.busy::after {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 8px;
  border-radius: 50%; background: #ffd166; vertical-align: middle;
  animation: dvc-pulse 1.2s ease-in-out infinite;
}
@keyframes dvc-pulse { 50% { opacity: .3; } }

.dvc-panel {
  position: fixed;
  right: 18px;
  bottom: calc(72px + var(--tmsbug-dock, 0px));
  width: min(480px, calc(100vw - 32px));
  height: min(680px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--bg, #fff);
  color: var(--ink, #222);
  border: 1px solid var(--line, #d8d8d8);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
  z-index: 2147482990;
  font-size: 13px;
  overflow: hidden;
}
.dvc-panel[hidden] { display: none; }

.dvc-head { padding: 8px 10px 6px; border-bottom: 1px solid var(--line, #d8d8d8); background: var(--panel, #f7f7f5); }
.dvc-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dvc-row + .dvc-row { margin-top: 6px; }
.dvc-gap { flex: 1; }
.dvc-title { font-size: 14px; margin-right: 2px; }
.dvc-head select { max-width: 170px; font: inherit; }
#dvc-conv { max-width: 190px; }
.dvc-head label { display: inline-flex; align-items: center; gap: 4px; color: var(--mut, #666); }
.dvc-min { border: none; background: none; font-size: 20px; line-height: 1; padding: 0 4px; cursor: pointer; color: var(--mut, #666); }

/* Edits only / Run freely: the one control whose state changes what Claude may
   do, so its state is in its words and its colour, not only one or the other. */
.dvc-mode {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 2px 12px;
  border: 1px solid var(--green, #1e8e3e); background: var(--green-bg, #e6f6e6); color: var(--green, #1e8e3e);
}
.dvc-mode.run { border-color: var(--amber, #b7791f); background: var(--amber-bg, #fdf3e0); color: var(--amber, #b7791f); }

.dvc-meters { margin-top: 6px; display: grid; gap: 3px; color: var(--mut, #666); font-size: 12px; }
.dvc-mem { display: flex; align-items: center; gap: 8px; }
.dvc-mem-l { white-space: nowrap; }
.dvc-bar { flex: 1; height: 6px; border-radius: 3px; background: #e3e7ec; overflow: hidden; }
.dvc-fill { display: block; height: 100%; background: var(--blue, #1a5fb4); }
.dvc-fill.warn { background: var(--amber, #b7791f); }

.dvc-note { padding: 8px 10px; background: var(--amber-bg, #fdf3e0); color: var(--amber, #b7791f); }
.dvc-note[hidden], .dvc-token[hidden] { display: none; }
.dvc-token { padding: 8px 10px; border-bottom: 1px solid var(--line, #d8d8d8); display: grid; gap: 6px; }
.dvc-token p { margin: 0; }
.dvc-token input { font: inherit; padding: 4px 6px; }

.dvc-log { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.dvc-empty { color: var(--mut, #666); margin: auto 0; }
.dvc-msg { border-radius: 8px; padding: 6px 9px; max-width: 92%; }
.dvc-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.dvc-you { align-self: flex-end; background: #e8f0fb; }
.dvc-claude { align-self: flex-start; background: var(--panel, #f7f7f5); }
.dvc-tag { font-size: 11px; color: var(--mut, #666); margin-top: 3px; text-align: right; }
.dvc-tool { font-size: 12px; color: var(--mut, #666); display: flex; gap: 6px; min-width: 0; }
.dvc-tool code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dvc-out { font-size: 12px; color: var(--mut, #666); margin-left: 12px; }
.dvc-out pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; margin: 4px 0 0; background: var(--panel, #f7f7f5); padding: 6px; }
.dvc-end { font-size: 12px; color: var(--mut, #666); }
.dvc-end.err, .dvc-out.err summary { color: var(--red, #c0392b); }

.dvc-send { border-top: 1px solid var(--line, #d8d8d8); padding: 8px 10px; }
.dvc-send textarea { width: 100%; box-sizing: border-box; font: inherit; resize: vertical; min-height: 54px; }
.dvc-busy { color: var(--mut, #666); font-size: 12px; }

/* Attachments: what the next message will carry, each removable. */
.dvc-files { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.dvc-files[hidden] { display: none; }
.dvc-file { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 1px 2px 1px 8px;
  border-radius: 999px; background: #e8f0fb; font-size: 12px; }
.dvc-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dvc-file-x { border: none; background: none; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 5px; color: var(--mut, #666); }
.dvc-att { font-size: 12px; color: var(--mut, #666); margin-top: 3px; overflow-wrap: anywhere; }
.dvc-panel.drop { outline: 2px dashed var(--blue, #1a5fb4); outline-offset: -4px; }
/* A message sent while Claude worked: waiting, or started (assets/dev-claude.js). */
.dvc-q { margin-right: 6px; font-size: 12px; }
