/* Chat drawer — right-side panel matching the Geist design system */

.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--accent, #111);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.chat-fab:hover { transform: translateY(-1px); }

.chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  background: var(--bg, #fff);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.06);
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty {
  padding: 20px;
  background: var(--bg-sunken, #f8f8f8);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.chat-suggestions {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
}
.chat-suggestions li {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 6px;
  font-size: 13px;
  cursor: pointer;
  background: var(--bg, #fff);
}
.chat-suggestions li:hover { background: var(--bg-hover, #f3f3f3); }

.chat-msg {
  display: flex;
}
.chat-msg-user { justify-content: flex-end; }
.chat-msg-assistant { justify-content: flex-start; }

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg-user .chat-bubble {
  background: var(--accent, #111);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-assistant .chat-bubble {
  background: var(--bg-sunken, #f3f3f3);
  color: var(--text, #111);
  border-bottom-left-radius: 4px;
}

.chat-tool {
  padding: 10px 14px;
  background: var(--bg-sunken, #f3f3f3);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
}
.chat-tool-title {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-tool-icon { font-size: 11px; }
.chat-tool-summary {
  margin-top: 6px;
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 13px;
  color: var(--text, #111);
}
.chat-tool-status { margin-top: 6px; font-size: 12px; }
.chat-tool-status.pos { color: var(--positive, #16a34a); }
.chat-tool-status.neg { color: var(--negative, #b91c1c); }
.chat-tool-status.muted { color: var(--text-tertiary, #9ca3af); }

.chat-tool-proposal {
  background: #fef9e7;
  border-color: #f5d785;
}

.chat-input-row {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
}
.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.chat-input-row input:focus { border-color: var(--border-strong, #999); }

.chat-system {
  font-size: 12px;
  color: var(--text-tertiary, #9ca3af);
  text-align: center;
}
