/* =========================================================================
   VEIL — Cloudflare Turnstile widget container (TURNSTILE-01)
   -------------------------------------------------------------------------
   Loaded by inc/veil-turnstile.php, and ONLY on a page that renders a Gravity
   Form with a CAPTCHA field we have taken over.

   Deliberately tiny. Three things and nothing else:

   1. min-height reserves the widget's rendered height (Turnstile's normal
      widget is 300x65) BEFORE api.js swaps the empty <div> for an <iframe>.
      Without it the Submit button jumps up the page while the visitor is
      reading, which is both a CLS regression and a mis-click risk.

   2. max-width on the iframe keeps the 300px widget inside the form column at
      375. The contact form's panel is 24px-padded at that width, so a fixed
      300px box has ~27px of slack — this is a guard, not a fix for a measured
      overflow.

   3. NO focus styling. NOT an omission — MEASURED, on this build, 2026-08-10.
      Turnstile does not put an <iframe> in our DOM the way reCAPTCHA does. It
      appends one bare <div> to the container and renders the whole widget
      inside that div's CLOSED shadow root. Consequences, all measured with a
      400ms settle (Gravity Forms animates its focus outline over ~200ms, so a
      shorter wait reports false negatives):

        - three tab stops live inside the widget (Cloudflare logo, Privacy,
          Help; plus the checkbox in Managed mode on a real key)
        - at every one of them `document.activeElement` is the shadow HOST div
        - the host matches NONE of :focus, :focus-visible, :focus-within
        - `.veil-turnstile` matches neither :focus-within nor :has(:focus)
        - no `focusin` event reaches the container OR the document

      So no stylesheet and no script on this site can paint a ring at those tab
      stops. This is the same wall base.css already documented for the
      reCAPTCHA iframe ("case (b)"), and base.css's `iframe:focus-within` rule
      cannot help here because there is no iframe element to match.

      It does not need to: Cloudflare paints its own focus ring inside the
      shadow root, verified by screenshot at all three tab stops
      (work-orders/reports/turnstile-keyboard-tabstop-*.png). A ring declared
      here would be dead CSS pretending to be a control.
   ========================================================================= */

.veil-turnstile {
	min-height: 65px;
}

/* Narrow containers get Cloudflare's 150x140 'compact' widget instead (chosen
   in JS from the measured container width — see assets/js/veil-turnstile.js).
   The attribute is written before turnstile.render() runs, so the reserved
   height is already correct when the widget paints. */
.veil-turnstile[data-veil-size="compact"] {
	min-height: 140px;
}

.veil-turnstile iframe {
	max-width: 100%;
}

/* The widget only exists once Turnstile has rendered into it; an empty
   container should not add space of its own on top of the reserved height. */
.veil-turnstile:empty {
	display: block;
}
