/* SiteBid global intl-tel-input containment fixes. */
.iti {
  position: relative !important;
  width: 100%;
  max-width: 100%;
  overflow: visible !important;
}
.iti input[type="tel"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.iti__dropdown-content {
  position: absolute !important;
  z-index: 2147483000 !important;
  display: block;
  max-width: min(420px, calc(100vw - 24px)) !important;
  max-height: min(360px, calc(100vh - 32px)) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .24) !important;
}
.iti__dropdown-content.iti__hide,
.iti__dropdown-content[hidden] {
  display: none !important;
}
.iti__search-input {
  box-sizing: border-box !important;
  width: 100% !important;
}
.iti__country-list {
  display: block !important;
  max-height: min(260px, calc(100vh - 120px)) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
.iti__country { min-height: 42px; }
.iti__selected-country { min-width: 92px; }

/* Registration/auth/service modals must not clip the field-owned chooser. */
.lrrm-auth-modal,
.lrrm-auth-modal__dialog,
.lrrm-auth-modal__content,
.lrrm-modal,
.lrrm-modal__dialog,
.lrrm-modal__content,
.sb-commerce-modal,
.sb-commerce-modal__dialog,
.sb-commerce-modal__content,
[data-lrrm-auth-modal],
[data-lrrm-modal] {
  overflow: visible !important;
}

@media (max-width: 640px) {
  .iti__dropdown-content {
    left: 0 !important;
    right: auto !important;
    width: min(360px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    transform: none !important;
  }
  .iti__country-list { max-height: min(260px, calc(100vh - 160px)) !important; }
}

/* When the country chooser is open, lift the entire phone field above later
 * native selects (notably the registration role selector). Native select
 * controls can otherwise paint over an absolutely-positioned menu even when
 * the menu itself has a large z-index. */
.lrrm-phone-field-open,
.lrrm-phone-field-open .iti {
  position: relative !important;
  z-index: 2147483200 !important;
}
html.lrrm-phone-dropdown-open .lrrm-auth-select-field select,
html.lrrm-phone-dropdown-open .sb-service-auth-modal select,
html.lrrm-phone-dropdown-open .lrrm-auth-modal select {
  visibility: hidden !important;
  pointer-events: none !important;
}
html.lrrm-phone-dropdown-open .iti__dropdown-content,
html.lrrm-phone-dropdown-open .iti__country-list,
html.lrrm-phone-dropdown-open .iti__search-input {
  visibility: visible !important;
  pointer-events: auto !important;
}
