/* ─────────────────────────────────────────────────────────────────────
 * Flowella — Home Problem Comparison
 * Two-card vs-grid with central arrow.
 *
 * The phone illustrations (LEFT chat / RIGHT Flow) intentionally mirror
 * the styling used on /use-cases/* detail pages (`.wa-phone`,
 * `.wa-flow-preview` in `styles/hubdb-use-case.css`) — but with `vs-`
 * prefixes so they render correctly on the home page (which does NOT
 * load `hubdb-use-case.css`). Keep the shared visual language: dotted
 * WhatsApp wallpaper, white message bubbles, green outgoing bubbles,
 * green submit pill, etc.
 * ───────────────────────────────────────────────────────────────────── */

.problem-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
.problem-tag {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
  color: var(--primary);
  margin: 32px 0 0;
}

.vs-grid {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  gap: 28px;
  align-items: stretch;
}

.vs-card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.vs-card.bad  { background: #FFF8F6; border-color: #FFD6CE; }
.vs-card.good { background: linear-gradient(160deg, #fff 0%, var(--mint-tint) 100%); border-color: #BFEFD0; }

.vs-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 99px;
  align-self: flex-start;
}
.vs-card.bad .vs-tag  { background: #FFE9E5; color: #B42318; }
.vs-card.good .vs-tag { background: #E7F7EE; color: #16803C; }

.vs-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--ink-900);
}
.vs-card .vs-sub {
  font-size: 14.5px;
  color: var(--ink-700);
  margin: -6px 0 0;
}

.vs-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vs-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-700);
}
.vs-list li svg { margin-top: 2px; }

/* Illustration container — wraps phone preview + chips. */
.vs-illus {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ───────── WhatsApp-style phone preview (shared shell) ───────── */
.vs-phone {
  background: #E4DDD4;
  border-radius: 18px;
  padding: 14px 12px;
  background-image:
    radial-gradient(rgba(255,255,255,.5) 1.5px, transparent 1.5px),
    radial-gradient(rgba(0,0,0,.04) 1.5px, transparent 1.5px);
  background-size: 18px 18px, 22px 22px;
  background-position: 0 0, 9px 9px;
  border: 1px solid rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
}

/* Optional WA-style header strip (avatar + name) at the top of the chat. */
.vs-phone-head {
  display: grid;
  grid-template-columns: 14px 32px 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,.78);
  border-radius: 12px;
  padding: 6px 10px;
  margin: -4px -2px 4px;
  backdrop-filter: blur(2px);
}
.vs-phone-back {
  color: #25D366;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}
.vs-phone-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vs-phone-avatar svg { width: 18px; height: 18px; }
.vs-phone-meta strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  color: #111B21;
  letter-spacing: -.005em;
}
.vs-phone-meta span {
  font-size: 11px;
  color: #667781;
}

/* ───────── Chat thread (LEFT card) ───────── */
.vs-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px;
}
.vs-chat-msg {
  display: flex;
  max-width: 100%;
}
.vs-chat-msg--in  { justify-content: flex-start; }
.vs-chat-msg--out { justify-content: flex-end; }

.vs-chat-bubble {
  position: relative;
  background: #fff;
  border-radius: 8px 8px 8px 2px;
  padding: 6px 10px 5px;
  font-size: 13px;
  line-height: 1.4;
  color: #111B21;
  max-width: 80%;
  box-shadow: 0 1px 1px rgba(0,0,0,.08);
}
.vs-chat-msg--out .vs-chat-bubble {
  background: #DCF8C6;
  border-radius: 8px 8px 2px 8px;
}

.vs-chat-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 2px -2px -2px 8px;
  font-size: 9.5px;
  color: #667781;
  float: right;
  line-height: 1.2;
  white-space: nowrap;
}
.vs-chat-ticks {
  display: inline-flex;
  align-items: center;
  color: #53BDEB;
  font-size: 11px;
  line-height: 1;
  margin-left: 1px;
}
.vs-chat-ticks .tick--second { margin-left: -.42em; }

/* CSS-only typing indicator (three bouncing dots in a bubble). */
.vs-chat-typing {
  align-self: flex-start;
  background: #fff;
  border-radius: 12px 12px 12px 2px;
  padding: 8px 12px;
  display: inline-flex;
  gap: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,.08);
  margin-top: 2px;
}
.vs-chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #B42318;
  opacity: .35;
  animation: vs-typing 1.2s ease-in-out infinite;
}
.vs-chat-typing span:nth-child(2) { animation-delay: .15s; }
.vs-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes vs-typing {
  0%, 80%, 100% { transform: translateY(0);    opacity: .35; }
  40%           { transform: translateY(-2px); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .vs-chat-typing span { animation: none; opacity: .55; }
}

/* ───────── WhatsApp Flow sheet (RIGHT card) ───────── */
.vs-phone--flow {
  /* Flow rendered on the WA wallpaper, with a softly shaded "sheet" inside. */
  justify-content: flex-end;
  padding-bottom: 18px;
}
.vs-flow {
  margin: 0 2px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  width: 100%;
  align-self: stretch;
}
.vs-flow-chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 6px;
  font-size: 12px;
}
.vs-flow-cancel { color: #25D366; font-weight: 500; }
.vs-flow-title {
  font-weight: 600;
  font-size: 13px;
  color: #111B21;
  text-align: center;
  line-height: 1.25;
}
.vs-flow-menu { color: #667781; letter-spacing: 1px; }
.vs-flow-progress {
  height: 3px;
  background: #E9EDEF;
  margin: 0 12px 8px;
  border-radius: 99px;
  overflow: hidden;
}
.vs-flow-progress span {
  display: block;
  width: 38%;
  height: 100%;
  background: #25D366;
  border-radius: 99px;
}
.vs-flow-body {
  padding: 0 12px 10px;
  font-size: 12px;
  color: #111B21;
  line-height: 1.4;
}
.vs-flow-intro {
  margin: 0 0 8px;
  color: #3B4A54;
}
.vs-flow-intro b { color: #111B21; }

.vs-flow-details {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: #667781;
}
.vs-flow-details li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vs-flow-detail-emoji { font-size: 13px; line-height: 1; }

.vs-flow-q {
  margin: 4px 0 6px;
  font-weight: 600;
  font-size: 12.5px;
  color: #111B21;
}

.vs-flow-options {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #E9EDEF;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.vs-flow-options li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid #E9EDEF;
  font-size: 12px;
}
.vs-flow-options li:first-child { border-top: 0; }
.vs-flow-options li.is-selected { background: #F0FAF4; }
.vs-flow-opt-emoji { font-size: 16px; line-height: 1; }
.vs-flow-opt-label { flex: 1; color: #111B21; }

/* Radio + check stack inside one fixed-size mark slot so motion.css
   can cross-fade between the two states without the row shifting. */
.vs-flow-opt-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.vs-flow-opt-radio,
.vs-flow-opt-check {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.vs-flow-opt-radio {
  width: 14px;
  height: 14px;
  border: 2px solid #C5CED3;
  border-radius: 50%;
  inset: auto;
}
.vs-flow-opt-check {
  color: #25D366;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
}
.vs-flow-options li.is-selected .vs-flow-opt-check { opacity: 1; }
.vs-flow-options li.is-selected .vs-flow-opt-radio { opacity: 0; }

.vs-flow-foot {
  padding: 12px 12px 4px;
  text-align: center;
}
.vs-flow-submit {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 99px;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -.005em;
}
.vs-flow-managed {
  margin: 8px 0 0;
  font-size: 10px;
  color: #8696A0;
  line-height: 1.35;
}

/* ───────── Status chips (under each illustration) ───────── */
.vs-jumble {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vs-jumble span {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #FFE9E5;
  color: #B42318;
}
.vs-jumble-good span {
  background: #E7F7EE;
  color: #16803C;
}

/* ───────── Central arrow ───────── */
.vs-arrow {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-400);
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
}

/* ───────── Responsive ───────── */
@media (max-width: 1180px) {
  .problem-head { grid-template-columns: 1fr; gap: 40px; }
  .vs-grid { grid-template-columns: 1fr; }
  .vs-arrow { transform: rotate(90deg); }
}

@media (max-width: 480px) {
  .vs-card { padding: 28px 22px; }
  .vs-phone { min-height: 320px; padding: 12px 10px; }
  .vs-chat-bubble { font-size: 12.5px; }
  .vs-flow-options li { padding: 6px 9px; }
  .vs-flow-opt-label { font-size: 11.5px; }
}
