/*
  GKP inquiry form, in the catalogue system.

  Uses the system's own tokens rather than redefining them: --ec-ink,
  --ec-paper, --ec-clay, --ec-line-l, --ec-serif and --ec-sans are on :root in
  the global stylesheet. Nothing here declares a typeface of its own, so the
  form cannot drift away from the rest of the site. It sits inside the Paper
  panel (.ec-form) of the Inquire section.

  Every class is gkf- prefixed, and js/inquiry-form.js finds the form by those
  names and ids. Restyle here; do not rename there.
*/

.gkf {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 36px;
  margin-top: 30px;
}

/* Everything spans the panel except the fields, which pair up. */
.gkf > * { grid-column: 1 / -1; min-width: 0; }
.gkf > .gkf-row { grid-column: auto; }
.gkf > .gkf-row--wide { grid-column: 1 / -1; }

.gkf-row {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gkf-label {
  font-family: var(--ec-sans);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .1em;
  color: rgba(22, 24, 19, .88);
}

.gkf-input {
  font-family: var(--ec-sans);
  font-size: 17px;
  line-height: 1.3;
  color: var(--ec-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(19, 31, 23, .45);
  border-radius: 0;           /* iOS rounds inputs by default */
  padding: 9px 2px;
  width: 100%;
  min-height: 41px;           /* an empty date field collapses on iOS without it */
  transition: border-color .3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.gkf-input::placeholder { color: rgba(22, 24, 19, .61); opacity: 1; }   /* 4.64:1 on Paper (.55 gave 3.84:1; WCAG 1.4.3) */

/* Keyboard users get a visible focus ring; the underline alone is too quiet
   to serve as the only focus indicator. */
.gkf-input:focus-visible,
.gkf-check input:focus-visible,
.gkf-submit:focus-visible {
  outline: 2px solid var(--ec-clay);
  outline-offset: 3px;
}

.gkf-input:focus-visible { border-bottom-color: var(--ec-clay); }

.gkf-select {
  padding-right: 24px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23b14e28' stroke-width='1.5' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

.gkf-select option { color: #131f17; }

.gkf-textarea {
  border: 1px solid rgba(19, 31, 23, .35);
  padding: 12px;
  min-height: 132px;
  resize: vertical;
}

.gkf-input--error { border-bottom-color: var(--ec-clay); }
.gkf-textarea.gkf-input--error { border-color: var(--ec-clay); }

.gkf-fielderror {
  font-family: var(--ec-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ec-clay);
  margin: 0;
}

/* ---- Consent ------------------------------------------------------------ */

.gkf-consent {
  border: 1px solid rgba(19, 31, 23, .28);
  margin: 0;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.gkf-legend {
  font-family: var(--ec-sans);
  font-size: 11.5px;
  letter-spacing: .24em;
  color: var(--ec-clay);
  padding: 0 8px;
}

.gkf-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  font-family: var(--ec-sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: #232823;
  cursor: pointer;
  transition: opacity .3s ease;
}

.gkf-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--ec-clay);
  cursor: pointer;
}

/*
  Dimmed, not disabled. When "no text messages" is ticked the two consent
  options fade, but they stay clickable so the choice is recoverable with one
  click rather than requiring the person to work out what to untick first.
  Opacity stays above .55 so the text keeps a legible contrast ratio.
*/
.gkf-check--dim { opacity: .58; }

.gkf-live {
  font-family: var(--ec-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ec-quiet);
  margin: 0;
  min-height: 1.5em;   /* reserve the line so announcing does not shift layout */
}

/* ---- Actions ------------------------------------------------------------ */

.gkf-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/* The one clay button in the panel. It sizes to its word and never stretches.
   The arrow is drawn here, not typed into the button, so the word printed on
   it stays exactly "Send": the line under it names the button by that word. */
.gkf-submit {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--ec-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ec-on-clay);
  background: var(--ec-clay);
  border: 0;
  border-radius: 0;
  padding: 19px 30px;
  cursor: pointer;
  transition: background .35s ease, color .35s ease, transform .35s ease;
}

.gkf-submit::after { content: "\2192"; letter-spacing: 0; }

.gkf-submit:hover { background: var(--ec-kelp); color: var(--ec-paper); transform: translateY(-2px); }

.gkf-submit[disabled] { opacity: .5; cursor: progress; transform: none; }

.gkf-note {
  font-family: var(--ec-sans);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ec-body);
  margin: 0;
}

.gkf-note a { color: var(--ec-clay); text-underline-offset: 3px; }

.gkf-thanks {
  font-family: var(--ec-serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.25;
  color: var(--ec-ink);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .gkf-input, .gkf-check, .gkf-submit { transition: none; }
  .gkf-submit:hover { transform: none; }
}

/* ---- Fallback -----------------------------------------------------------
   Shown when the endpoint cannot be reached. The inbox and the phone are the
   way through, so they are given prominently rather than apologised for in
   small type. */

.gkf-fallback {
  border: 1px solid var(--ec-line-l);
  border-left: 3px solid var(--ec-clay);
  background: var(--ec-paper-dim);
  padding: 24px;
}

.gkf-fallback p { font-family: var(--ec-sans); font-size: 14.5px; line-height: 1.6; color: var(--ec-body); margin: 0 0 10px; }
.gkf-fallback p:last-child { margin-bottom: 0; }

.gkf-fallback .gkf-fallback-h {
  font-family: var(--ec-serif);
  font-weight: 500;
  font-size: 24px;
  color: var(--ec-ink);
  line-height: 1.3;
}

.gkf-fallback .gkf-fallback-ways {
  font-size: 15.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.gkf-fallback-ways a { color: var(--ec-clay); text-decoration: none; border-bottom: 1px solid rgba(162, 85, 36, .4); }
.gkf-fallback-ways a:hover { border-bottom-color: var(--ec-clay); }
.gkf-fallback-ways span { color: var(--ec-quiet); }

/* Turnstile ---------------------------------------------------------------
   The mount holds nothing while the challenge is invisible, which on this
   site is nearly always: appearance: 'interaction-only' only paints a widget
   when Cloudflare wants the visitor to act. While it is empty it is lifted
   out of the grid, so the form carries no gap for something that is not
   there, and it stays rendered (never display: none) so the widget can mount
   into it. */

.gkf-verify { margin: 0; }
.gkf-verify:empty { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Shown when the challenge could not load at all. Styled like a field error
   rather than the full fallback panel, because the form is still usable and
   what they typed is still in it. */
.gkf-verifyfail {
  font-family: var(--ec-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ec-body-strong);
  background: var(--ec-paper-dim);
  border-left: 3px solid var(--ec-clay);
  padding: 14px 16px;
  margin: 4px 0 0;
  max-width: 52ch;
}

.gkf-verifyfail a { color: var(--ec-clay); text-decoration: none; border-bottom: 1px solid rgba(162, 85, 36, .4); }
.gkf-verifyfail a:hover { border-bottom-color: var(--ec-clay); }
.gkf-verifyfail:focus { outline: none; }

/* Terms assent -----------------------------------------------------------

   Deliberately outside the text-message fieldset. Those three boxes are
   optional and say so; this one is required, and sitting it among them would
   read as one more preference. Berman asks for notice a reasonably prudent
   user would see, so it gets its own space above the button rather than
   joining a list of opt-ins. */
.gkf-terms {
  padding-top: 20px;
  border-top: 1px solid var(--ec-line-l);
}
.gkf-terms a { color: var(--ec-clay); text-underline-offset: 3px; }

/* And the line under the button, which names the button. If the button text
   ever changes, this changes with it — Chabolla v. ClassPass turned on
   exactly that mismatch. */
.gkf-assent { color: var(--ec-body); }

@media (max-width: 1020px) {
  .gkf { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
