/* REHAB AT WORK pay page. Light colors, one column, fits a 320px phone. */
:root {
  --navy: #1f3a5f;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #cbd5e1;
  --page: #f8fafc;
  --card: #ffffff;
  --good: #166534;
  --good-bg: #f0fdf4;
  --warn: #92400e;
  --warn-bg: #fffbeb;
  --bad: #991b1b;
  --bad-bg: #fef2f2;
  color-scheme: light;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.top {
  background: var(--navy);
  color: #ffffff;
  padding: 0.9rem 1rem;
}

.brand {
  max-width: 32rem;
  margin: 0 auto;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1.15rem;
  white-space: nowrap; /* the name is never split across two lines */
}

.wrap {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.muted { color: var(--muted); }

.bill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.bill p { margin: 0; }
.bill-kind { font-weight: 600; }
.bill-amount { font-size: 2.4rem; font-weight: 800; line-height: 1.2; margin: 0.25rem 0; color: var(--navy); }
.bill-ref { color: var(--muted); overflow-wrap: anywhere; }

.notice {
  border-radius: 0.6rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: var(--card);
}

.notice h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.notice p { margin: 0; }
.notice.good { background: var(--good-bg); border-color: #bbf7d0; color: var(--good); }
.notice.warn { background: var(--warn-bg); border-color: #fde68a; color: var(--warn); }
.notice.bad { background: var(--bad-bg); border-color: #fecaca; color: var(--bad); }

.payform {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem;
}

.field { margin-bottom: 0.9rem; min-width: 0; }
.field label,
.field .field-name { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }

.field input {
  display: block;
  width: 100%;
  height: 2.75rem;
  border: 1px solid #94a3b8;
  border-radius: 0.4rem;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 0 0.6rem;
}

.field-zip input { max-width: 8rem; }

/* The card gateway puts its own frame in each .hosted box and draws the box's border inside it
   (pay.js BOX_CSS, the same look as the inputs above), so the box itself is only the frame's size. */
.hosted { height: 2.75rem; }
/* !important: Collect.js writes "height: 0px" on its frame when it is not asked to copy this page's
   styles (styleSniffer off), and the boxes would vanish (seen with the real Collect.js, 11-11). */
.hosted iframe { display: block; width: 100%; height: 100% !important; border: 0; }

.field input:focus { outline: 3px solid #93c5fd; outline-offset: 1px; }

.row { display: flex; gap: 0.75rem; }
.row > .field { flex: 1 1 0; }

.fine { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0.75rem; }

.form-error { color: var(--bad); font-weight: 600; margin: 0 0 0.75rem; min-height: 0; }
.form-error:empty { display: none; }

.pay {
  display: block;
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--navy);
  color: #ffffff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.pay:disabled { opacity: 0.55; cursor: not-allowed; }
.pay:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Apple Pay / Google Pay, under the Pay button (Jonathan, 11-10: "put apple pay below"). The gateway
   draws each button inside its box; the whole block stays hidden until one is actually drawn. */
.wallets { margin-top: 0.25rem; }
.wallets.off { opacity: 0.55; pointer-events: none; }
.or { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.9rem; margin: 0.9rem 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.wallet:empty { display: none; }
.wallet + .wallet { margin-top: 0.6rem; }
.wallet iframe, .wallet apple-pay-button { display: block; width: 100%; max-width: 100%; }

#working { margin: 0.6rem 0 0; text-align: center; }
#working:empty { display: none; }

.foot {
  max-width: 32rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.foot a { color: var(--navy); font-weight: 600; white-space: nowrap; }
