.phone-input {
  display: grid;
  grid-template-columns: minmax(146px, 190px) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.phone-input__country,
.phone-input__number {
  min-width: 0;
}

.phone-input__country-select,
.phone-input__number {
  width: 100%;
}

.phone-input__country-select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(24, 38, 63, 0.54) 50%),
    linear-gradient(135deg, rgba(24, 38, 63, 0.54) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
  cursor: pointer;
}

.phone-input__number {
  letter-spacing: 0.01em;
}

html.dark .phone-input__country-select {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(224, 230, 237, 0.68) 50%),
    linear-gradient(135deg, rgba(224, 230, 237, 0.68) 50%, transparent 50%);
}

.phone-input__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;
}

@media (max-width: 640px) {
  .phone-input {
    grid-template-columns: 1fr;
  }
}
