/*
 * fhb-forms.css: lead form (Gravity Form 1) polish. Pairs with fhb-forms.js, which adds
 * .fhb-form-card(--hero|--lower) to the form's column and .fhb-form-section--lower to the
 * lower form's section.
 *
 * Desktop (>1024px) layout is unchanged; only focus, validation and step 2 states differ.
 */

/* ---------- Inputs: step 2 matches step 1 (filled grey, no visible border) ----------
   Step 1 already gets this from the page CSS (div#gform_fields_1 input); step 2 lives in
   #gform_fields_1_2 and fell back to GF's white bordered input. */
.gform_wrapper.gform-theme .gform_fields .gfield input:is([type="text"], [type="email"], [type="tel"]) {
  background: #f2f2f2 !important;
  border-radius: 0 !important;
  outline: none !important;
}
.gform_wrapper.gform-theme .gform_fields:where(#gform_fields_1_2) .gfield input:is([type="text"], [type="email"], [type="tel"]) {
  border: 1px solid #f2f2f2 !important;
  box-shadow: none !important;
}

/* ---------- Focus: brand blue border + soft ring (no red on arrival) ----------
   The ID variants beat the offer page's `div#gform_fields_1 input { box-shadow: none !important }`. */
.gform_wrapper.gform-theme .gform_fields .gfield input:is([type="text"], [type="email"], [type="tel"]):focus,
.gform_wrapper.gform-theme .gform_fields:is(#gform_fields_1, #gform_fields_1_2) .gfield input:is([type="text"], [type="email"], [type="tel"]):focus {
  border-color: #1e73be !important;
  box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.25) !important;
  outline: none !important;
}

/* ---------- Validation ---------- */
.gform_wrapper.gform-theme .gform_fields .gfield.gfield_error input:is([type="text"], [type="email"], [type="tel"]),
.gform_wrapper.gform-theme .gform_fields:is(#gform_fields_1, #gform_fields_1_2) .gfield.gfield_error input:is([type="text"], [type="email"], [type="tel"]) {
  border-color: #c02b0a !important;
  box-shadow: inset 0 0 0 2px #c02b0a !important;
}
.gform_wrapper.gform-theme .gform_fields .gfield.gfield_error input:is([type="text"], [type="email"], [type="tel"]):focus,
.gform_wrapper.gform-theme .gform_fields:is(#gform_fields_1, #gform_fields_1_2) .gfield.gfield_error input:is([type="text"], [type="email"], [type="tel"]):focus {
  box-shadow: inset 0 0 0 2px #c02b0a, 0 0 0 3px rgba(30, 115, 190, 0.25) !important;
}
.gform_wrapper.gform-theme .gfield .gfield_validation_message,
.gform_wrapper.gform-theme .gfield .validation_message {
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin-top: 6px !important;
  padding: 0 !important;
  color: #c02b0a !important;
  background: none !important;
  border: 0 !important;
}
.gform_wrapper.gform-theme .gform_validation_errors {
  background: #fff !important;
  border: 1px solid #c02b0a !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  padding: 12px 16px !important;
  margin: 0 0 16px !important;
}
.gform_wrapper.gform-theme .gform_validation_errors > h2,
.gform_wrapper.gform-theme .gform_validation_errors .gform_submission_error {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 10px;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  font-weight: 600;
  color: #c02b0a !important;
}
.gform_wrapper.gform-theme .gform_validation_errors .gform-icon {
  position: static !important;
  flex: 0 0 auto;
  margin: 0 !important;
  inset: auto !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  color: #c02b0a !important;
  border-color: #c02b0a !important;
}

/* ---------- Step 2 buttons: Submit primary, Previous secondary ---------- */
.gform_wrapper .gform_page_footer:has(.gform_button) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.gform_wrapper .gform_page_footer .gform_button,
.gform_wrapper .gform_page_footer .gform_previous_button {
  min-height: 48px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
}
.gform_wrapper .gform_page_footer input.gform_previous_button,
.gform_wrapper .gform_page_footer input#gform_previous_button_1 {
  background: transparent !important;
  color: #1e73be !important;
  border: 2px solid #1e73be !important;
  box-shadow: none !important;
}
.gform_wrapper .gform_page_footer input.gform_previous_button:hover,
.gform_wrapper .gform_page_footer input.gform_previous_button:focus-visible {
  background: rgba(30, 115, 190, 0.08) !important;
}
.gform_wrapper .gform_page_footer input:is(.gform_button, .gform_previous_button, .gform_next_button):focus-visible {
  outline: 3px solid rgba(30, 115, 190, 0.45) !important;
  outline-offset: 2px !important;
}
.gform_wrapper .gform_page_footer .fhb-spinner { margin-left: 0 !important; }

/* ---------- Tablets (768-1024): wider inputs, lower card breathing room ---------- */
@media (min-width: 768px) and (max-width: 1024px) {
  .vc_row .wpb_column.vc_column_container.fhb-form-card {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
  .vc_row .wpb_column.vc_column_container.fhb-form-card > .vc_column-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .vc_row .wpb_column.vc_column_container.fhb-form-card.fhb-form-card--lower {
    padding-top: 32px !important;
    padding-bottom: 24px !important;
  }
  .vc_row.fhb-form-section--lower { padding-bottom: 40px !important; }
}
/* 768-800: page CSS sets the half-width card to width:initial (shrink-to-fit float), so
   less padding would shrink the card instead of widening the inputs. Pin it to its column. */
@media (min-width: 768px) and (max-width: 800px) {
  .vc_row .wpb_column.vc_column_container.fhb-form-card.vc_col-sm-6 { width: 50% !important; }
}

/* ---------- Phones (<=767) ---------- */
@media (max-width: 767px) {
  .vc_row .wpb_column.vc_column_container.fhb-form-card {
    padding: 24px 20px !important;
  }
  .vc_row .wpb_column.vc_column_container.fhb-form-card > .vc_column-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .vc_row .wpb_column.vc_column_container.fhb-form-card.fhb-form-card--lower {
    padding-top: 32px !important;
  }
  /* Translucent hero card: more opaque for label contrast over the photo */
  .vc_row .wpb_column.vc_column_container.fhb-form-card.fhb-form-card--translucent {
    background-color: rgba(255, 255, 255, 0.88) !important;
  }
  .vc_row.fhb-form-section--lower { padding-bottom: 40px !important; }

  /* Previous goes below Submit, both full width */
  .gform_wrapper .gform_page_footer:has(.gform_button) {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .gform_wrapper .gform_page_footer .gform_button,
  .gform_wrapper .gform_page_footer .gform_previous_button {
    width: 100% !important;
    max-width: none !important;
  }
  .gform_wrapper .gform_page_footer .fhb-spinner { align-self: center; }
}

/* ---------- SMS consent (10DLC) row, added by fhb-forms.js ---------- */
.gform_wrapper.gform-theme .gform_fields .gfield.fhb-consent { grid-column: 1 / -1; margin-top: 2px; }
.gform_wrapper.gform-theme .gfield.fhb-consent .ginput_container_consent {
  display: flex; align-items: flex-start; gap: 10px;
}
.gform_wrapper.gform-theme .gfield.fhb-consent input[type="checkbox"] {
  flex: 0 0 auto; width: 18px !important; height: 18px !important; min-width: 18px; margin: 2px 0 0 !important;
  accent-color: #1e73be; cursor: pointer; appearance: auto !important; -webkit-appearance: checkbox !important;
  background: #fff !important; border: 1px solid #9aa4b2 !important; border-radius: 3px !important; box-shadow: none !important;
}
.gform_wrapper.gform-theme .gfield.fhb-consent input[type="checkbox"]:focus-visible { outline: 3px solid rgba(30,115,190,.35) !important; outline-offset: 1px; }
.gform_wrapper.gform-theme .gfield.fhb-consent .gfield_consent_label {
  font-size: 12px !important; line-height: 1.45 !important; font-weight: 400 !important; color: #3a4452 !important;
  text-transform: none !important; letter-spacing: 0 !important; margin: 0 !important; padding: 0 !important; cursor: pointer;
}
.gform_wrapper.gform-theme .gfield.fhb-consent .gfield_consent_label a { color: #1e73be !important; text-decoration: underline !important; }
.gform_wrapper.gform-theme .gfield.fhb-consent .gfield_consent_label .gfield_required_text { font-size: 11px; color: #c02b0a; }
.gform_wrapper.gform-theme .gfield.fhb-consent.gfield_error input[type="checkbox"] { outline: 2px solid #c02b0a !important; outline-offset: 1px; }
.fhb-form-card--hero .gfield.fhb-consent .gfield_consent_label { color: #4a5563 !important; }

/* SMS opt-in link under the homepage lead forms (A2P 10DLC) */
.fhb-sms-link { clear: both; position: relative; z-index: 1; margin: 0 !important; padding-top: 22px !important; font-size: 14px; line-height: 1.4; text-align: center; }
.fhb-sms-link a { text-decoration: underline; font-weight: 600; }
