.phone-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.phone-country {
  position: relative;
  flex-shrink: 0;
}

.phone-country-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1f2937;
  border: 1px solid #374151;
  color: #fff;
  padding: 0.55rem 0.6rem;
  border-radius: 0.6rem;
  min-width: 110px;
  justify-content: space-between;
}

.phone-country-trigger:focus {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 2px;
}

.phone-flag-circle {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 1px solid #374151;
}

.phone-country-code {
  font-weight: 600;
}

.phone-country-dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 0.4rem);
  width: 260px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 0.5rem;
  z-index: 50;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.45);
}

.phone-country-search {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: #0b1220;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.phone-country-list {
  margin-top: 0.45rem;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.phone-country-option {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.5rem;
  color: #e2e8f0;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
}

.phone-country-option:hover,
.phone-country-option:focus {
  background: #1e293b;
  border-color: #334155;
}

.phone-country-name {
  flex: 1;
  font-size: 0.85rem;
}

.phone-country-number {
  flex: 1;
}

.phone-country-dropdown.hidden {
  display: none;
}

@media (max-width: 640px) {
  .phone-input-group {
    flex-direction: column;
  }

  .phone-country-trigger,
  .phone-country-dropdown {
    width: 100%;
  }
}
