/* The shop sign-up (S85) — one card at a time on a phone.

   EVERY COLOUR, RADIUS AND SIZE IS A board.css TOKEN. No new token and no
   hand-set font size: every font-size below is one of the five R37 steps
   (--fs-title, --fs-name, --fs-price, --fs-support, --fs-label), and a
   browser test fails on any other.

   THE TWO REFUSALS (S47 — a refusal must look like a refusal):
     .join-refusal   AMBER (--warn): his input was refused.
     .join-failed    RED (--temp):   the app failed. */

/* The `hidden` attribute hides, whatever `display` a rule below sets. */
[hidden] {
  display: none !important;
}

.join {
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* One card fills the screen. */
.join-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.join-title {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: var(--fw-title);
  line-height: 1.3;
  color: var(--ink);
}

/* "2 of 6 · You" — progress, never a percentage. */
.join-step {
  margin: 0;
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* A line the card says. */
.join-say {
  margin: 0;
  font-size: var(--fs-name);
  font-weight: 400;
  line-height: 1.45;
  color: var(--body-text);
}

.join-help,
.join-demo {
  margin: 0;
  font-size: var(--fs-support);
  font-weight: var(--fw-support);
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ---- One question: label, box, the line under it ---- */

.join-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.join-label {
  font-size: var(--fs-support);
  font-weight: var(--fw-name);
  line-height: 1.35;
  color: var(--ink);
}

/* 16px, so iOS never zooms the page when a box takes focus. */
.join-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  font-size: var(--fs-name);
  font-weight: 400;
  font-family: inherit;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.join-input::placeholder { color: var(--ink-soft); }
.join-input:focus {
  outline: none;
  border-color: var(--accent);
}
.join-input.is-refused,
.join-input.is-refused:focus {
  border-color: var(--warn);
}

.join-row {
  display: flex;
  gap: 8px;
}
.join-row .join-field { min-width: 0; }
.join-col-suburb   { flex: 1 1 auto; }
.join-col-state    { flex: 0 0 96px; }
.join-col-postcode { flex: 0 0 96px; }

/* ---- AMBER: his input was refused ---- */
.join-refusal {
  margin: 0;
  font-size: var(--fs-support);
  font-weight: var(--fw-name);
  line-height: 1.4;
  color: var(--warn);
}

/* ---- RED: the app failed ---- */
.join-failed {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--temp);
  border-radius: var(--radius);
  background: var(--red-band);
  font-size: var(--fs-support);
  font-weight: var(--fw-name);
  line-height: 1.4;
  color: var(--red-band-ink);
}

/* "✓ Found: …" under the ABN, when the register answers. */
.join-found {
  margin: 0;
  font-size: var(--fs-support);
  font-weight: var(--fw-name);
  line-height: 1.4;
  color: var(--accent);
}

/* ---- Choices: real picks, so real buttons ---- */

.join-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.join-choice {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: var(--fs-support);
  font-weight: var(--fw-support);
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.join-choice.is-chosen {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: var(--fw-label);
}

/* ---- A block that repeats: a screen row, a spot, a supplier ---- */

.join-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.join-block-head {
  margin: 0;
  font-size: var(--fs-name);
  font-weight: var(--fw-name);
  line-height: 1.3;
  color: var(--ink);
}

/* "Your front promotion end" — a mark, in the accent. */
.join-mark {
  margin: 0;
  font-size: var(--fs-support);
  font-weight: var(--fw-name);
  color: var(--accent);
}

.join-remove {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: var(--fs-support);
  font-weight: var(--fw-support);
  font-family: inherit;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---- The stepper: − N + ---- */

.join-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.join-stepper-row .join-block-head { min-width: 0; }

.join-stepper {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.join-step-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  font-size: var(--fs-price);
  font-weight: var(--fw-price);
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.join-step-btn:disabled {
  color: var(--line);
  cursor: default;
}

.join-step-n {
  min-width: 28px;
  text-align: center;
  font-size: var(--fs-name);
  font-weight: var(--fw-name);
  color: var(--ink);
}

/* ---- The camera: a label driving a hidden file input ---- */

.join-file { display: none; }

.join-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
}
.join-thumb-img {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.join-taken {
  font-size: var(--fs-support);
  font-weight: var(--fw-support);
  color: var(--ink-soft);
}

/* ---- Buttons ---- */

/* The forward shape: filled accent. A <label>, an <a> or a <button>. */
.join-next,
.join-camera {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 13px 18px;
  font-size: var(--fs-name);
  font-weight: var(--fw-label);
  font-family: inherit;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.join-next:disabled {
  border-color: var(--line);
  background: var(--line);
  color: var(--ink-soft);
  cursor: default;
}

/* The quiet shape: a real choice that never competes with the forward one. */
.join-quiet,
.join-back {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 13px 18px;
  font-size: var(--fs-name);
  font-weight: var(--fw-name);
  font-family: inherit;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* [ Back ] [ Next ] — pinned to the bottom of whatever scrolls (the apply
   form's own fix, S39 6b): the row stays in flow at the end of the card and
   pins while the card is taller than its scroll box. */
.join-nav {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, var(--bg) 12px);
}
.join-nav .join-back { flex: 0 0 auto; width: auto; padding: 13px 22px; }
.join-nav .join-next { flex: 1 1 auto; width: auto; }

/* ---- Ticks ---- */

.join-tick {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-support);
  font-weight: var(--fw-support);
  line-height: 1.45;
  color: var(--body-text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.join-tick input {
  font: inherit;                /* a bare input takes the browser's own size */
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

/* ---- The agreement: the partner's words, in full, on the page ----
   S87: no max-height and no overflow. It is NOT a box that scrolls inside the
   page: he reads straight down to the ticks. A browser test fails if anything
   on this step scrolls on its own. */

/* Who the agreement is between, in one line above the wording. */
.join-between {
  font-weight: var(--fw-name);
  color: var(--ink);
}

.join-agreement {
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.join-agreement p {
  margin: 0;
  font-size: var(--fs-support);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.join-agreement .join-agreement-head {
  font-weight: var(--fw-label);
}
.join-agreement .join-agreement-small {
  font-size: var(--fs-label);
  color: var(--body-text);
}
.join-agreement .join-agreement-title {
  font-size: var(--fs-name);
  font-weight: var(--fw-label);
  text-align: center;
  line-height: 1.3;
}
.join-agreement-sign {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ---- The box he signs in ---- */

.join-sign-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.join-sign-pad {
  display: block;
  width: 100%;
  height: 150px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  touch-action: none;           /* the finger draws; the page does not scroll */
}
.join-sign-pad.is-refused { border-color: var(--warn); }

/* ---- Done ---- */

.join-share-link {
  margin: 0;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--fs-support);
  font-weight: var(--fw-support);
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
  user-select: all;
}

.join-link-button {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 8px 0;
  font-size: var(--fs-support);
  font-weight: var(--fw-support);
  font-family: inherit;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.join-end { height: 20px; }

/* ===========================================================================
   S87 — the three join cards
   =========================================================================== */

/* ---- Card 1: two large choices ---- */

.join-big-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-big-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  font-size: var(--fs-title);
  font-weight: var(--fw-title);
  font-family: inherit;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.join-big-choice.is-chosen {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.join-choice-label {
  min-width: 0;
}

/* The arrow at the right of a choice whose tap moves on (S88). */
.join-go-arrow {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.join-big-choice.is-chosen .join-go-arrow {
  color: var(--accent-ink);
}

/* SHOWN, NOT OFFERED (S88 (b)): grey fill, dashed edge, "Coming soon" at the
   right. It is a plain box, not a button: nothing to tap and nothing to
   focus. */
.join-big-choice.is-soon {
  background: var(--bg);
  border-style: dashed;
  border-color: var(--ink-soft);
  color: var(--ink-soft);
  cursor: default;
}
.join-soon {
  flex: 0 0 auto;
  font-size: var(--fs-support);
  font-weight: var(--fw-support);
  line-height: 1.3;
  color: var(--ink-soft);
}

/* ---- The welcome page (S88): what a business can do here ---- */

/* THE ONE LARGE HEADING (S89): "Get more from your shop", clearly larger
   than the card's own title under it. board.css's --fs-command is the one
   named size above the five steps; no new token is added. */
.join-welcome > .join-title {
  font-size: var(--fs-command);
  line-height: 1.2;
}

/* Who sent him, said quietly above the heading. */
.join-invited {
  color: var(--ink-soft);
}

.join-can-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-name);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
}
.join-can-mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--accent);
}
.join-can-row.is-soon,
.join-can-row.is-soon .join-can-mark {
  color: var(--ink-soft);
}

/* ---- Card 3: the terms, in full, on the page ----
   No max-height and no overflow: he reads straight down the page to the tick.
   A browser test fails if anything on this card scrolls on its own. */

.join-terms {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.join-terms p {
  margin: 0;
  font-size: var(--fs-support);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* A quiet link that is an <a>, not a <button>. */
a.join-link-button {
  display: inline-block;
}
