/*
 * Gate page styles (test-gate): the layout of /test, its panel, form stack, bot check slot and
 * off-screen honeypot. Every value comes from tokens.css; the shared form components live in forms.css.
 */

/* HeroPanel (test-redesign, board RX01): the peach tint at CARD_RADIUS_PX in light; in dark the one tool tint at
   the same radius, no rule (COR-1; component tokens, no scheme branch); the test h1 and the lead in --ink */
.gate-panel {
  display: flex;
  flex-direction: column;
  gap: var(--test-hero-gap);
  margin-top: var(--test-hero-margin-top);
  padding: var(--test-hero-padding-top) var(--test-hero-padding-inline) var(--test-hero-padding-bottom);
  border-top: var(--test-hero-rule-width) solid var(--test-hero-rule-line);
  border-radius: var(--test-hero-radius);
  background: var(--test-hero-bg);
}

.gate-panel h1,
.gate-panel__reason {
  margin: 0;
}

.gate-panel h1 {
  font-size: var(--test-h1-size);
  line-height: var(--test-h1-line-height);
  letter-spacing: var(--test-heading-tracking);
}

.gate-panel__reason {
  color: var(--ink);
  font-size: var(--test-lead-size);
  line-height: var(--test-lead-line-height);
}

/* GateForm: the field, two groups, consent and the button, a TEST_LAYOUT gap apart (board RX01) */
.gate-form {
  display: flex;
  flex-direction: column;
  gap: var(--test-form-gap);
  padding: var(--test-form-margin-top) 0 var(--space-screen-bottom);
}

/* NoScriptGuide (test-flow-review TFR-A04, NO_SCRIPT_GUIDE): only a browser without JavaScript renders it,
   under the panel: the lead, one details block per device and the closing line */
.gate-no-script {
  display: grid;
  gap: var(--space-sm);
  margin: var(--gate-no-script-margin-top) 0 0;
  color: var(--gate-no-script-color);
}

.gate-no-script p,
.gate-no-script ol {
  margin: 0;
}

.gate-no-script__device {
  border-top: var(--hairline-width) solid var(--line);
}

/* A summary is a tap target: TAP_MIN tall; its display stays list-item, so the disclosure marker shows */
.gate-no-script__device > summary {
  box-sizing: border-box;
  min-height: var(--tap-min);
  padding: var(--space-xs) 0;
  font-weight: 600;
}

.gate-no-script__device > ol {
  display: grid;
  gap: var(--space-xs);
  padding: 0 0 var(--space-sm) var(--space-lg);
}

/* Device gating with no script to detect anything: a fine pointer is a computer, a coarse one Android, and
   iOS, the one engine with -webkit-touch-callout, overrides both (the supports block comes last, so its
   display: block outranks the coarse rule at equal specificity); a browser matching no query keeps all three */
@media (pointer: fine) {
  .gate-no-script__device:not(.gate-no-script__device--computer) {
    display: none;
  }
}

@media (pointer: coarse) {
  .gate-no-script__device:not(.gate-no-script__device--android) {
    display: none;
  }
}

@supports (-webkit-touch-callout: none) {
  .gate-no-script__device:not(.gate-no-script__device--ios) {
    display: none;
  }

  .gate-no-script__device.gate-no-script__device--ios {
    display: block;
  }
}

/* HoneypotField: off-screen and out of the flow, yet never display none, so a naive bot still fills it;
   the wrapper is aria-hidden and the input has tabindex -1, so no visitor reaches it */
.gate-honeypot {
  position: absolute;
  left: var(--gate-honeypot-offset);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* BotCheckSlot takes no space until Cloudflare puts its widget in it */
.gate-bot-check:empty {
  display: none;
}

/* The button sits a little further from the consent row than the fields from each other (board F2a) */
.gate-form > .button {
  margin-top: var(--gate-start-margin-top);
}

.gate-hint {
  margin: var(--gate-hint-margin-top) 0 0;
  color: var(--gate-hint-color);
  font-size: var(--gate-hint-font-size);
  line-height: var(--message-line-height);
  text-align: center;
}

/* Desktop (board RX01): the form at TEST_GATE_FORM_MAX, the button at the start of its row */
@media (min-width: 64rem) {
  .gate-form {
    max-width: var(--test-gate-form-max);
  }
}
