/* ── Demo page — scoped to .demo-body ───────────────────────────── */

.demo-body {
  min-height: 100vh;
  background: var(--bg);
}

/* Nav */
.demo-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
}

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

.nav-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,230,118,0.25);
  padding: 4px 12px;
  border-radius: 100px;
}

/* Layout */
.demo-layout {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 0;
  min-height: calc(100vh - 65px);
}

/* LEFT panel */
.demo-left {
  padding: 40px 32px;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
}

.scenario-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.scenario-sub {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* Business type picker */
.biz-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.biz-btn {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.biz-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.biz-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Phone mockup */
.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone {
  width: 260px;
  height: 480px;
  background: #1a1a1a;
  border-radius: 36px;
  border: 2px solid #333;
  box-shadow: 0 0 0 6px #111, 0 24px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,230,118,0.06);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.phone-notch {
  width: 80px;
  height: 20px;
  background: #111;
  border-radius: 0 0 14px 14px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.phone-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.phone-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 16px;
  transition: opacity 0.3s;
}

.phone-state.hidden { opacity: 0; pointer-events: none; }

/* Idle state */
.phone-time {
  position: absolute;
  top: 28px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}

.phone-idle-icon { font-size: 2.5rem; margin-bottom: 12px; }

.phone-idle-text {
  font-size: 0.9rem;
  color: #888;
  text-align: center;
  line-height: 1.5;
}

.phone-idle-text span { color: #ff4444; display: block; margin-top: 4px; }

/* Incoming call screen */
.call-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: linear-gradient(160deg, #1a1a2e 0%, #0d0d0d 100%);
  position: absolute;
  inset: 0;
  padding: 48px 20px 24px;
  animation: callPulse 2s ease-in-out infinite;
}

@keyframes callPulse {
  0%, 100% { box-shadow: inset 0 0 0 rgba(0,230,118,0); }
  50% { box-shadow: inset 0 0 80px rgba(0,230,118,0.05); }
}

.caller-avatar {
  font-size: 3rem;
  width: 72px;
  height: 72px;
  background: #222;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #333;
  margin-bottom: 8px;
}

.caller-label { font-size: 0.82rem; color: #888; }

.caller-number {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.call-status {
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
  animation: blink 1s ease-in-out infinite;
}

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

.call-btns { margin-top: auto; display: flex; gap: 24px; }

.call-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #cc3333;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  cursor: pointer;
  font-size: 1.3rem;
  justify-content: center;
  transition: transform 0.15s, background 0.15s;
}

.call-btn:hover { transform: scale(1.1); }
.call-btn.decline { background: #cc2222; }
.call-btn small { font-size: 0.6rem; color: rgba(255,255,255,0.7); font-family: var(--font-body); display: none; }

/* SMS thread */
.sms-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 32px 12px 10px;
  border-bottom: 1px solid #222;
  width: 100%;
}

.sms-avatar {
  width: 32px;
  height: 32px;
  background: #222;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sms-contact strong { font-size: 0.82rem; color: #fff; display: block; font-family: var(--font-display); }
.sms-contact small { font-size: 0.68rem; color: #666; }

.ai-badge-small {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,230,118,0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-display);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.sms-thread {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sms-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.78rem;
  line-height: 1.45;
  animation: bubbleIn 0.25s ease-out;
}

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

.sms-bubble.outbound {
  background: var(--accent);
  color: #000;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.sms-bubble.inbound {
  background: #222;
  color: var(--fg);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.sms-compose {
  width: 100%;
  padding: 8px 10px;
  border-top: 1px solid #222;
}

.compose-hint {
  font-size: 0.65rem;
  color: #555;
  margin-bottom: 6px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.compose-options { display: flex; flex-direction: column; gap: 5px; }

.compose-btn {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.72rem;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  line-height: 1.3;
}

.compose-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Booked screen */
.booked-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.booked-check { font-size: 3rem; }

.booked-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.booked-detail {
  font-size: 0.85rem;
  color: #fff;
  font-family: var(--font-display);
}

.booked-sub { font-size: 0.72rem; color: #666; }

/* Action button */
.action-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.action-btn:hover { background: #00ff85; transform: translateY(-1px); }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-icon { font-size: 1.2rem; }

.reset-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 8px 20px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.reset-btn:hover { border-color: var(--accent); color: var(--accent); }
.reset-btn.hidden { display: none; }

/* RIGHT panel */
.demo-right {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

/* Cards */
.timeline-card,
.response-card,
.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  transition: background 0.3s;
}

.status-dot.live {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { box-shadow: 0 0 4px var(--accent); }
  50% { box-shadow: 0 0 12px var(--accent); }
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 12px; min-height: 60px; }

.timeline-empty {
  font-size: 0.88rem;
  color: var(--fg-muted);
  font-style: italic;
}

.timeline-event {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fadeSlide 0.3s ease-out;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.event-icon {
  font-size: 1rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.event-body {
  flex: 1;
}

.event-label {
  font-size: 0.88rem;
  color: var(--fg);
  font-weight: 500;
}

.event-time {
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-family: var(--font-display);
}

/* Response time */
.response-display { display: flex; flex-direction: column; gap: 10px; }

.response-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.response-label { font-size: 0.82rem; color: var(--fg-muted); }

.response-bar-wrap { margin-top: 6px; }

.response-bar-bg {
  height: 8px;
  background: #1a1a1a;
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.response-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.6s ease-out;
}

.response-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--fg-muted);
  font-family: var(--font-display);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-val.accent { color: var(--accent); }

.stat-lbl {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.refresh-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

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

/* Leads list */
.leads-list { display: flex; flex-direction: column; gap: 8px; }

.leads-loading { font-size: 0.82rem; color: var(--fg-muted); font-style: italic; }

.lead-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  animation: fadeSlide 0.3s ease-out;
}

.lead-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lead-status-dot.new { background: #888; }
.lead-status-dot.contacted { background: #f0a500; }
.lead-status-dot.converted { background: var(--accent); }

.lead-phone {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg);
  flex: 1;
}

.lead-type { font-size: 0.75rem; color: var(--fg-muted); }

.lead-time {
  font-size: 0.72rem;
  color: var(--fg-muted);
  font-family: var(--font-display);
}

/* CTA */
.demo-cta {
  background: var(--bg-elevated);
  border: 1px solid rgba(0,230,118,0.2);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
}

.demo-cta h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.demo-cta p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.cta-btn:hover { background: #00ff85; transform: translateY(-1px); }

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

  .demo-left {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .demo-right {
    padding: 24px 20px;
  }

  .demo-nav {
    padding: 16px 20px;
  }
}
