/* Be Strong Fitness Club — shared styles for the payment pages.
   Mobile first: everything below is written for a phone, and the only
   media query widens spacing once there is room for it. */

:root {
  --bg: #494c55;          /* sampled from the club logo artwork */
  --surface: #40444d;
  --surface-2: #383b43;
  --line: rgba(243,242,238,0.10);
  --ink: #f3f2ee;
  --muted: rgba(243,242,238,0.62);
  --accent: #8ed714;      /* sampled from the club logo */
  --card: #f4f1e8;
  --card-ink: #22262c;
  --card-muted: #6b6659;
  --cond: 'Barlow Condensed', 'Arial Narrow', Helvetica, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Barlow, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 18px calc(36px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- header ---------- */
.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.brand img { width: min(248px, 66vw); height: auto; display: block; }

.tagline {
  margin: 0;
  font-family: 'Barlow Semi Condensed', Helvetica, sans-serif;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

h1 {
  margin: 0;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}
h1 span { color: var(--accent); }

.lede {
  margin: -8px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- bank card ---------- */
.bank {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.bank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.bank-head img { width: 132px; height: auto; display: block; flex: none; }
.bank-head span {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.rows { display: flex; flex-direction: column; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.row:first-child { border-top: none; }
.row:active { background: rgba(243,242,238,0.06); }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.row-value {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.row-value.num { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.row-copy {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.row-copy svg { width: 13px; height: 13px; display: block; }

/* ---------- action buttons ---------- */
.actions { display: flex; flex-direction: column; gap: 10px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn svg { width: 18px; height: 18px; display: block; flex: none; }
.btn:active { transform: scale(0.985); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Sharing is the action worth reaching for, so it carries the brand colour. */
.btn-primary {
  background: var(--accent);
  color: #1d2a05;
  box-shadow: 0 8px 20px rgba(142,215,20,0.22);
}
.btn-primary:active { background: #9ee02a; box-shadow: 0 4px 12px rgba(142,215,20,0.18); }

.btn-ghost {
  background: rgba(243,242,238,0.05);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:active { background: rgba(243,242,238,0.10); }

/* ---------- QR poster ---------- */
.qr-card {
  background: var(--card);
  border-radius: 24px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.22);
}
.qr-frame {
  position: relative;
  background: #fff;
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.qr-frame canvas { width: 100%; height: 100%; display: block; }

/* Sits over the region the encoder clears. Keep this width in step with PLATE
   in poster.js — oversizing the plate covers live modules. */
.qr-logo {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 20%;
  aspect-ratio: 1 / 1;
  border-radius: 26%;
  background: var(--card-ink);
  display: grid;
  place-items: center;
  overflow: hidden;   /* the badge must never spill onto live modules */
}
.qr-logo img { width: 62%; height: auto; display: block; }

.qr-note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: #5f5b51;
  text-align: center;
}

.qr-url {
  margin: -6px 0 0;
  text-align: center;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ---------- footer ---------- */
.footnote {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.footnote strong { color: var(--ink); font-weight: 600; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  background: #22262c;
  color: var(--ink);
  border: 1px solid rgba(142,215,20,0.4);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(0,0,0,0.4);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (min-width: 480px) {
  .page { padding-top: 40px; gap: 24px; }
  h1 { font-size: 34px; }
}

/* The poster is meant to be pinned up at the front desk as well as viewed. */
@media print {
  body.poster { background: #fff; }
  body.poster .page { max-width: 100%; padding: 0; }
  body.poster .qr-card { box-shadow: none; border: 1px solid #ddd; }
  body.poster .tagline,
  body.poster .footnote { color: #555; }
  body.poster h1,
  body.poster .footnote strong { color: #111; }
  body.poster .actions,
  body.poster .toast { display: none; }   /* nothing to tap on paper */
}
