/* AI Chat — tool-specific styles (site/style.css stays shared-only). */

.chat-engines {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.chat-engine-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.chat-engine-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.chat-engine-option input { margin-top: 4px; }
.chat-engine-option .name { font-weight: 600; }
.chat-engine-option .status { color: var(--muted); font-size: 0.85rem; }

.chat-log {
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 220px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(148, 163, 184, 0.05);
}
.chat-empty { color: var(--muted); text-align: center; margin: auto; }

.chat-msg { max-width: 85%; white-space: pre-wrap; word-break: break-word;
  border-radius: 12px; padding: 8px 14px; font-size: 0.95rem; line-height: 1.5; }
.chat-msg.user { align-self: flex-end; background: var(--accent); color: #fff; }
.chat-msg.assistant { align-self: flex-start; border: 1px solid var(--border); }
.chat-msg .who { display: block; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; opacity: 0.7; margin-bottom: 2px; }

/* "Thinking…" indicator shown until the first token arrives. */
.chat-thinking { display: flex; gap: 7px; align-items: center;
  color: var(--muted); font-size: 0.85rem; padding: 2px 0; }
.chat-thinking .dot { width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted); animation: chat-pulse 1s ease-in-out infinite; }
.chat-thinking .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-thinking .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.chat-input-row { display: flex; gap: 8px; margin-top: 12px; }
.chat-input-row textarea {
  flex: 1;
  min-height: 54px;
  max-height: 160px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: inherit;
  color: inherit;
}
.chat-side-btns { display: flex; flex-direction: column; gap: 6px; }
