/* ===== TacSys Chatbot — Minimal Dark Theme ===== */
:root {
  --bg: #0c0c0e;
  --surface: #16161a;
  --surface-2: #1e1e24;
  --border: #2a2a32;
  --text: #e8e8ed;
  --text-muted: #9a9aa8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --chip-bg: #1e1e24;
  --chip-border: #2a2a32;
  --chip-hover: #25252d;
  --bot-bg: #16161a;
  --user-bg: #1e3a5f;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 72px;
  width: auto;
  display: block;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover,
.icon-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

/* Chat */
.chat {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.message {
  max-width: 92%;
  padding: 12px 16px;
  border-radius: var(--radius);
  line-height: 1.55;
  animation: fadeIn 0.25s ease;
}

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

.message.bot {
  align-self: flex-start;
  background: var(--bot-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.message.user {
  align-self: flex-end;
  background: var(--user-bg);
  color: #fff;
}

.message .name {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

/* Slide cards (Brain presentation) */
.slides {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.slide-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.slide-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent);
}

.slide-card p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.chips.hidden { display: none; }

.chip {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chip:hover {
  background: var(--chip-hover);
  border-color: var(--accent);
  color: #fff;
}

.chip.primary {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
  color: #93c5fd;
}

/* Input */
.input-area {
  padding: 12px 20px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.chat-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

#userInput {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.15s ease;
}

#userInput:focus {
  border-color: var(--accent);
}

#userInput::placeholder {
  color: var(--text-muted);
}

#sendBtn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

#sendBtn:hover {
  background: var(--accent-hover);
}

#sendBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Demo button */
.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.demo-btn:hover {
  background: var(--accent-hover);
}

/* Contact choices */
.contact-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.contact-choices button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.contact-choices button:hover {
  border-color: var(--accent);
  background: var(--chip-hover);
}

/* Typing indicator */
.typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-self: flex-start;
}

.typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .message { max-width: 95%; }
  .chip { font-size: 12px; padding: 7px 12px; }
  .header, .chat, .chips, .input-area { padding-left: 14px; padding-right: 14px; }
}
