/* ========================================
   BOT DEMO — Shared chat widget styles
   ======================================== */

:root {
  --primary: #6C63FF;
  --accent: #00D4AA;
  --dark: #0A0A0F;
  --dark-surface: #12121A;
  --dark-card: #1A1A25;
  --dark-border: #2A2A3A;
  --text: #E8E8F0;
  --text-muted: #9494A8;
  --white: #FFFFFF;
  --radius: 12px;
  --transition: 0.3s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- HEADER ---- */
.demo-header {
  background: var(--dark-surface);
  border-bottom: 1px solid var(--dark-border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.back-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}
.back-link:hover { color: var(--text); }

.demo-header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.demo-header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.header-cta {
  background: var(--primary);
  color: var(--white);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition);
}
.header-cta:hover { background: #5A52D5; color: var(--white); }

/* ---- TIER BADGE ---- */
.tier-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tier-1 { background: rgba(0,212,170,0.15); color: var(--accent); }
.tier-2 { background: rgba(108,99,255,0.15); color: var(--primary); }

/* ---- MAIN LAYOUT ---- */
.demo-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ---- SIDEBAR ---- */
.demo-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--dark-surface);
  border-right: 1px solid var(--dark-border);
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.sidebar-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}

.sidebar-section h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.sidebar-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.sidebar-monthly {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sidebar-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Feature list */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feature-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 1px solid var(--dark-border);
}
.feature-list li:last-child { border-bottom: none; }

/* Try buttons */
.try-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.try-btn {
  text-align: left;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
}
.try-btn:hover {
  border-color: var(--primary);
  color: var(--text);
  background: rgba(108,99,255,0.08);
}

/* Comparison table */
.sidebar-compare {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 14px;
}
.compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--dark-border);
}
.compare-row:last-child { border-bottom: none; }
.compare-row span:first-child { color: var(--text-muted); }
.compare-yes { color: var(--accent); font-weight: 600; }
.compare-neutral { color: var(--text-muted); }

/* CTA */
.sidebar-cta {
  border-top: 1px solid var(--dark-border);
  padding-top: 20px;
}
.sidebar-cta p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}
.btn-sidebar-cta {
  display: block;
  text-align: center;
  background: var(--primary);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 8px;
  transition: background var(--transition);
}
.btn-sidebar-cta:hover { background: #5A52D5; color: var(--white); }
.btn-sidebar-upgrade {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color var(--transition);
}
.btn-sidebar-upgrade:hover { color: var(--text); }

/* ---- CHAT PANEL ---- */
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Business bar */
.chat-business-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--dark-card);
  border-bottom: 1px solid var(--dark-border);
}
.business-avatar {
  width: 40px;
  height: 40px;
  background: rgba(108,99,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.business-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}
.business-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
.status-ai { background: var(--primary); }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,212,170,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 5px rgba(0,212,170,0); }
}

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.message {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  animation: messageIn 0.3s ease;
}

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

.message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.bot-avatar { background: rgba(108,99,255,0.15); }
.user-avatar { background: rgba(0,212,170,0.15); }

.message-content {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.6;
}
.bot-message .message-content {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--text);
}
.user-message {
  flex-direction: row-reverse;
}
.user-message .message-content {
  background: var(--primary);
  color: var(--white);
  border: none;
}

/* Quick Replies */
.quick-replies {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-left: 44px;
  margin-bottom: 6px;
}
.quick-reply {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--dark-border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}
.quick-reply:hover {
  border-color: var(--primary);
  background: rgba(108,99,255,0.1);
  color: var(--primary);
}

/* Typing */
.typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
}
.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingDot 1.4s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* Tier 1 limitation notice */
.bot-limitation {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #EF4444;
  margin-top: 6px;
  margin-left: 44px;
}

/* ---- INPUT ---- */
.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  flex-shrink: 0;
}
.chat-input input {
  flex: 1;
  padding: 11px 16px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--transition);
}
.chat-input input:focus { outline: none; border-color: var(--primary); }
.chat-input input::placeholder { color: var(--text-muted); }
.chat-input button {
  padding: 11px 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.chat-input button:hover { background: #5A52D5; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  body { overflow: auto; height: auto; }
  .demo-layout { flex-direction: column; }
  .demo-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--dark-border); }
  .chat-panel { height: 70vh; }
  .demo-header-title { display: none; }
}
