/* Chatbot page styles — conversational lead capture flow */
.chatbot-page {
  min-height: calc(100vh - 61px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}
.chatbot-wrapper {
  width: 100%;
  max-width: 520px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 620px;
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.chat-avatar {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.chat-header-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
}
.chat-header-sub { font-size: 12px; color: var(--fg-2); margin-top: 2px; }

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.chat-message { display: flex; }
.chat-message.user { justify-content: flex-end; }
.chat-message.bot { justify-content: flex-start; }
.message-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg);
}
.bot .message-bubble {
  background: var(--bg-3);
  border-bottom-left-radius: 4px;
}
.user .message-bubble {
  background: var(--accent);
  color: #0f1117;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

/* Input area */
.chat-input-area {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  min-height: 120px;
}
.hidden { display: none !important; }

/* Choice buttons */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.choice-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: var(--font-body);
}
.choice-btn:hover {
  background: var(--accent-dim);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent);
}

/* Text input */
.text-input-group { display: flex; flex-direction: column; gap: 10px; }
.step-label {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.5;
}
.text-input-row { display: flex; gap: 10px; }
.chat-text-input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
}
.chat-text-input:focus { border-color: rgba(245, 158, 11, 0.5); }
.chat-send-btn {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #0f1117;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.chat-send-btn:hover { opacity: 0.85; }

/* Loading dots */
.chat-loading { padding: 10px 0; }
.loading-dots { display: flex; gap: 6px; }
.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--fg-2);
  border-radius: 50%;
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Success */
.chat-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 10px 0;
}
.success-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
}
.success-body {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.6;
  max-width: 340px;
}

@media (max-width: 480px) {
  .chatbot-page { padding: 20px 12px; }
  .chatbot-wrapper { height: 560px; }
}