/* ==========================================================================
   PBB — form-page styles
   --------------------------------------------------------------------------
   Shared by membership.html, volunteer.html, partnership.html and join.html.
   Was inline in join.html; extracted when the forms became separate pages so
   the same rules are not maintained in four places (and so browsers cache it
   once across the whole set).

   Depends on pbb-tokens.css and pbb-site.css.
   ========================================================================== */

/* ---- Cross-links between the three form pages -------------------------- */

.form-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pbb-space-2);
  margin-bottom: var(--pbb-space-5);
}
.form-tab {
  min-height: var(--pbb-tap);
  padding: var(--pbb-space-2) var(--pbb-space-4);
  border: 1.5px solid var(--pbb-forest-line);
  border-radius: var(--pbb-radius-pill);
  background: var(--pbb-white);
  font-family: var(--pbb-font-label);
  font-weight: 700;
  font-size: var(--pbb-text-sm);
  color: var(--pbb-ink-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.form-tab:hover { border-color: var(--pbb-gold); color: var(--pbb-ink-dark); }
.form-tab[aria-current="page"] {
  background: var(--pbb-forest);
  border-color: var(--pbb-forest);
  color: var(--pbb-white);
}

/* ---- Photo capture ------------------------------------------------------ */

.capture-box {
  border: 2px dashed #B8CCBE;
  border-radius: var(--pbb-radius);
  background: #F7FAF8;
  padding: var(--pbb-space-4);
  text-align: center;
}
.capture-box video,
.capture-box img.preview {
  width: 100%;
  max-width: 260px;
  margin: 0 auto var(--pbb-space-3);
  border-radius: var(--pbb-radius-sm);
  background: #0B2E19;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pbb-space-2);
  justify-content: center;
}

/* ---- Signature pad ------------------------------------------------------ */

#signaturePad {
  width: 100%;
  height: 180px;
  background: var(--pbb-white);
  border: 1px solid #C4D3C8;
  border-radius: var(--pbb-radius-sm);
  display: block;
  cursor: crosshair;
  /* Stops the page scrolling while a finger is drawing. Also set in JS, but
     declared here so it holds even before the script runs. */
  touch-action: none;
}
.sign-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--pbb-space-3);
  margin-top: var(--pbb-space-2);
  flex-wrap: wrap;
}

/* ---- ID preview --------------------------------------------------------- */

.id-preview { display: grid; gap: var(--pbb-space-4); }
.id-preview canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--pbb-shadow-lg);
  background: var(--pbb-forest-deep);
}
@media (min-width: 860px) { .id-preview { grid-template-columns: 1fr 1fr; } }

/* ---- Multi-step panels -------------------------------------------------- */

.step-panel[hidden] { display: none; }

.step-actions {
  display: flex;
  gap: var(--pbb-space-3);
  margin-top: var(--pbb-space-4);
  flex-wrap: wrap;
}
.step-actions .btn { flex: 1 1 auto; }

/* ---- FAQ block (matches the FAQPage schema on each form page) ---------- */

.faq-list { margin-top: var(--pbb-space-4); }
.faq-list .disclose > summary { font-size: var(--pbb-text-base); }

/* ==========================================================================
   VERIFY RESULT — verify.html
   --------------------------------------------------------------------------
   Three outcomes a person acts on differently, so they must not look alike at
   a glance: valid (accept the ID), warn (real card, but expired/pending/
   inactive — do not accept without asking), err (no match — refuse it).
   Colour alone does not carry that: each carries an icon and its own wording,
   because a poll watcher checking IDs in daylight on a cheap screen is the
   worst-case viewing condition and red/green is the commonest colour-vision
   deficiency.
   ========================================================================== */

.verify-result {
  margin-top: var(--pbb-space-5, 1.25rem);
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 2px solid;
  background: #fff;
}

.verify-result:focus { outline: none; }
.verify-result:focus-visible {
  outline: 3px solid var(--pbb-gold, #c9a227);
  outline-offset: 2px;
}

.verify-ok   { border-color: #0a6e2e; background: #f1f8f3; }
.verify-warn { border-color: #b8860b; background: #fff8e6; }
.verify-err  { border-color: #b3261e; background: #fdecea; }

.verify-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .75rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.verify-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
}

.verify-ok   .verify-icon { background: #0a6e2e; }
.verify-warn .verify-icon { background: #b8860b; }
.verify-err  .verify-icon { background: #b3261e; }

.verify-facts { margin: 0 0 .75rem; }

.verify-facts > div {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  padding: .45rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.verify-facts > div:last-child { border-bottom: 0; }

.verify-facts dt {
  flex: 0 0 11rem;
  margin: 0;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #4a5a50;
}

.verify-facts dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

.verify-note {
  margin: .5rem 0 0;
  font-size: .9rem;
  line-height: 1.5;
}

.verify-privacy { color: #4a5a50; font-size: .82rem; }

.verify-scan video { max-height: 60vh; object-fit: cover; }

@media (max-width: 480px) {
  .verify-facts dt { flex-basis: 100%; }
}
