/* The message choices (consent_boxes in partials.html): shared by the staff pages and the public mail-in page,
   so it only uses colour variables both stylesheets have (--border is --line on the public site). */
.consent-box { border: 1px solid var(--border, var(--line)); border-radius: 10px; padding: 12px 16px 4px; margin: 16px 0 0; }
.consent-box legend { font-weight: 700; padding: 0 6px; }
.consent-wording { max-width: 70ch; }
.consent-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.consent-col { display: grid; gap: 8px; align-content: start; }
/* each choice is one card: tapping anywhere on it, wording included, ticks its big box */
.consent-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border, var(--line)); border-radius: 12px;
  cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.consent-opt:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--border, var(--line))); }
.consent-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  box-shadow: 0 0 0 1px var(--brand) inset; }
.consent-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.consent-opt input[type=checkbox] { appearance: none; flex: none; width: 26px; height: 26px; padding: 0; margin: 0; border: 2px solid color-mix(in srgb, var(--text) 45%, transparent);
  border-radius: 8px; background: var(--bg, transparent); display: grid; place-content: center; cursor: pointer; transition: background .15s, border-color .15s; }
.consent-opt input::after { content: ""; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform .12s ease-out; }
.consent-opt input:checked { background: var(--brand); border-color: var(--brand); }
.consent-opt input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.consent-opt-body { display: grid; gap: 4px; min-width: 0; }
.consent-opt-title { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; line-height: 26px; }
.consent-opt .consent-wording { font-size: .85rem; font-weight: 400; color: var(--muted); line-height: 1.45; }
.consent-opt.is-off { opacity: .55; cursor: not-allowed; } .consent-opt.is-off input { cursor: not-allowed; }
.consent-box .consent-none { margin-top: 12px; }
.consent-none:has(input:checked) { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  box-shadow: 0 0 0 1px var(--danger) inset, 0 0 18px color-mix(in srgb, var(--danger) 55%, transparent); }
/* the "this is correct" agreement: a big card of its own, well clear of the opt-out above it */
.consent-agree { margin-top: 28px; padding: 16px 18px; }
.consent-agree .consent-opt-title { font-size: 1.05rem; line-height: 1.4; display: block; padding-top: 2px; }
.consent-agree input[type=checkbox] { width: 32px; height: 32px; }
.consent-agree input::after { width: 15px; height: 8px; }
.consent-none input:checked { background: var(--danger); border-color: var(--danger); }
.consent-box.has-error { border-color: var(--danger); }
