/* ============================================================
   FILLSLOT DEMO PAGE
   WhatsApp-style chat interface + booking modal
   ============================================================ */

/* ─── Layout ───────────────────────────────────────────────── */
.demo-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.demo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.demo-nav-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,170,0.15);
  padding: 4px 12px;
  border-radius: 100px;
}

.demo-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1100px;
  width: 100%;
  margin: 40px auto;
  gap: 32px;
  padding: 0 24px 60px;
  align-items: start;
}

/* ─── Context sidebar ───────────────────────────────────────── */
.demo-context {
  position: sticky;
  top: 80px;
}

.demo-context-inner {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
}

.biz-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.biz-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,170,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.biz-info {
  flex: 1;
}

.biz-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

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

.biz-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--accent);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s infinite;
}

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

.context-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.context-section:last-child {
  border-bottom: none;
}

.context-section h4 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.services-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

.svc-name {
  color: var(--fg);
}

.svc-price {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.82rem;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-bottom: 4px;
}

.hours-row.closed {
  color: var(--fg-muted);
}

.context-note p {
  font-size: 0.83rem;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: 8px;
}

.context-note p:last-child { margin-bottom: 0; }

/* ─── WhatsApp shell ────────────────────────────────────────── */
.demo-main {
  min-height: 600px;
}

.wa-shell {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  background: #0d1117;
  height: calc(100vh - 180px);
  min-height: 560px;
  max-height: 820px;
}

/* WhatsApp header bar */
.wa-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #1a1f2e;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.wa-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #2a3142;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.wa-header-info {
  flex: 1;
}

.wa-header-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.wa-header-status {
  font-size: 0.75rem;
  color: var(--accent);
}

.wa-header-icons {
  display: flex;
  gap: 14px;
  color: var(--fg-muted);
  font-size: 1.1rem;
  cursor: default;
}

/* Message feed */
.wa-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* WhatsApp chat background */
  background:
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0,212,170,0.03) 0%, transparent 70%),
    #0d1117;
}

.wa-messages::-webkit-scrollbar { width: 4px; }
.wa-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

.wa-msg {
  display: flex;
}

.wa-msg--out { justify-content: flex-end; }
.wa-msg--in  { justify-content: flex-start; }

.wa-bubble {
  max-width: 72%;
  padding: 10px 14px 8px;
  border-radius: 12px;
  font-size: 0.94rem;
  line-height: 1.5;
  position: relative;
}

.wa-msg--in .wa-bubble {
  background: #1e2635;
  border-bottom-left-radius: 4px;
  color: var(--fg);
}

.wa-msg--out .wa-bubble {
  background: #005c4b;
  border-bottom-right-radius: 4px;
  color: #e8e6e3;
}

.wa-bubble p {
  margin-bottom: 4px;
}
.wa-bubble p:last-of-type {
  margin-bottom: 6px;
}

.wa-time {
  display: block;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.38);
  text-align: right;
  margin-top: 4px;
}

/* Booking button inside bubble */
.wa-book-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
  text-align: center;
}

.wa-book-btn:hover { opacity: 0.88; }

/* Typing indicator */
.wa-typing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 10px;
  flex-shrink: 0;
}

.typing-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  background: #1e2635;
  padding: 8px 12px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-muted);
  animation: typing-bounce 1.2s infinite;
}

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

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

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

/* Input row */
.wa-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #1a1f2e;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.wa-input-wrap {
  flex: 1;
  background: #2a3142;
  border-radius: 24px;
  padding: 0 16px;
}

.wa-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 0;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.94rem;
}

.wa-input::placeholder {
  color: var(--fg-muted);
}

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

.wa-send:hover { transform: scale(1.08); }
.wa-send:disabled { opacity: 0.4; cursor: default; transform: none; }

/* ─── Booking modal ─────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.booking-modal {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 36px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--fg-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.modal-close:hover { background: rgba(255,255,255,0.12); }

.modal-header {
  text-align: center;
  margin-bottom: 28px;
}

.modal-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 0.88rem;
  color: var(--fg-muted);
}

/* Form elements */
.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8a99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group input::placeholder { color: rgba(138,138,153,0.6); }
.form-group input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.5); }

.form-error {
  background: rgba(255,107,74,0.12);
  border: 1px solid rgba(255,107,74,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--warning);
  margin-bottom: 16px;
}

.btn-book {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 8px;
}

.btn-book:hover { opacity: 0.9; }
.btn-book:active { transform: scale(0.99); }
.btn-book:disabled { opacity: 0.4; cursor: default; }

/* Confirmation screen */
.confirm-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 16px;
}

.confirm-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}

.confirm-details {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.confirm-row:last-child { border-bottom: none; }

.confirm-label {
  color: var(--fg-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.confirm-note {
  text-align: center;
  font-size: 0.88rem;
  color: var(--fg-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.btn-done {
  width: 100%;
  padding: 13px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-done:hover { background: rgba(255,255,255,0.08); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .demo-shell {
    grid-template-columns: 1fr;
    margin: 16px auto;
    gap: 20px;
  }

  .demo-context {
    position: static;
  }

  .wa-shell {
    height: 70vh;
  }
}

@media (max-width: 600px) {
  .demo-nav { padding: 12px 16px; }
  .demo-shell { padding: 0 12px 40px; }
  .booking-modal { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .wa-bubble { max-width: 86%; }
}
