.phone-group {
  display: flex;
  gap: 0;
  width: 100%;
  margin: 0.125rem 0;
  box-sizing: border-box;
}

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

.picker-btn {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0.625rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s;
  height: 100%;
  min-width: 90px;
  white-space: nowrap;
}

.picker-btn:hover {
  border-color: #98a2b3;
}

.picker-btn:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
  z-index: 1;
}

.flag-code {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.flag-code .fi {
  width: 1.4em;
  height: 1.05em;
  border-radius: 1px;
  box-shadow: 0 0 1px rgba(0,0,0,0.2);
}

.dial-code {
  font-weight: 500;
  color: #344054;
  font-size: 0.85rem;
}

.picker-btn .arrow {
  font-size: 0.6rem;
  color: #98a2b3;
  transition: transform 0.2s;
  line-height: 1;
}

.picker-btn[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 300px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 1px solid #e4e7ec;
  z-index: 1000;
  overflow: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  visibility: hidden;
  opacity: 0;
}

.dropdown-menu.open {
  visibility: visible;
  opacity: 1;
}

.search-box {
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid #f0f1f3;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 0.8rem;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}

.search-box input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

.countries-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.1s;
}

.country-item:hover {
  background: #f5f6f8;
}

.country-item .fi {
  width: 1.4em;
  height: 1.05em;
  border-radius: 1px;
  box-shadow: 0 0 1px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.country-name {
  flex: 1;
  color: #1d2939;
}

.country-dial {
  font-family: monospace;
  font-size: 0.75rem;
  color: #475467;
  background: #f2f4f7;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.phone-input-field {
  flex: 1;
}

.phone-input-field input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #d0d5dd;
  border-radius: 0 8px 8px 0;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.phone-input-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
  z-index: 1;
  position: relative;
}

@media (max-width: 480px) {
  .phone-group {
    flex-wrap: wrap;
  }
  .country-picker {
    width: 100%;
  }
  .picker-btn {
    border-radius: 8px;
    border-right: 1px solid #d0d5dd;
    width: 100%;
    justify-content: center;
  }
  .phone-input-field input {
    border-radius: 8px;
  }
}
