/* ===== SOCRATIC CHAT ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-msg {
  max-width: 90%;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.65;
  animation: msgIn 0.3s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.assistant {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}
.chat-msg.user {
  align-self: flex-end;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text-primary);
}
.chat-msg.system {
  align-self: center;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  padding: 8px;
}

/* Markdown in messages */
.chat-msg strong { color: var(--text-primary); font-weight: 600; }
.chat-msg em { font-style: italic; }
.chat-msg a {
  color: var(--secondary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-msg a:hover { color: var(--secondary); }
.chat-msg ul, .chat-msg ol {
  padding-left: 20px;
  margin: 8px 0;
}
.chat-msg li { margin-bottom: 4px; }
.chat-msg code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(139, 92, 246, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 6px 0;
}
.typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Suggested questions */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 8px;
}
.suggestion-chip {
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--primary-light);
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  text-align: left;
  line-height: 1.3;
}
.suggestion-chip:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Input area */
.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border-default);
  background: var(--bg-surface);
}
.chat-input {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  resize: none;
  min-height: 44px;
  max-height: 120px;
  transition: border-color var(--transition-fast);
  outline: none;
}
.chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-send-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  color: #fff;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.chat-send-btn:hover { transform: scale(1.05); box-shadow: var(--shadow-glow-sm); }
.chat-send-btn:disabled { opacity: 0.4; transform: none; cursor: not-allowed; }
.chat-send-btn svg { width: 18px; height: 18px; }
