/* demo.css — Law firm intake chatbot demo styles */
/* Follows theme.css design tokens: --bg #0d0d0d, --accent #c8f526, --fg-muted #a1a1a1 */

.demo-page {
  min-height: 100vh;
  padding: 100px 24px 80px;
  background: var(--bg);
  max-width: 1100px;
  margin: 0 auto;
}

/* HEADER */
.demo-header {
  text-align: center;
  margin-bottom: 48px;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(200, 245, 38, 0.08);
  border: 1px solid rgba(200, 245, 38, 0.25);
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.demo-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.demo-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 12px;
}

.demo-sub {
  font-size: 16px;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* GRID */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
}

/* CHAT CARD */
.chat-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.chat-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: #141414;
  border-bottom: 1px solid var(--border);
}

.chat-card-icon { font-size: 20px; }

.chat-card-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.chat-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-muted);
}

.chat-card-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Locale toggle pill (EN / ES switch) */
.chat-locale-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--fg-muted, #9aa0a6);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.15s, border-color 0.15s;
}

.chat-locale-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* CHAT FEED */
.chat-feed {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 420px;
  max-height: 520px;
  overflow-y: auto;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeInUp 0.3s ease;
}

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

.bot-message { align-items: flex-start; }
.user-message { align-items: flex-end; }

.message-content {
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 16px;
  border-radius: 14px;
  max-width: 85%;
  white-space: pre-wrap;
}

.bot-message .message-content {
  background: #1e1e1e;
  color: #e8e8e8;
  border-bottom-left-radius: 4px;
}

.user-message .message-content {
  background: var(--accent);
  color: #0d0d0d;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.message-hint {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 4px;
  font-style: italic;
}

.message-time {
  font-size: 10px;
  color: #555;
  padding: 0 4px;
}

.user-message .message-time { text-align: right; }

/* QUICK REPLIES */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
  width: 100%;
}

.qr-btn {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #ccc;
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.qr-btn:hover {
  background: #2a2a2a;
  border-color: rgba(200, 245, 38, 0.4);
  color: var(--accent);
}

/* INPUT AREA */
.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px;
  background: #141414;
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 24px;
  padding: 12px 18px;
  color: #fff;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.chat-input:focus {
  border-color: rgba(200, 245, 38, 0.5);
}

.chat-input::placeholder { color: #555; }

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

.chat-send-btn:hover { background: var(--accent-dark); }

/* CALLBACK AREA */
.callback-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  background: var(--accent);
  color: #0d0d0d;
}

.callback-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
}

.callback-btn--ghost:hover {
  background: #1a1a1a;
  color: #fff;
}

/* SUMMARY PANEL */
.summary-panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #141414;
  border-bottom: 1px solid var(--border);
}

.summary-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.summary-count {
  font-size: 12px;
  color: var(--fg-muted);
}

.summary-fields {
  padding: 8px 0;
}

.summary-field {
  padding: 12px 20px;
  border-bottom: 1px solid #1a1a1a;
  transition: background 0.2s;
}

.summary-field:last-child { border-bottom: none; }

.summary-field-label {
  font-size: 10px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.summary-field-value {
  font-size: 14px;
  font-weight: 500;
  color: #e8e8e8;
  min-height: 20px;
}

.summary-field-value--empty {
  color: #3a3a3a;
  font-weight: 400;
}

/* Summary complete badge */
.summary-complete {
  padding: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 245, 38, 0.1);
  border: 1px solid rgba(200, 245, 38, 0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.complete-badge-icon { font-size: 14px; }

.complete-desc {
  font-size: 12px;
  color: var(--fg-muted);
  margin: 0;
}

/* Summary actions */
.summary-actions {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  transition: all 0.15s;
  width: 100%;
}

.action-btn:hover {
  background: #1e1e1e;
  color: #fff;
}

.action-btn--accent {
  background: var(--accent);
  color: #0d0d0d;
  border-color: var(--accent);
}

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

/* FEATURE CALLOUTS */
.demo-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--border);
}

.demo-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 20px;
  background: var(--bg-alt);
}

.demo-feature-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.demo-feature strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.demo-feature p {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
}

/* NAV BACK LINK */
.nav-back {
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-back:hover { color: var(--accent); }

.nav-spacer { flex: 1; }

/* UTILITY */
.hidden { display: none !important; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    order: -1;
  }

  .demo-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .demo-features {
    grid-template-columns: 1fr;
  }

  .quick-replies { flex-direction: column; }
}