/*
 * Gravity Forms styling for #contact-section.
 * Matches the look of the legacy custom Salesforce form on the home page
 * (white labels with field-type icons, white-bordered teal inputs,
 * full-width light submit button).
 */

#contact-section .gform_wrapper,
#contact-section .gform_wrapper form {
  background: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  max-width: none;
  color: #fff;
}

#contact-section .gform_wrapper .gfield--type-honeypot,
#contact-section .gform_wrapper .gform_validation_container,
#contact-section .gform_wrapper .gform_hidden,
#contact-section .gform_wrapper .gfield--type-hidden,
#contact-section .gform_wrapper .gform_heading {
  display: none !important;
}

#contact-section .gform_wrapper ul.gform_fields {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

#contact-section .gform_wrapper ul.gform_fields > li.gfield {
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
  background: none;
  border: 0;
}

#contact-section .gform_wrapper ul.gform_fields > li.gfield::before,
#contact-section .gform_wrapper ul.gform_fields > li.gfield::marker {
  display: none;
  content: none;
}

/* Cancel the legacy floating-label positioning so labels sit above the input,
   and cancel the legacy 30px label padding-left used for icon prefixes. */
#contact-section .gform_wrapper .top_label .gfield_label,
#contact-section .gform_wrapper .gfield_label {
  top: auto !important;
  padding-left: 0 !important;
}

#contact-section .gform_wrapper .gfield_label {
  color: #ffffff !important;
  font-family: 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  display: block;
  position: static;
  padding: 0 0 8px 0;
  margin: 0;
  line-height: 1.2;
}

/* Drop the icon prefix entirely — no pseudo-element, no left indent. */
#contact-section .gform_wrapper .gfield_label::before {
  content: none !important;
  display: none !important;
}

#contact-section .gform_wrapper .gfield_required,
#contact-section .gform_wrapper .gfield_required_asterisk {
  display: inline !important;
  color: #ffffff !important;
  text-decoration: none;
  margin-left: 2px;
}

/* Name field: two inputs side by side, sub-labels overlaid inside each input
   as a placeholder. They hide once the input is focused or filled. */
#contact-section .gform_wrapper .ginput_container--name {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#contact-section .gform_wrapper .ginput_container--name > span {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  position: relative;
}

#contact-section .gform_wrapper .ginput_container--name input {
  width: 100%;
}

#contact-section .gform_wrapper .ginput_container--name .gform-field-label--type-sub {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  font-family: 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: rgba(255,255,255,0.6) !important;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.15s ease;
}

/* Hide the overlay sub-label when the input is focused or has content.
   The JS shim in functions.php adds .has-value to the parent <span> when
   the input has a value (since GF doesn't render a placeholder attribute). */
#contact-section .gform_wrapper .ginput_container--name span:focus-within .gform-field-label--type-sub,
#contact-section .gform_wrapper .ginput_container--name span.has-value .gform-field-label--type-sub {
  opacity: 0;
}

/* Inputs / selects — match homepage look, override the legacy padding-top hack. */
#contact-section .gform_wrapper input[type="text"],
#contact-section .gform_wrapper input[type="email"],
#contact-section .gform_wrapper input[type="tel"],
#contact-section .gform_wrapper input[type="number"],
#contact-section .gform_wrapper select,
#contact-section input,
#contact-section select {
  width: 100%;
  height: 66px;
  padding: 12px 15px !important;
  font-size: 16px;
  color: #ffffff;
  background-color: #005a7f;
  border: 2px solid #ffffff;
  border-radius: 0;
  box-sizing: border-box;
  font-family: 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dropdown options: readable in every state (closed, open list, highlighted). */
#contact-section .gform_wrapper select option {
  color: #005a7f !important;
  background-color: #ffffff !important;
  font-weight: 500;
}

#contact-section .gform_wrapper select option:checked,
#contact-section .gform_wrapper select option:hover,
#contact-section .gform_wrapper select option:focus {
  background-color: #005a7f !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px 100px #005a7f inset;
}

#contact-section .gform_wrapper input::placeholder,
#contact-section .gform_wrapper select::placeholder {
  color: rgba(255,255,255,0.7);
  opacity: 1;
}

#contact-section .gform_wrapper input:focus,
#contact-section .gform_wrapper select:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.15);
}

/* Breathing room between the last field and the submit button. */
#contact-section .gform_wrapper .gform_footer,
#contact-section .gform_wrapper .gform-footer {
  padding: 0;
  margin: 32px 0 0 0;
  text-align: center;
}

#contact-section .gform_wrapper input[type="submit"],
#contact-section .gform_wrapper .gform_button,
#contact-section .gform_wrapper .gform_button.button {
  width: 100%;
  min-height: 66px;
  background-color: #ffffff;
  color: #005a7f;
  border: 1.5px solid #ffffff;
  border-radius: 8px;
  font-family: 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 18px 25px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#contact-section .gform_wrapper input[type="submit"]:hover,
#contact-section .gform_wrapper .gform_button:hover {
  background-color: #0082b6;
  color: #ffffff;
  border-color: #0082b6;
}

#contact-section .gform_wrapper .gfield_description.validation_message,
#contact-section .gform_wrapper .gform_validation_errors,
#contact-section .gform_wrapper .validation_error {
  color: #ffdede;
  background: transparent;
  border: 0;
  padding: 4px 0 0 0;
  font-size: 13px;
}

#contact-section .gform_wrapper .gfield_error input,
#contact-section .gform_wrapper .gfield_error select {
  border-color: #ffdede;
}

#contact-section .gform_confirmation_message {
  color: #ffffff;
  text-align: center;
  padding: 12px 0;
}
