/* ══════════════════════════════════════════════════════════════════
   chat-demo.css — the scripted sentence-to-cards exchange.
   The whole conversation is static HTML (build.mjs renders it from
   js/chat-demo-scripts.json); js/chat-demo.js only replays it.
   Self-contained: needs css/swipe-demo.css for the cards, nothing else.
   ══════════════════════════════════════════════════════════════════ */

.cd-demo {
  max-width: 460px;
  margin: 34px auto;
}

.cd-thread { display: flex; flex-direction: column; gap: 18px; }

/* the person's line */
.cd-you {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin: 0;
}

.cd-you-label,
.cd-reply-label {
  font-size: 12px;
  font-weight: 640;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-3, #7E603F);
}

.cd-bubble {
  display: inline-block;
  max-width: 90%;
  background: var(--espresso, #3E2415);
  color: var(--cream-on-deep, #F5F1E8);
  border-radius: 20px 20px 5px 20px;
  padding: 12px 18px;
  font-size: 17px;
  line-height: 1.45;
  box-shadow: 0 6px 20px rgba(62, 36, 21, 0.22);
  min-height: 1.45em;
}

/* Chirp's cards */
.cd-reply {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.cd-reply-label {
  display: block;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 13.5px;
  font-weight: 520;
  color: var(--ink-soft, #5C4A3A);
}

.cd-mark {
  display: inline-block;
  margin-right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber, #C48A28);
  flex: 0 0 auto;
}

.cd-cards {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.cd-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0 0;
  min-height: 40px;
}

.cd-replay {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border, #D4CAB8);
  border-radius: 999px;
  background: var(--panel, #FFFBF0);
  color: var(--espresso, #3E2415);
  font: inherit;
  font-size: 14.5px;
  font-weight: 560;
  cursor: pointer;
  transition: border-color calc(0.2s * var(--demo-motion-scale,1)) ease, box-shadow calc(0.2s * var(--demo-motion-scale,1)) ease;
}
.cd-replay:hover { border-color: var(--clay-3, #7E603F); box-shadow: 0 6px 24px rgba(62, 36, 21, 0.10); }

.cd-note {
  font-size: 13px;
  color: var(--ink-soft, #5C4A3A);
}

/* ── replay states (added by JS only — static page shows everything) ── */

.cd-demo.cd-armed .cd-card {
  opacity: 0;
  transform: translateY(12px) scale(0.97);
}
.cd-demo.cd-armed .cd-card.is-shown {
  opacity: 1;
  transform: none;
  transition: opacity calc(.45s * var(--demo-motion-scale,1)) cubic-bezier(0.22, 1, 0.36, 1), transform calc(.45s * var(--demo-motion-scale,1)) cubic-bezier(0.34, 1.4, 0.64, 1);
}

.cd-demo.cd-armed .cd-reply-label { opacity: 0; transition: opacity calc(0.4s * var(--demo-motion-scale,1)) ease; }
.cd-demo.cd-armed.cd-replied .cd-reply-label { opacity: 1; }

@media (max-width: 430px) {
  .cd-bubble { font-size: 16px; }
}

.cd-card.sd-card { margin-top: 8px; }
.cd-thread { width: 100%; }
