/* ==========================================================================
   TygerLabs.ai · Gravity Forms, with Gravity's own CSS switched off.

   Controls carry the site's Bootstrap classes (form-control, form-select,
   form-label, btn; added in _inc/gravity.php), so ui-kit.css styles them as
   it styled the static forms. This file adds what those classes do not
   cover: the field grid, error states, and the fields Gravity expects its
   own stylesheet to hide.
   ========================================================================== */

/* Fields: a 12-column grid, the static forms' .row.g-3 with col-md-6 halves. */
.gform_wrapper .gform_fields {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}
.gform_wrapper .gfield { grid-column: span 12; min-width: 0; }
@media (min-width: 768px) {
  .gform_wrapper .gfield--width-half { grid-column: span 6; }
  .gform_wrapper .gfield--width-third { grid-column: span 4; }
}
.gform_wrapper .gform_body,
.gform_wrapper form { margin: 0; }

/* Homepage hero card: one column, tighter, as home.css set for the static form. */
.home-hero-form .gform_wrapper .gform_fields,
.hero-form-panel .gform_wrapper .gform_fields { gap: var(--s-3); }

/* Required asterisk. */
.gform_wrapper .gfield_required { color: var(--tiger); margin-inline-start: 0.2em; }

/* Errors: the site's danger colour, one line under the field. */
.gform_wrapper .gfield_error .form-control,
.gform_wrapper .gfield_error .form-select { border-color: var(--danger); }
.gform_wrapper .gfield_validation_message,
.gform_wrapper .validation_message {
  margin-top: var(--s-2);
  font-size: var(--text-sm);
  color: var(--danger);
}
.gform_wrapper .gform_validation_errors {
  margin-bottom: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  color: var(--danger-ink);
  font-size: var(--text-sm);
}
.gform_wrapper .gform_validation_errors h2 { margin: 0; font: inherit; color: inherit; }

/* Footer: the reassurance note and the button, wrapping like the static
   .contact-form-foot and .request-modal-foot. */
.gform_wrapper .gform_footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.home-hero-form .gform_wrapper .gform_footer,
.hero-form-panel .gform_wrapper .gform_footer { margin-top: var(--s-4); }
.gform_wrapper .gform_ajax_spinner { width: 20px; height: 20px; margin-inline-start: var(--s-2); }
@media (max-width: 575.98px) {
  .gform_wrapper .gform_footer .btn { width: 100%; }
}

/* What Gravity's own stylesheet would hide: the honeypot, hidden fields,
   screen-reader-only text and the AJAX frame. */
.gform_wrapper .gform_validation_container,
.gform_wrapper .gform_hidden,
.gform_wrapper .gfield--type-hidden,
.gform_wrapper .gfield_visibility_hidden,
.gform_wrapper .gform_heading,
iframe[id^="gform_ajax_frame_"] { display: none !important; }
.gform_wrapper .gfield_required_text_screen_reader,
.gform_wrapper .screen-reader-text,
.gform_wrapper .hidden_label .gfield_label {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Confirmation: the same success block the static forms showed. */
.gform_confirmation_message .form-success { padding-inline: 0; }
