/* Backtest AI chat — inside right panel tab */

/* T-033: Engine-rendered chat header (title + waiting indicator) */
.bt-chat-header-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.bt-chat-header-status {
  color: var(--accent, #f0b90b);
  font-size: 11px;
  font-weight: 500;
  font-style: italic;
}

.bt-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.bt-msg {
  max-width: 90%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.bt-msg-user {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.bt-msg-assistant {
  align-self: flex-start;
  background: var(--panel-2);
  color: var(--text);
  border-bottom-left-radius: 3px;
}

.bt-msg-system {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.bt-typing {
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
}

.bt-chat-input-row {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.bt-chat-input {
  flex: 1;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  font-family: var(--sans);
  font-size: 12px;
  resize: none;
  outline: none;
}

.bt-chat-input:focus { border-color: var(--blue); }

.bt-chat-send {
  padding: 0 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.bt-chat-send:hover { opacity: 0.85; }
.bt-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* AI panel layout */
#btPanelAi {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

#btPanelAi.active {
  display: flex;
}
