/* Blue Level checkout phone UI - admin-only staging CSS v0.1.3: local stacking fix */
body.bl-phone-adapter-active .wc-block-components-text-input:has(> #billing-phone),
body.bl-phone-adapter-active .wc-block-components-text-input:has(> #shipping-phone) {
  position: relative !important;
  /* Confine the country control below the sticky site header. */
  isolation: isolate !important;
  z-index: 0 !important;
}

body.bl-phone-adapter-active .wc-block-components-text-input:has(> #billing-phone) > #billing-phone,
body.bl-phone-adapter-active .wc-block-components-text-input:has(> #shipping-phone) > #shipping-phone {
  padding-left: var(--bl-phone-offset, 84px) !important;
}
body.bl-phone-adapter-active .wc-block-components-text-input:has(> #billing-phone) > label,
body.bl-phone-adapter-active .wc-block-components-text-input:has(> #shipping-phone) > label {
  left: var(--bl-phone-offset, 84px) !important;
}
.bl-phone-country-overlay {
  position: absolute;
  top: 50%;
  left: 7px;
  transform: translateY(-50%);
  width: 142px;
  height: 32px;
  z-index: 1;
  pointer-events: none;
  font-size: 13px;
  box-sizing: border-box;
}
.bl-phone-country-overlay .iti {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.bl-phone-country-overlay input.bl-phone-selector-host {
  opacity: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none !important;
  width: 100% !important;
  height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
}
.bl-phone-country-overlay .iti__country-container,
.bl-phone-country-overlay .iti__selected-country,
.bl-phone-country-overlay .iti__selected-country-primary,
.bl-phone-country-overlay .iti__dropdown-content,
.bl-phone-country-overlay .iti__search-input {
  pointer-events: auto;
}
.bl-phone-country-overlay .iti__selected-country {
  min-height: 28px;
  border-right: 1px solid #d2d2d2;
  padding-right: 8px;
}
.bl-phone-country-overlay .iti__selected-dial-code {
  color: inherit;
  font-size: 13px;
}
.bl-phone-country-overlay .iti__selected-country-primary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
/* Mobile inherits the same local stacking context (no global z-index). */

/* v0.1.4: make the OPEN country list readable; the closed flag/dial control is unchanged.
 * intl-tel-input v29 defaults to matching the dropdown width to its host input.
 * Our selector host is intentionally narrow, so override that computed/inline width.
 * The popup is portalled to document.body by the JS adapter.
 */
body.bl-phone-adapter-active .iti__dropdown-content:not(.iti--fullscreen-popup) {
  width: min(300px, calc(100vw - 48px)) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 48px) !important;
  box-sizing: border-box;
}
body.bl-phone-adapter-active .iti__dropdown-content:not(.iti--fullscreen-popup) .iti__search-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
body.bl-phone-adapter-active .iti__dropdown-content:not(.iti--fullscreen-popup) .iti__country-list {
  overflow-x: hidden;
}
body.bl-phone-adapter-active .iti__dropdown-content:not(.iti--fullscreen-popup) .iti__country {
  white-space: nowrap;
}
body.bl-phone-adapter-active .iti__dropdown-content:not(.iti--fullscreen-popup) .iti__country-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.bl-phone-adapter-active .iti__dropdown-content:not(.iti--fullscreen-popup) .iti__dial-code {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 560px) {
  body.bl-phone-adapter-active .iti__dropdown-content:not(.iti--fullscreen-popup) {
    width: min(340px, calc(100vw - 48px)) !important;
  }
}

/* BL PHONE v0.1.5 - Actual country selector width */
body.bl-phone-adapter-active .iti__country-selector {
    width: min(300px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 0 !important;
    box-sizing: border-box;
    pointer-events: auto;
}

body.bl-phone-adapter-active .iti__country-selector .iti__search-input-wrapper,
body.bl-phone-adapter-active .iti__country-selector .iti__country-list {
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
}

body.bl-phone-adapter-active .iti__country-selector .iti__country {
    white-space: nowrap;
}

@media (max-width: 560px) {
    body.bl-phone-adapter-active .iti__country-selector {
        width: min(340px, calc(100vw - 32px)) !important;
    }
}
/* END BL PHONE v0.1.5 */
