/* ===== AI问答 - 聊天布局 ===== */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  max-width: 800px;
  margin: 0 auto;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 85%;
  animation: fadeInUp .3s ease;
}
.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg.ai {
  align-self: flex-start;
}
.chat-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.chat-msg.user .chat-avatar { background: var(--color-brand); }
.chat-msg.ai .chat-avatar { background: #1A3D63; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.chat-msg.user .chat-bubble {
  background: var(--color-brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.ai .chat-bubble {
  background: #f0f2f5;
  color: #1d2846;
  border-bottom-left-radius: 4px;
}
.chat-empty {
  text-align: center;
  color: var(--color-text-muted);
  margin-top: 60px;
  font-size: 14px;
}
.chat-empty .empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.chat-loading .chat-bubble { color: var(--color-text-muted); font-size: 13px; }
.chat-loading .dot { animation: dotPulse 1.4s infinite; }
.chat-loading .dot:nth-child(2) { animation-delay: .2s; }
.chat-loading .dot:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse {
  0%,80%,100% { opacity: 0; }
  40% { opacity: 1; }
}
/* 输入区 */
.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  background: transparent;
}
.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color .2s;
}
.chat-input-bar input:focus { border-color: var(--color-brand); }
.chat-input-bar button {
  padding: 10px 20px;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.chat-input-bar button:hover { background: #0074E5; }
.chat-input-bar button:disabled { background: var(--color-border); cursor: not-allowed; }

/* 出生信息表单 */
.birth-form {
  margin-top: 4px;
}
.bf-label {
  font-size: 13px;
  font-weight: 600;
  color: #1d2846;
  margin-bottom: 6px;
}
.birth-form-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.birth-form-row input,
.birth-form-row select {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.birth-form-row input:focus,
.birth-form-row select:focus { border-color: var(--color-brand); }
.birth-form-row input { flex: 1; }
.birth-form-row select { min-width: 72px; }
.birth-form button {
  padding: 7px 18px;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.birth-form button:hover { background: #0074E5; }
.birth-form .bf-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
