/* agenticeducation.online — Jordan FCCLA chat */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:         #0d1117;
  --bg2:        #161b22;
  --bg3:        #21262d;
  --border:     #30363d;
  --text:       #e6edf3;
  --text-muted: #7d8590;
  --accent:     #8957e5;
  --accent-h:   #6e3fc0;
  --gold:       #c8a96e;
  --green:      #3fb950;
  --radius:     8px;
  --font:       system-ui, -apple-system, sans-serif;
  --mono:       'Courier New', monospace;
}
html { font-size: 16px; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.7; min-height: 100vh; }

/* Chat page full-height layout */
.chat-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.chat-header { background: var(--bg2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.header-inner { max-width: 800px; margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; gap: 0.9rem; }
.tutor-avatar-sm { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; font-weight: bold; flex-shrink: 0;
  background: linear-gradient(135deg, #8957e5, #c8a96e); color: white; }
.tutor-info-sm strong { display: block; font-size: 0.98rem; }
.tutor-info-sm span { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.header-badge { margin-left: auto; font-size: 0.72rem; color: var(--text-muted);
  background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 0.2rem 0.65rem; }

.chat-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; max-width: 800px;
  margin: 0 auto; width: 100%; padding: 0 1rem; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem 0; display: flex; flex-direction: column; gap: 1rem; }

.msg { display: flex; gap: 0.65rem; align-items: flex-start; }
.msg-user { flex-direction: row-reverse; }
.msg-user .msg-bubble { background: var(--accent); color: white;
  border-radius: 12px 12px 4px 12px; }
.msg-assistant .msg-bubble { background: var(--bg2); border: 1px solid var(--border);
  border-radius: 4px 12px 12px 12px; color: var(--gold); }
.msg-bubble { padding: 0.7rem 1rem; font-size: 0.92rem; max-width: 88%;
  line-height: 1.7; word-break: break-word; }
.msg-bubble strong { font-weight: 600; }
.msg-bubble em { font-style: italic; color: #a8b8d0; }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1rem; font-weight: bold; flex-shrink: 0; margin-top: 2px;
  background: linear-gradient(135deg, #8957e5, #c8a96e); color: white; }

.typing-indicator { display: flex; gap: 0.65rem; align-items: center; }
.typing-dots { display: flex; gap: 4px; padding: 0.65rem 0.9rem;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 4px 12px 12px 12px; }
.typing-dots span { width: 7px; height: 7px; background: var(--text-muted); border-radius: 50%;
  animation: bounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,80%,100% { transform: scale(0.8); opacity: 0.5; } 40% { transform: scale(1.1); opacity: 1; } }

.chat-input-area { flex-shrink: 0; padding: 0.9rem 0 1.25rem; border-top: 1px solid var(--border); }
.chat-input-area form { display: flex; gap: 0.65rem; align-items: flex-end; }
#message-input { flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 0.65rem 1rem; font-size: 0.92rem; font-family: var(--font);
  resize: none; min-height: 50px; max-height: 180px; outline: none; line-height: 1.5; }
#message-input:focus { border-color: var(--accent); }
#message-input::placeholder { color: var(--text-muted); }
.btn-send { background: var(--accent); color: white; border: none; border-radius: 8px;
  padding: 0.65rem 1.2rem; font-size: 0.92rem; cursor: pointer; font-family: var(--font); }
.btn-send:hover { background: var(--accent-h); }
.btn-send:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 600px) {
  .chat-wrap { padding: 0 0.5rem; }
}