/* Chat page — uses landing page design tokens from theme.css */

/* ── NAV OVERRIDE (remove from page flow, keep for consistency) ── */
.nav { pointer-events: none; }
.nav-brand { pointer-events: auto; }

/* ── CHAT CONTAINER ── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 65px); /* subtract nav height */
  padding: 24px 24px 0;
}

.chat-window {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

/* ── MESSAGES ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  gap: 12px;
  animation: msg-in 0.2s ease-out;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  margin-top: 2px;
}

.message-user .msg-dot {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 12px rgba(180, 255, 106, 0.3);
}

.message-assistant .msg-dot {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg-2);
}

.msg-content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  max-width: 680px;
  padding: 12px 18px;
  border-radius: 14px;
}

.message-user .msg-content {
  background: var(--accent-dim);
  border: 1px solid rgba(180, 255, 106, 0.15);
  color: var(--fg);
}

.message-assistant .msg-content {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg-2);
}

.message-assistant .msg-content code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
}

/* typing indicator */
.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--fg-3);
  border-radius: 50%;
  margin: 2px;
  animation: bounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* ── INPUT AREA ── */
.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.message-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  color: var(--fg);
  resize: none;
  min-height: 48px;
  max-height: 200px;
  overflow-y: auto;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}

.message-input::placeholder { color: var(--fg-3); }
.message-input:focus { border-color: rgba(180, 255, 106, 0.35); }

.send-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.15s;
}

.send-btn:hover { transform: scale(1.05); }
.send-btn:active { transform: scale(0.95); }
.send-btn:disabled { opacity: 0.4; cursor: default; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .chat-container { padding: 12px 12px 0; }
  .chat-window { border-radius: 16px 16px 0 0; }
  .chat-messages { padding: 20px 16px 12px; }
  .msg-content { font-size: 14px; }
}

@media (max-width: 480px) {
  .chat-container { height: calc(100vh - 61px); }
  .chat-messages { gap: 12px; }
  .message-input { font-size: 14px; padding: 11px 14px; }
  .send-btn { width: 44px; height: 44px; }
}