/* StruXure Form Enhancements - optional styling
   Adjust to match your Gravity Forms theme */

.gform_wrapper .iti,
.iti {
  width: 100%;
}

.gform_wrapper input.iti__tel-input,
.gform_wrapper .iti input,
.iti input {
  width: 100% !important;
  padding-left: 64px !important;
}

.iti__flag-container {
  z-index: 2;
}

.pac-container {
  z-index: 10000; /* keep Google's autocomplete dropdown above GF modals/steps */
}

/* When the country dropdown is open, the .iti wrapper and every GF
   ancestor that might clip it need overflow visible so the absolutely-
   positioned list isn't cut off or pushed into the page flow. */
.iti__country-list {
  z-index: 10000 !important;
}

/* Prevent GF field wrappers from clipping the dropdown */
.gfield .iti--container,
.gform_wrapper .gfield,
.gform_wrapper .ginput_container,
.gform_wrapper .ginput_container_phone,
.gform_wrapper .gfield .ginput_container {
  overflow: visible !important;
}

/* Ensure the iti wrapper itself has a positioning context */
.gform_wrapper .iti {
  position: relative;
}

/* Reset the country selector button so the site's global button styling
   (orange background, etc.) doesn't bleed onto it */
.iti__selected-country {
  background-color: transparent !important;
  background: none !important;
  border: none !important;
  padding: 0 5px 0 5px !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.iti__selected-country-primary {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.iti__arrow {
  margin-left: 4px !important;
}

.iti__selected-country:hover,
.iti__selected-country:focus {
  background-color: transparent !important;
}

.iti__selected-country-primary {
  background: transparent !important;
}

/* Keep the brand orange border even when GF flags the field as invalid,
   instead of GF's default red error border */
.gform_wrapper .gfield_error input.iti__tel-input,
.gform_wrapper .gfield_error .iti input {
  border-color: #e2874a !important;
}
