/* ======================================
   FocusWell AI – Section Layout
====================================== */

#focuswell-ai-wrapper {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.focuswell-ai-hero {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 24px;
  text-align: center;
}

.focuswell-ai-hero h1 {
  font-size: 40px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

.focuswell-ai-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 14px;
}

.focuswell-ai-description {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
  max-width: 720px;
  margin: 0 auto 18px;
}

.focuswell-ai-points {
  list-style: none;
  padding: 0;
  margin: 0 auto 18px;
  max-width: 520px;
}

.focuswell-ai-points li {
  font-size: 14px;
  color: #475569;
  margin-bottom: 8px;
}

.focuswell-ai-note {
  font-size: 13px;
  color: #64748b;
}

/* ======================================
   Chat – Full Width
====================================== */

.focuswell-ai-chat {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Main chat container */
.chat-box {
  width: 100%;
  padding: 18px;
  background: linear-gradient(180deg, #0f0f0f, #151515);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

/* Messages area */
#chat-messages {
  min-height: 340px;
  max-height: 520px;
  overflow-y: auto;
  padding: 6px;
  margin-bottom: 14px;

  scrollbar-width: thin;
  scrollbar-color: #3b82f6 transparent;
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 10px;
}

/* Message base */
.message {
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.65;
  animation: fadeInUp 0.25s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* User message */
.message.user {
  margin-left: auto;
  max-width: 70%;
  background: #2563eb;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: right;
  white-space: pre-wrap;
}

/* AI message */
.message.ai {
  margin-right: auto;
  max-width: 92%;
  background: #1e1e1e;
  color: #f1f1f1;
  padding: 14px 16px;
  border-radius: 14px;
  white-space: pre-wrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.message.ai strong {
  color: #93c5fd;
}

/* Input row */
.chat-input {
  display: flex;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  outline: none;
  font-size: 14px;
}

.chat-input button {
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.35);
}

/* ======================================
   Mobile
====================================== */

@media (max-width: 640px) {
  .focuswell-ai-hero h1 {
    font-size: 32px;
  }

  #chat-messages {
    max-height: 420px;
  }

  .message.user {
    max-width: 85%;
  }
}
.chat-messages {
  overflow-y: auto;
  max-height: 70vh;
  padding-right: 8px;
}

.chat-message {
  white-space: pre-wrap;      /* preserves line breaks */
  word-wrap: break-word;      /* legacy support */
  overflow-wrap: break-word;  /* modern support */
}

.chat-message.assistant {
  max-height: none;
  overflow: visible;
  line-height: 1.6;
}
