/* Shared country selector and local phone-number input. */
.bz-phone-helper-text {
  color: var(--text-muted, var(--mud-palette-text-secondary));
}

.bz-phone-number-input {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.bz-phone-country-selector {
  position: relative;
  flex: 0 0 174px;
  width: 174px;
  min-width: 174px;
  margin: 0;
}

.bz-phone-number-input > .bz-phone-local-input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

.bz-phone-control {
  width: 100%;
  margin: 0;
  font-family: Poppins, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: .00938em;
}

.bz-phone-control .mud-input-control-input-container {
  margin-top: 0;
}

.bz-phone-control .mud-input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin: 0;
  border: 1px solid var(--mud-palette-lines-inputs, rgba(0, 0, 0, .23));
  border-radius: 11px;
  background: var(--mud-palette-surface, #fff);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.bz-phone-control:focus-within .mud-input {
  border-color: var(--mud-palette-primary, #3f51b5);
}

.bz-phone-control .mud-input::before,
.bz-phone-control .mud-input::after {
  display: none !important;
}

.bz-phone-control .mud-input-slot {
  min-width: 0;
  height: 46px;
  min-height: 46px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: normal;
}

.bz-phone-control input {
  box-sizing: border-box;
  height: 46px;
  min-height: 46px;
  padding-top: 0 !important;
  padding-right: 14px !important;
  padding-bottom: 0 !important;
  padding-left: 14px !important;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 46px;
}

.bz-phone-control input::placeholder {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.bz-phone-control .mud-input-adornment {
  height: 46px;
  margin: 0;
  padding: 0 14px;
}

.bz-phone-control .mud-input-adornment .mud-icon-root {
  color: var(--auth-accent, var(--mud-palette-primary, #3f51b5));
  font-size: 19px;
}

.bz-phone-country-input .mud-input-control,
.bz-phone-country-input .mud-input-control-input-container,
.bz-phone-country-input .mud-input,
.bz-phone-country-input .mud-input-slot {
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin: 0;
}

.bz-phone-country-input .mud-input,
.bz-phone-country-input .mud-input-slot {
  display: flex;
  align-items: center;
}

.bz-phone-country-input input.mud-select-input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  padding-top: 0 !important;
  padding-right: 38px !important;
  padding-bottom: 0 !important;
  line-height: 46px;
  white-space: nowrap;
  text-overflow: clip;
}

.bz-phone-country-selector-arrow {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  box-sizing: border-box;
  width: 38px;
  min-width: 38px;
  height: 46px;
  margin: 0;
  border-radius: 0 11px 11px 0;
  color: var(--auth-accent, var(--mud-palette-primary, #3f51b5));
}

.mud-popover.bz-phone-country-popover {
  width: 520px !important;
  min-width: 520px !important;
  max-width: min(560px, calc(100vw - 32px)) !important;
  font-family: Poppins, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: .00938em;
}

.mud-popover.bz-phone-country-popover .mud-paper,
.mud-popover.bz-phone-country-popover .mud-list {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.mud-popover.bz-phone-country-popover .mud-paper {
  max-height: 360px;
  padding: 0;
}

.mud-popover.bz-phone-country-popover .mud-list-item {
  min-height: 36px;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.mud-popover.bz-phone-country-popover .bz-phone-country-option {
  display: grid;
  grid-template-columns: 88px 12px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  column-gap: 6px;
  font: inherit;
  line-height: 1.5;
  white-space: nowrap;
}

.bz-phone-country-option-code,
.bz-phone-country-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bz-phone-country-option-code {
  font-variant-numeric: tabular-nums;
}

.bz-phone-country-option-separator {
  text-align: center;
}

@media (max-width: 767px) {
  .bz-phone-country-selector {
    flex-basis: 120px;
    width: 120px;
    min-width: 120px;
  }

  .mud-popover.bz-phone-country-popover {
    width: calc(100vw - 32px) !important;
    min-width: calc(100vw - 32px) !important;
  }
}

@media (max-width: 400px) {
  .bz-phone-number-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .bz-phone-country-selector {
    width: 100%;
    min-width: 0;
  }
}
