/* Brand colours and sizing for the ALTCHA checkbox on the contact form (P10-R115, ISD C08).

   Why every token is restated, not just the ones we want to change: the vendored stylesheet
   (vendor/altcha/altcha.css) defines its colours with light-dark() and oklch(), which Safari
   before 17.5 and Chrome before 123 cannot parse (this site supports Safari 14 / Chrome 90).
   Several tokens are also defined from other tokens on :root, and a custom property that
   refers to another is resolved where it is declared, so overriding --altcha-color-neutral
   alone would leave --altcha-border-color holding the unparseable original. Everything that
   reaches a colour is therefore declared here as a plain hex value, on the element itself.

   Palette: tailwind.config.js (qcb navy 700, qcb-teal 700) and the contact form's own inputs
   (gray-300 borders, gray-900 text). Contrast on white: label 17.7:1, checkbox border 4.8:1
   (WCAG 1.4.11 asks for 3:1), success green 5.5:1, error red 6.5:1. */
form altcha-widget {
  display: block;
  --altcha-color-base: #ffffff;
  --altcha-color-base-content: #111827;
  --altcha-color-error: #b91c1c;
  --altcha-color-error-content: #ffffff;
  --altcha-color-neutral: #d1d5db;
  --altcha-color-neutral-content: #4b5563;
  --altcha-color-primary: #1b3a5c;
  --altcha-color-primary-content: #ffffff;
  --altcha-color-success: #1d7568;
  --altcha-color-success-content: #ffffff;
  --altcha-border-color: #d1d5db;
  --altcha-checkbox-border-color: #6b7280;
  --altcha-input-background-color: #ffffff;
  --altcha-input-color: #111827;
  --altcha-popover-color: #d1d5db;
  --altcha-spinner-color: #111827;
  --altcha-switch-background-color: #d1d5db;
  --altcha-switch-toggle-color: #4b5563;
  --altcha-shadow: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));
  /* Fill the form column, like the inputs above it, instead of the default 320px. */
  --altcha-max-width: 100%;
  /* 24px is the WCAG 2.2 minimum target size (2.5.8); the label is part of the click target. */
  --altcha-checkbox-size: 24px;
}

/* Reserve the box's height until the script defines the element, so the Send button does not
   jump when the widget appears (the element renders nothing before then). Scoped to a form:
   the invisible widget in the chat sits outside one and must take no room. */
form altcha-widget:not(:defined) {
  min-height: 50px;
}
