/* Country Picker Styles */

/* Separate Country Picker as Label */
.country-picker-label {
  font-family: var(--e-global-typography-primary-font-family), serif;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--e-global-color-aa5884c) !important;
  display: inline-block;
  margin-right: 10px;
  cursor: pointer;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--e-global-color-primary, #28373E) !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 60px;
  text-align: center;
  position: relative;
  height: 59px;
}

.phone-input-inline-container .country-picker-label{
  flex: none;
}

.phone-input-inline-container .country-dropdown {
  left: auto;
  top: 100%;
  margin-top: 2px;
}

.country-picker-flag {
  font-size: 16px;
  margin-right: 5px;
}

.country-picker-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--e-global-color-aa5884c);
}

/* Country dropdown */
.country-dropdown {
  position: absolute;
  background: #515d63;
  border: 2px solid var(--e-global-color-primary, #28373E) !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 10100;
  min-width: 250px;
  top: 100%;
  left: 0;
  margin-top: 2px;
  color: var(--e-global-color-aa5884c);
}

.country-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.country-item:hover {
  background: #373e42;
}

.country-item.selected {
  background: #007cba;
  color: white;
}

/* Phone input container with country picker */
.phone-input-container {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  position: relative;
}

.phone-input-container .country-picker-label {
  flex-shrink: 0;
  margin-bottom: 0;
}

.phone-input-container .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Phone input validation styling */
.phone-input.invalid-phone {
  border: 2px solid #e74c3c !important;
  background-color: #fdf2f2 !important;
  color: var(--e-global-color-primary) !important;
}

.phone-error {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  font-weight: 500;
}

/* Responsive adjustments for phone input */
@media (max-width: 768px) {
  .iti input {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .phone-input-container {
    flex-direction: column;
  }

  .phone-input-container .country-picker-label {
    margin-bottom: 6px;
    margin-top: 0;
    align-self: flex-start;
  }
}

/* Phone Input Country Picker Styles */
.country-picker-flag {
  margin-right: 5px;
  font-size: 16px;
}

.country-dropdown .country-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.country-dropdown .country-item span:first-child {
  margin-right: 8px;
}

.country-dropdown .country-item span:last-child {
  margin-left: auto;
  color: var(--e-global-color-aa5884c);
}

/* Separator in dropdown */
.country-dropdown .dropdown-separator {
  height: 1px;
  background: #eee;
}