.wrapper {
  color: #ffffff;
  background: transparent;
  width: 100%;
  position: relative;
}

.label {
  display: none;
}

.container {
  background: transparent !important;
  width: 100% !important;
  display: flex !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding: 0 !important;
  position: relative !important;
  align-items: center !important;
  height: 40px !important;
}

.country {
  background: transparent !important;
  border: none !important;
  border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
}

.country:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Target only container divs, not the flag image */
.country > div:not(.flag) {
  background: transparent !important;
}

.country .selected-flag {
  background: transparent !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  pointer-events: auto !important;
}

/* Show + sign when no country is selected */
.noCountry .country::after {
  content: '+' !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 18px !important;
  font-family: 'bill corporate medium', sans-serif !important;
  font-weight: 300 !important;
  position: absolute !important;
  left: 45% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

.country .flag-dropdown {
  background: transparent !important;
  border: none !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

.country .selected-flag .flag {
  scale: 1.3;
  margin: 0 auto;
  pointer-events: none !important;
}

.country .selected-flag .arrow {
  display: none !important;
}

.input {
  background: transparent !important;
  border: none !important;
  width: calc(100% - 66px) !important;
  font-family: 'bill corporate medium', sans-serif !important;
  font-weight: 300 !important;
  font-size: 16px !important;
  color: #ffffff !important;
  padding: 8px 0 8px 16px !important;
  outline: none !important;
  box-shadow: none !important;
  height: 100% !important;
  position: absolute !important;
  left: 50px !important;
  top: 0 !important;
  margin: 0 !important;
  z-index: 1 !important;
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
  font-family: 'bill corporate medium', sans-serif !important;
  font-weight: 300 !important;
  font-size: 16px !important;
  text-transform: none !important;
}

.input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.container:focus-within {
  border-bottom-color: #ffffff;
}

/* Override the library's dropdown positioning */
:global(.react-tel-input) .dropdown {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  top: 100% !important;
  transform: none !important;
  margin-top: 4px !important;
  max-height: 300px !important;
  min-width: 300px !important;
  z-index: 10000 !important;
  background: #3B4259 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

.dropdown .search {
  background: #3B4259 !important;
  border-bottom: 1px solid rgba(59, 66, 89, 0.3) !important;
  padding: 8px !important;
}

.dropdown .search input {
  background: transparent !important;
  color: #ffffff !important;
  border: none !important;
  outline: none !important;
  font-size: 14px !important;
  width: 100% !important;
}

.dropdown .search input::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

.dropdown .country {
  background: #3B4259 !important;
  color: #ffffff !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 8px !important;
  width: 100% !important;
  min-width: unset !important;
  max-width: unset !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.dropdown .country:hover {
  background: rgba(59, 66, 89, 0.95) !important;
}

/* Make the actively selected country (with checkmark/highlight) darker */
.dropdown .country.highlight {
  background: rgba(20, 25, 40, 1) !important;
}

.dropdown .country .flag {
  margin-right: 8px !important;
}

.dropdown .country .country-name {
  color: #ffffff !important;
  font-size: 14px !important;
}

.dropdown .country .dial-code {
  color: #ffffff !important;
  opacity: 0.7 !important;
  font-size: 14px !important;
  margin-left: auto !important;
}

.error {
  color: #ef4444;
  font-size: 14px;
  margin-top: 4px;
  font-family: 'bill_corporate_medium', sans-serif;
  font-weight: 300;
}

/* Ensure consistent width with other form fields */
.wrapper {
  position: relative;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .country {
    width: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
  }

  .input {
    font-size: 16px !important;
    left: 45px !important;
    width: calc(100% - 61px) !important;
  }

  .input::placeholder {
    font-size: 16px !important;
  }
}