/* Searchable country dial picker */
.dial-picker {
  position: relative;
  flex: 0 0 auto;
  min-width: 7.5rem;
}

.dial-picker__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: 46px;
  border: 1px solid #ffb028;
  border-radius: 12px;
  background: #fff;
  padding: 0 10px;
  color: #171717;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.dial-picker__trigger:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgb(255 176 40 / 20%);
}

.dial-picker__value {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dial-picker__chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: #94a3b8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dial-picker.is-open .dial-picker__chevron {
  transform: rotate(180deg);
}

.dial-picker__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgb(15 23 42 / 14%);
  overflow: hidden;
}

.dial-picker__search-wrap {
  display: block;
  padding: 10px 10px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.dial-picker__search {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: #1a1c1c;
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.dial-picker__search:focus {
  border-color: #ffb028;
  box-shadow: 0 0 0 3px rgb(255 176 40 / 18%);
}

.dial-picker__list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 260px;
  overflow: auto;
}

.dial-picker__option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: #1a1c1c;
}

.dial-picker__option:hover,
.dial-picker__option.is-active {
  background: #fff7ed;
}

.dial-picker__option.is-selected {
  background: #fff4e5;
}

.dial-picker__flag {
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.dial-picker__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.dial-picker__dial {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dial-picker__empty {
  margin: 0;
  padding: 16px 12px 18px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

.dial-picker .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Profile edit phone row */
.profile-phone .dial-picker {
  min-width: 7.5rem;
}

.profile-phone .dial-picker__trigger {
  border-color: #e8eaed;
}

.profile-phone .dial-picker__trigger:focus {
  border-color: #ffb028;
}
