/* ====================================================
   Demo chrome — the chooser page and the "this is a demo"
   ribbon. Tokens are the same ones mpay.css and
   assets/css/payment-page.css declare, so the demo shell
   and the product it wraps read as one system.
   ==================================================== */

:root {
  --bg0: #ffffff;
  --bg2: #e5edf5;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --accent: #3ba5ed;
  --accent2: #258cd1;
  --accentSoft: rgba(59, 165, 237, 0.10);
  --ok: #059669;
  --warn: #b45309;
  --warnSoft: rgba(245, 158, 11, 0.14);
  --danger: #dc2626;
  --ink: #0b1b2b;
  --shadow: 0 18px 50px rgba(2, 8, 23, 0.10);
  --shadow2: 0 8px 24px rgba(2, 8, 23, 0.06);
}

/* ===========================
   The demo ribbon
   Shown on every screen of the flow. A payment form that
   looks real must never be mistakable for one.
   =========================== */
.demo-ribbon {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--warnSoft);
  color: var(--warn);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  font: 600 0.78rem/1 'Heebo', sans-serif;
  text-align: center;
  padding: 8px 12px;
  letter-spacing: 0.01em;
}
.demo-ribbon a {
  color: inherit;
  text-underline-offset: 3px;
}

/* ===========================
   Chooser page
   =========================== */
.chooser-body {
  margin: 0;
  font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.chooser-header {
  background: linear-gradient(160deg, var(--ink) 0%, #12324b 100%);
  color: #fff;
  padding: clamp(18px, 4vw, 28px) clamp(16px, 5vw, 32px) clamp(40px, 7vw, 64px);
}
.chooser-topbar {
  max-width: 1120px;
  margin: 0 auto clamp(20px, 4vw, 34px);
}
.chooser-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cfe0ee;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 13px;
  border: 1px solid rgba(159, 212, 247, 0.35);
  border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
}
.chooser-back:hover {
  background: rgba(59, 165, 237, 0.16);
  border-color: rgba(159, 212, 247, 0.6);
  color: #fff;
}
.chooser-header-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.chooser-badge {
  display: inline-block;
  background: rgba(59, 165, 237, 0.18);
  border: 1px solid rgba(59, 165, 237, 0.45);
  color: #9fd4f7;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.chooser-header h1 {
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 16px;
}
.chooser-lead {
  color: #b9cbdb;
  font-size: clamp(0.95rem, 2.1vw, 1.08rem);
  max-width: 62ch;
  margin: 0 auto;
}
.chooser-lead strong { color: #e6f2fb; }

.chooser-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 44px) clamp(16px, 5vw, 32px) 56px;
}
.chooser-sub {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--text);
}

/* --- Case cards --- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 820px;
  margin-inline: auto;   /* center the 2×2 block on the page */
}
@media (max-width: 680px) {
  .case-grid { grid-template-columns: 1fr; }
}
/* Single-scenario demo: keep the lone card from stretching full width. */
.case-grid--single {
  max-width: 460px;
}
.case-loading {
  grid-column: 1 / -1;
  background: var(--bg0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.case-card {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;   /* include the 44px padding in the 100% width so the <a> cards
                               don't exceed the grid track and bleed onto the neighbor */
  text-align: right;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--bg0);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow2);
  padding: 24px 22px 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.case-card:hover,
.case-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
  outline: none;
}

.case-count {
  display: block;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent2);
  font-variant-numeric: tabular-nums;
}
.case-count-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 14px;
}
a.case-card { text-decoration: none; color: inherit; }
.case-card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.case-meta {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.case-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}
.case-meta span { color: var(--muted); flex: none; }
.case-meta strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: left;
  min-width: 0;              /* allow the value to shrink instead of overflowing */
  overflow-wrap: anywhere;   /* long doc labels wrap rather than bleed past the card */
}

.case-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.55;
}
.case-cta {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent2);
}

/* --- "How it works" --- */
.chooser-how {
  background: var(--bg0);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px clamp(20px, 4vw, 34px);
  margin-top: 36px;
}
.chooser-how h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 16px;
}
.chooser-how ol {
  margin: 0;
  padding-inline-start: 22px;
  display: grid;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--muted);
}
.chooser-how strong { color: var(--text); font-weight: 600; }

.chooser-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 32px) 48px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ===========================
   White-label brand panel (demo layer)
   Lets a prospect preview the flow under their own name + logo.
   The preview mimics the dark mpay header so they see the real result.
   =========================== */
.brand-panel {
  background: var(--bg0);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow2);
  padding: 20px 22px;
  margin: 0 auto 26px;
  max-width: 900px;
  display: grid;
  gap: 16px;
}
.brand-panel-tx h2 { font-size: 1.1rem; margin: 0 0 4px; color: var(--text); font-weight: 700; }
.brand-panel-tx p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.brand-panel-controls { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; }
.brand-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.brand-field input[type=text] {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; min-width: 200px; background: #fff; color: var(--text);
}
.brand-field input[type=file] { font-size: 0.85rem; color: var(--text); max-width: 230px; }
.brand-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.brand-preview {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); border-radius: 12px; padding: 8px 14px; margin-inline-start: auto;
}
.brand-preview-plate {
  background: #fff; border-radius: 8px; padding: 4px 8px; min-width: 34px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-preview-plate img { height: 100%; max-width: 120px; display: block; }
.brand-preview-name { color: #fff; font-weight: 800; font-size: 0.95rem; }
.brand-reset {
  padding: 9px 14px; border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius); font: inherit; font-size: 0.85rem; color: var(--muted); cursor: pointer;
}
.brand-reset:hover { border-color: var(--accent); color: var(--accent2); }
@media (max-width: 640px) {
  .brand-preview { margin-inline-start: 0; }
  .brand-panel-controls { gap: 12px; }
}

/* ---------------------------------------------------------------- demo CTA
 * The exit from the demo. A prospect who liked what they saw needs one click to
 * ask for a price, and one to get back to the site. Added for the site launch.
 *
 * The panel is deliberately DARK — it sits on the light --bg2 body and echoes
 * the dark chooser header, so it reads as a closing band rather than one more
 * card. Its text colours are therefore light, and must not be reused elsewhere. */
.chooser-cta {
  max-width: 1120px;
  margin: clamp(24px, 5vw, 44px) auto clamp(16px, 3vw, 24px);
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-2xl);
  background: linear-gradient(160deg, var(--ink) 0%, #12324b 100%);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.chooser-cta b { display: block; font-size: 1.08rem; font-weight: 700; color: #f1f7fc; }
.chooser-cta span { display: block; margin-top: 5px; font-size: .92rem; line-height: 1.6; color: #a8c3da; }
.chooser-cta-acts { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; flex-wrap: wrap; }
.chooser-cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 999px;
  background: linear-gradient(90deg, #1a6fb0, #2489d4);
  color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none;
  box-shadow: 0 10px 26px -12px rgba(59, 165, 237, .9);
}
.chooser-cta-btn:hover { filter: brightness(1.08); }
.chooser-cta-back {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 999px;
  border: 1px solid rgba(159, 212, 247, 0.4);
  color: #cfe0ee; font-weight: 600; font-size: .92rem; text-decoration: none;
}
.chooser-cta-back:hover { background: rgba(59, 165, 237, 0.18); color: #fff; }

@media (max-width: 640px) {
  .chooser-cta-acts { margin-inline-start: 0; width: 100%; }
  .chooser-cta-acts a { flex: 1; }
}

/* the same CTA, appended to the demo ribbon on every inner screen by demo-cta.js */
.rib-quote {
  margin-inline-start: 10px;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.rib-quote:hover { background: rgba(180, 83, 9, .12); }
