/* Demo page styles — extends landing page theme */

.demo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.demo-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.demo-back:hover { color: var(--fg); }

.demo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.2);
  padding: 6px 14px;
  border-radius: 20px;
}

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

.demo-tag {
  font-size: 0.75rem;
  color: var(--fg-dim);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
}

/* Main layout */
.demo-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: start;
}

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

/* Phone mockup */
.phone-wrapper {
  position: sticky;
  top: 24px;
}

.phone-shell {
  width: 320px;
  background: #111827;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  border: 2px solid #1f2937;
}

.phone-notch {
  width: 80px;
  height: 24px;
  background: #111827;
  border-radius: 0 0 16px 16px;
  margin: 0 auto 2px;
  position: relative;
  z-index: 2;
}

.phone-screen {
  background: #0f172a;
  border-radius: 28px;
  overflow: hidden;
  height: 560px;
  display: flex;
  flex-direction: column;
}

.wa-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.wa-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a3d2e;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-name-block { flex: 1; }
.wa-name { display: block; font-size: 0.875rem; font-weight: 600; color: var(--fg); }
.wa-status { display: flex; align-items: center; gap: 4px; font-size: 0.7rem; color: #4ade80; }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

.wa-chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-date-divider {
  text-align: center;
  font-size: 0.7rem;
  color: var(--fg-dim);
  padding: 4px 0;
}

.msg-customer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.msg-customer .bubble {
  background: #2563eb;
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px;
  font-size: 0.875rem;
  max-width: 80%;
  line-height: 1.4;
}

.msg-ai {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.msg-ai .bubble {
  background: #1e293b;
  color: var(--fg);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  font-size: 0.875rem;
  max-width: 85%;
  line-height: 1.4;
}

.msg-time {
  font-size: 0.65rem;
  color: var(--fg-dim);
  margin-top: 2px;
}

.typing-bubble {
  background: #1e293b;
  border-radius: 16px 16px 16px 4px;
  padding: 12px 16px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-bubble .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-dim);
  animation: bounce 1.4s infinite;
}
.typing-bubble .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble .dot:nth-child(3) { animation-delay: 0.4s; }

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

.msg-customer, .msg-ai { animation: msgIn 0.25s ease-out; }

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

.wa-input-bar {
  padding: 10px 14px;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,.05);
}

.wa-input {
  background: #0f172a;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--fg-dim);
}

/* Right controls panel */
.demo-controls {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.controls-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}

.controls-sub {
  color: var(--fg-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.quick-actions h3, .custom-message h3, .agent-features h3, .demo-cta h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-dim);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: left;
}

.action-btn:hover {
  background: var(--surface2);
  border-color: rgba(255,255,255,.12);
  transform: translateY(-1px);
}

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

/* Custom message input */
.input-row {
  display: flex;
  gap: 8px;
}

.input-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--fg);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.input-row input:focus {
  border-color: var(--accent);
}

.input-row input::placeholder { color: var(--fg-dim); }

.send-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: var(--accent);
  color: #0a3d2e;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  white-space: nowrap;
}

.send-btn:hover { background: #d97706; }

/* Features list */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.feature-icon { font-size: 1.4rem; }

.feature-item strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.feature-item span {
  font-size: 0.8rem;
  color: var(--fg-dim);
}

/* CTA */
.demo-cta {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--radius);
  padding: 24px;
}

.demo-cta p {
  color: var(--fg-dim);
  font-size: 0.875rem;
  margin: 8px 0 16px;
  line-height: 1.5;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #0a3d2e;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s;
}

.cta-btn:hover { background: #d97706; }