/* ──────────────────────────────────────────────────────────────────
   Phase F — Demo Chat UI
   Phone-mockup-style interactive chat. Distinct from animated_demo.css
   so the marketing demo and interactive demo can evolve independently.
   ────────────────────────────────────────────────────────────────── */

.demo-chat-shell {
  background: #FAF7F2;
  border: 1px solid #E7E0D8;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.08);
  display: flex;
  flex-direction: column;
  height: min(70vh, 560px);
  overflow: hidden;
}

.demo-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #E7E0D8;
  background: #FFFFFF;
  flex-shrink: 0;
}

.demo-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2D5A3D;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
}

.demo-chat-name {
  font-size: 14px;
  font-weight: 600;
  color: #1C1917;
  line-height: 1.2;
  margin: 0;
}

.demo-chat-status {
  font-size: 11px;
  color: #A8A29E;
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-chat-bubbles {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-chat-bubble {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  animation: demo-chat-bubble-in 220ms ease both;
}

.demo-chat-bubble-incoming { align-self: flex-start; }
.demo-chat-bubble-outgoing { align-self: flex-end; }

.demo-chat-bubble-text {
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.demo-chat-bubble-incoming .demo-chat-bubble-text {
  background: #FFFFFF;
  color: #1C1917;
  border: 1px solid #E7E0D8;
  border-bottom-left-radius: 4px;
}

.demo-chat-bubble-outgoing .demo-chat-bubble-text {
  background: #2D5A3D;
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

/* Typing indicator (3-dot pulse) */
.demo-chat-typing {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid #E7E0D8;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  padding: 11px 14px;
  display: inline-flex;
  gap: 4px;
  animation: demo-chat-bubble-in 200ms ease both;
}

.demo-chat-typing span {
  width: 5px;
  height: 5px;
  background: #A8A29E;
  border-radius: 50%;
  animation: demo-chat-typing-pulse 1.4s infinite ease-in-out;
}
.demo-chat-typing span:nth-child(1) { animation-delay: 0s; }
.demo-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.demo-chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes demo-chat-typing-pulse {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-3px); opacity: 1; }
}

@keyframes demo-chat-bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Form */
.demo-chat-form input:disabled,
.demo-chat-form button:disabled {
  cursor: not-allowed;
}

/* ── Starter-prompt chips (Phase F polish FIX 5) ─────────────────── */
.demo-starter-chips[hidden] { display: none; }

.demo-starter-chips-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #57534E;
  margin: 0 0 8px;
  text-align: center;
}

.demo-starter-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.demo-starter-chip {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  background: #FFFFFF;
  border: 1px solid #E7E0D8;
  color: #2D5A3D;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, transform 0.12s;
  line-height: 1.2;
}

.demo-starter-chip:hover {
  background: #F2EDE5;
  border-color: #C9A96E;
}

.demo-starter-chip:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .demo-chat-bubble,
  .demo-chat-typing {
    animation: none;
  }
  .demo-chat-typing span {
    animation: none;
    opacity: 0.7;
  }
  .demo-starter-chip:active {
    transform: none;
  }
}
