.phone-input {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
  align-items: center;
}

.phone-country-select,
.phone-number-input {
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 11px 13px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 14px;
  color: #fff;
  background: rgba(8, 8, 18, 0.72);
  font: inherit;
  font-size: 16px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.phone-country-select {
  padding-right: 28px;
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(216, 180, 254, 0.9) 50%),
    linear-gradient(135deg, rgba(216, 180, 254, 0.9) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.phone-country-select option {
  color: #0f172a;
  background: #fff;
}

.phone-number-input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.phone-country-select:focus,
.phone-number-input:focus,
.phone-country-select:focus-visible,
.phone-number-input:focus-visible {
  outline: none;
  border-color: rgba(168, 85, 247, 0.9);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.phone-input.has-error .phone-country-select,
.phone-input.has-error .phone-number-input {
  border-color: rgba(248, 113, 113, 0.72);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14);
}

.field-error,
.phone-field-error {
  margin: 6px 0 0;
  color: #fca5a5;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.static-form .phone-field-label,
.chat-lead-form .phone-field-label {
  display: grid;
  gap: 8px;
}

.static-form--premium .phone-country-select,
.static-form--premium .phone-number-input,
.chat-lead-form .phone-country-select,
.chat-lead-form .phone-number-input {
  min-height: 46px;
  height: auto;
}

.chat-lead-form .phone-input {
  grid-template-columns: 108px 1fr;
}

.chat-lead-form .label-optional {
  color: var(--muted);
  font-weight: 600;
}

.chat-lead-form .phone-country-select,
.chat-lead-form .phone-number-input {
  min-height: 44px;
  padding: 12px 13px;
  border-color: rgba(183, 140, 255, 0.18);
  background: rgba(3, 7, 18, 0.66);
}

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

  .phone-country-select,
  .phone-number-input {
    height: 48px;
    min-height: 48px;
  }
}
