/* Country code + national number (register / auth forms) */
.auth-phone-wrap {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  align-items: center;
  width: 100%;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.auth-phone-wrap:focus-within {
  z-index: 30;
}

.auth-phone-dial {
  /* Fixed pixel width beats Bootstrap's width:100% */
  display: block !important;
  width: 105px !important;
  min-width: 105px !important;
  max-width: 105px !important;
  flex: 0 0 105px !important;
  height: 40px;
  padding: 0 1.6rem 0 0.5rem;
  font-size: 0.82rem;
  line-height: normal;
  border: 1.5px solid #dce3ea;
  border-radius: 8px;
  background-color: #fff !important;
  color: #1f2937 !important;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  cursor: pointer;
}

.auth-phone-dial option {
  color: #1f2937 !important;
  background: #fff !important;
}

.auth-phone-local {
  display: block !important;
  flex: 1 1 0% !important;
  width: 0 !important;        /* Let flex grow handle the width */
  min-width: 0 !important;
  height: 40px;
  font-size: 0.9rem;
  background: #fff !important;
  color: #1f2937 !important;
  border: 1.5px solid #dce3ea;
  border-radius: 8px;
  box-sizing: border-box;
  padding: 0 10px;
}

/* Sign-up modal */
#signUpModal .auth-phone-wrap {
  overflow: visible;
}

#signUpModal .auth-phone-dial {
  height: 38px;
  font-size: 0.8rem;
}

#signUpModal .auth-phone-local {
  height: 38px;
  padding: 0 0.65rem;
}

#signUpModal .auth-phone-dial option,
#signUpModal select option {
  color: #1f2937 !important;
  background-color: #fff !important;
}

/* Register page */
#registerPane .auth-phone-wrap {
  overflow: visible;
}

#registerPane .auth-phone-dial,
#registerPane .auth-phone-local {
  background: #fff !important;
  color: #1f2937 !important;
}

#registerPane .auth-phone-dial option {
  color: #1f2937 !important;
  background: #fff !important;
}

/* Business category select (register page) */
#registerPane .auth-select,
#registerPane select.auth-select {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 2rem 0 0.65rem;
  font-size: 0.9rem;
  background: #fff;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  color: #1f2937;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  box-sizing: border-box;
  cursor: pointer;
}

#registerPane .auth-select:required:invalid,
#registerPane .auth-select.is-placeholder {
  color: #9ca3af;
}

#registerPane .auth-select.has-value {
  color: #1f2937;
}

#registerPane .auth-select option {
  color: #1f2937;
  background: #fff;
}

@media (max-width: 480px) {
  .auth-phone-wrap {
    flex-direction: column;
  }
  .auth-phone-dial,
  #signUpModal .auth-phone-dial,
  #registerPane .auth-phone-dial {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
  }
}
