/* demo.css — styles for /demo interactive simulator page */

/* ─── Page Layout ─────────────────────────────────── */
.demo-page {
  background: #0a0a0f;
  min-height: 100vh;
  color: #f0f0f0;
}

.demo-main {
  padding: 2rem 1.5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.demo-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-top: 2rem;
}

@media (max-width: 768px) {
  .demo-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ─── Setup Panel ─────────────────────────────────── */
.demo-setup-inner {
  position: sticky;
  top: 2rem;
}

.demo-badge {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.demo-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.demo-subtitle {
  font-size: 1rem;
  color: #a0a0b8;
  line-height: 1.65;
  margin-bottom: 2rem;
}

/* ─── Form ────────────────────────────────────────── */
.demo-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #c0c0d8;
  letter-spacing: 0.02em;
}

.form-group .optional {
  font-weight: 400;
  color: #6b6b8a;
  font-size: 0.78rem;
}

.form-group input,
.form-group select {
  background: #14141f;
  border: 1.5px solid #2a2a3f;
  border-radius: 10px;
  color: #f0f0f0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b8a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-group input::placeholder {
  color: #4a4a6a;
}

.form-group select option {
  background: #14141f;
  color: #f0f0f0;
}

.btn-simulate {
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.9rem 1.5rem;
  transition: opacity 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-simulate:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-simulate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.demo-reset { margin-top: 1.25rem; }

.btn-reset {
  background: transparent;
  border: 1.5px solid #2a2a3f;
  border-radius: 8px;
  color: #8080a0;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  transition: border-color 0.2s, color 0.2s;
}

.btn-reset:hover {
  border-color: #7c3aed;
  color: #c0b0ff;
}

/* ─── Phone Frame ─────────────────────────────────── */
.demo-phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.demo-phone {
  background: #1a1a28;
  border: 2px solid #2a2a40;
  border-radius: 40px;
  box-shadow:
    0 0 0 8px #0f0f1a,
    0 0 0 10px #2a2a40,
    0 30px 60px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  width: 320px;
  min-height: 580px;
  max-height: 640px;
  overflow: hidden;
  position: relative;
}

/* Status bar */
.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #c0c0d8;
}

.phone-icons { letter-spacing: 0.1em; opacity: 0.7; }

/* Header row */
.phone-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem 0.75rem;
  border-bottom: 1px solid #2a2a40;
  background: #16162a;
}

.phone-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #6d28d9;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s;
}

.phone-contact-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f0f0f8;
}

.phone-contact-sub {
  font-size: 0.72rem;
  color: #6060a0;
}

/* Idle state */
.phone-idle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #4a4a6a;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 2rem;
  gap: 0.75rem;
}

.phone-idle-icon { font-size: 2.5rem; opacity: 0.4; }

/* Messages area */
.phone-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #2a2a40 transparent;
}

.phone-messages::-webkit-scrollbar { width: 4px; }
.phone-messages::-webkit-scrollbar-track { background: transparent; }
.phone-messages::-webkit-scrollbar-thumb { background: #2a2a40; border-radius: 4px; }

/* Message rows */
.msg-row {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  gap: 0.2rem;
}

.msg-inbound { align-self: flex-start; }
.msg-outbound { align-self: flex-end; align-items: flex-end; }

.msg-bubble {
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.4;
  padding: 0.6rem 0.9rem;
  word-break: break-word;
}

.msg-inbound .msg-bubble {
  background: #1e3a5f;
  color: #dde8ff;
  border-bottom-left-radius: 4px;
}

.msg-outbound .msg-bubble {
  background: #3b3b5c;
  color: #f0f0f0;
  border-bottom-right-radius: 4px;
}

.msg-ts {
  font-size: 0.65rem;
  color: #4a4a6a;
  padding: 0 0.4rem;
}

/* Animate in */
.msg-animate {
  animation: bubblePop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

/* Typing indicator */
.phone-typing {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.typing-bubble {
  background: #1e3a5f;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.6rem 0.9rem;
}

.typing-bubble span {
  width: 6px;
  height: 6px;
  background: #4a8ccc;
  border-radius: 50%;
  animation: typingDot 1.2s infinite;
}

.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30%            { opacity: 1;   transform: scale(1); }
}

/* Reply input */
.phone-input-wrap {
  border-top: 1px solid #2a2a40;
  padding: 0.75rem 0.85rem;
  background: #16162a;
}

.phone-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #0f0f1a;
  border: 1.5px solid #2a2a40;
  border-radius: 24px;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
}

.phone-reply-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f0f0f0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  outline: none;
}

.phone-reply-input::placeholder { color: #4a4a6a; }

.phone-send-btn {
  background: #7c3aed;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.phone-send-btn:hover:not(:disabled) {
  background: #6d28d9;
  transform: scale(1.05);
}

.phone-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── CTA below phone ─────────────────────────────── */
.demo-cta {
  text-align: center;
  max-width: 320px;
}

.demo-cta-text {
  font-size: 0.9rem;
  color: #8080a0;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.btn-cta-small {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-radius: 10px;
  color: white;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-cta-small:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ─── Lead Capture Card ───────────────────────────── */
.lead-capture {
  background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
  border: 1.5px solid #3a3a5f;
  border-radius: 20px;
  padding: 1.75rem;
  width: 100%;
  max-width: 320px;
  margin-top: 1rem;
  animation: leadCardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: scale(0.95) translateY(8px);
}

@keyframes leadCardIn {
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.lead-capture-header { margin-bottom: 1.25rem; }

.lead-capture-badge {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  margin-bottom: 0.6rem;
}

.lead-capture-headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin: 0;
}

.lead-form { display: flex; flex-direction: column; gap: 0.85rem; }
.lead-fields { display: flex; flex-direction: column; gap: 0.7rem; }
.lead-field { display: flex; flex-direction: column; gap: 0.3rem; }

.lead-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c0c0d8;
  letter-spacing: 0.02em;
}

.lead-field .optional { font-weight: 400; color: #6b6b8a; font-size: 0.72rem; }

.lead-field input,
.lead-field select {
  background: #14141f;
  border: 1.5px solid #2a2a3f;
  border-radius: 8px;
  color: #f0f0f0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  padding: 0.6rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.lead-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b8a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.lead-field select option { background: #14141f; color: #f0f0f0; }

.lead-field input:focus,
.lead-field select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.lead-field input::placeholder { color: #4a4a6a; }

.lead-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.25rem; }

.btn-lead-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.8rem 1.25rem;
  transition: opacity 0.2s, transform 0.15s;
  width: 100%;
}

.btn-lead-primary:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.btn-lead-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-lead-secondary {
  color: #8080a0;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  padding: 0.3rem;
  transition: color 0.2s;
}

.btn-lead-secondary:hover { color: #c0c0d8; }

.lead-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  text-align: center;
}

.lead-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.lead-success-msg {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e0d8ff;
  line-height: 1.4;
}

/* ─── Booking Slots ───────────────────────────────── */
.booking-slots-bubble {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 190px;
}

.booking-prompt {
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 0 0 0.25rem;
  color: #dde8ff;
}

.booking-slot-btn {
  background: transparent;
  border: 1.5px solid #4a8ccc;
  border-radius: 10px;
  color: #7ec8ff;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  text-align: center;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
  width: 100%;
}

.booking-slot-btn:hover:not(:disabled) {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
  transform: scale(1.02);
}

.booking-slot-btn:disabled {
  cursor: default;
}

/* ─── Time Jump Divider ───────────────────────────── */
.time-jump {
  align-self: center;
  color: #5a5a80;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0.75rem 0;
  position: relative;
  text-align: center;
  width: 100%;
}

.time-jump::before,
.time-jump::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 22%;
  height: 1px;
  background: #2a2a40;
}

.time-jump::before { left: 0; }
.time-jump::after  { right: 0; }

/* ─── Final lead card accent ──────────────────────── */
.lead-capture-final {
  border-color: #7c3aed;
  box-shadow: 0 0 0 1px rgba(124,58,237,0.3), 0 8px 32px rgba(124,58,237,0.12);
}

.lead-capture-final .lead-capture-badge {
  background: linear-gradient(135deg, #059669, #047857);
}

.lead-capture-final .lead-capture-headline {
  font-size: 1rem;
  line-height: 1.35;
}
