/* chat.css — Lumina chat UI. Extends theme.css tokens. */

.chat-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px 40px;
  min-height: calc(100vh - 73px);
  display: flex;
  flex-direction: column;
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 0 20px;
}

.lumina-avatar {
  width: 48px;
  height: 48px;
  background: var(--agent-bubble);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 2px solid var(--accent);
}

.lumina-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
}

.lumina-tagline {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 2px;
}

/* Message list */
.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.message {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kid-label { color: #2D6A4F; }
.agent-label { color: #A07610; }

.message-bubble {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 85%;
}

.kid-bubble {
  background: var(--child-bubble);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.agent-bubble {
  background: var(--agent-bubble);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.error-bubble {
  background: #fde8e8;
  color: #c0392b;
  align-self: flex-start;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 0 0 8px 4px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--fg-muted);
  border-radius: 50%;
  opacity: 0.4;
  animation: dotPulse 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* Input area */
.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.chat-input-area input {
  flex: 1;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}

.chat-input-area input:focus {
  border-color: var(--accent);
}

.chat-input-area button {
  padding: 14px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.chat-input-area button:hover {
  background: var(--accent-dark);
}

.chat-input-area button:disabled {
  background: var(--fg-muted);
  cursor: not-allowed;
}

/* Continue button below agent message */
.agent-message {
  align-items: flex-start;
}

.agent-message .message-label {
  padding-left: 4px;
}

.continue-btn {
  margin: 4px 0 0 4px;
  padding: 6px 14px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.continue-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Mobile */
@media (max-width: 480px) {
  .message-bubble { max-width: 92%; }
  .chat-container { padding: 0 16px 32px; }
  .chat-input-area button { padding: 14px 18px; }
}