/* Phone Input Component Styles */

.phone-input {
  position: relative;
  display: flex;
  gap: 0;
  width: 100%;
}

.phone-input__country-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 110px;
}

.phone-input__country-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.phone-input__flag {
  font-size: 20px;
  line-height: 1;
}

.phone-input__code {
  font-size: 14px;
  font-weight: 500;
}

.phone-input__chevron {
  opacity: 0.6;
  transition: transform 0.2s;
}

.phone-input__country-btn:hover .phone-input__chevron {
  opacity: 1;
}

.phone-input__field {
  flex: 1;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0 8px 8px 0;
  color: #1f2937;
  font-size: 15px;
  transition: all 0.2s;
  outline: none;
}

.phone-input__field:focus {
  border-color: #4B6BFF;
  box-shadow: 0 0 0 3px rgba(75, 107, 255, 0.1);
}

.phone-input__field::placeholder {
  color: #9ca3af;
}

.phone-input__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.phone-input__search {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.phone-input__search-field {
  width: 100%;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #1f2937;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.phone-input__search-field:focus {
  border-color: #9ca3af;
  background: #ffffff;
}

.phone-input__search-field::placeholder {
  color: #9ca3af;
}

.phone-input__list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.phone-input__list::-webkit-scrollbar {
  width: 8px;
}

.phone-input__list::-webkit-scrollbar-track {
  background: transparent;
}

.phone-input__list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.phone-input__list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.phone-input__country-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #1f2937;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.phone-input__country-option:hover {
  background: #f3f4f6;
}

.phone-input__country-option.is-selected {
  background: rgba(75, 107, 255, 0.1);
  color: #4B6BFF;
}

.phone-input__option-flag {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.phone-input__option-name {
  flex: 1;
  font-size: 14px;
}

.phone-input__option-code {
  font-size: 13px;
  opacity: 0.7;
  font-weight: 500;
}

/* Form hint for phone input */
.pixel-form-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

.pixel-form-hint i {
  font-size: 12px;
  opacity: 0.8;
}

/* pixel-auth-page uses light theme by default, so no overrides needed */

/* Responsive */
@media (max-width: 640px) {
  .phone-input__dropdown {
    max-width: 100%;
  }

  .phone-input__country-btn {
    min-width: 90px;
  }

  .phone-input__code {
    font-size: 13px;
  }
}
