/* Support app only -- everything here builds on the shared tokens in
   packages/ui/src/tokens.css, so light/dark and the brand palette carry. */

.small { font-size: 12.5px; }
.form-error { color: var(--danger); margin: 8px 0; }
.form-notice { color: var(--success); margin: 8px 0; font-size: 13px; }
.form-hint { margin: -4px 0 12px; font-size: 12.5px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-title { margin: 0 0 10px; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-title-row .card-title { margin: 0; }

.call-banner {
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-tint);
  color: var(--ink);
  font-size: 13px;
}

/* Chat on the left, the record beside it; stacked on a phone. */
.call-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.call-side { display: flex; flex-direction: column; gap: 18px; }
.call-side > .card { margin: 0; }
.call-grid > .card { margin: 0; position: sticky; top: 14px; }
@media (max-width: 1100px) {
  .call-grid { grid-template-columns: minmax(0, 1fr); }
  .call-grid > .card { position: static; }
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  max-height: calc(100vh - 290px);
  overflow-y: auto;
  padding: 2px 2px 8px;
}
@media (max-width: 1100px) {
  .chat { max-height: 70vh; }
}
.chat-msg {
  padding: 10px 13px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-msg--engineer {
  align-self: flex-end;
  max-width: 85%;
  background: var(--clay-tint);
  border: 1px solid var(--line);
  white-space: pre-wrap;
}
.chat-msg--assistant {
  align-self: stretch;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}
.chat-activity {
  font-size: 12px;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}
.chat-activity::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-teal);
}
.chat-activity--live::before { background: var(--clay); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.35; } to { opacity: 1; } }
.chat-sources { margin-top: 8px; font-size: 12px; color: var(--muted); }
.chat-error {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-tint);
  color: var(--ink);
  font-size: 13px;
}
.chat-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 0; }
.starter {
  font: inherit;
  font-size: 13px;
  text-align: left;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--box-border);
  background: var(--box-bg);
  color: var(--ink);
  cursor: pointer;
}
.starter:hover { border-color: var(--clay); }

.chat-input { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.chat-input textarea { flex: 1; resize: vertical; min-height: 44px; }

/* Assistant replies (Markdown.tsx). */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 8px; }
.md .md-heading { font-weight: 700; margin-top: 12px; }
.md ol, .md ul { margin: 0 0 8px; padding-left: 22px; }
.md li { margin-bottom: 4px; }
.md code { font-size: 12.5px; padding: 1px 5px; border-radius: var(--radius-xs); background: var(--panel); border: 1px solid var(--line-soft); }
.md pre { font-size: 12.5px; padding: 10px; border-radius: var(--radius-sm); background: var(--panel); overflow-x: auto; }

.log-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 280px; overflow-y: auto; }
.log-list li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.log-list li:last-child { border-bottom: none; }
.log-body { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-input { display: flex; gap: 8px; align-items: center; }
.log-input input { flex: 1; min-width: 0; }

.similar-list, .hit-list { list-style: none; margin: 0; padding: 0; }
.similar-list li, .hit-list li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.similar-list li:last-child, .hit-list li:last-child { border-bottom: none; }
.hit-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
