/* destination: /home/ale/p2a/static/css/tel.css */
/* Phone dropdown styling for contact number field */

/* 1) containerul trebuie să fie relativ ca dropdown-ul să se poată ancora sub el */
#phone-row {
  position: relative;
}

/* 2) shell-ul rămâne rotunjit, dar îl tăiem jos când se deschide dropdown-ul */
#phone-row.dropdown-open #phone-shell {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* 3) dropdown-ul propriu-zis */
#phone-country-dropdown {
  position: absolute;
  inset: 100% 0 auto 0;           /* sub field, full width */
  width: 100%;
  max-height: 16rem;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 0 0 .75rem .75rem;
  z-index: 50;
  display: none;
}

/* 4) arată dropdown-ul când JS pune clasa */
#phone-country-dropdown.open,
#phone-row.dropdown-open #phone-country-dropdown {
  display: block;
}

/* 5) opțiunile din listă (în multe locuri JS-ul tău generează <div> sau <button>) */
#phone-country-dropdown .phone-option,
#phone-country-dropdown button,
#phone-country-dropdown div[data-dial] {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .45rem .75rem;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: .85rem;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}

#phone-country-dropdown .phone-option:hover,
#phone-country-dropdown button:hover,
#phone-country-dropdown div[data-dial]:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* 6) scrollbar mic, ca la panel-urile tale */
#phone-country-dropdown::-webkit-scrollbar {
  width: 6px;
}
#phone-country-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
}

/* 7) forțăm input-ul să nu devină albicios când autocomplete lovește */
#phone-shell input[type="tel"],
#phone-shell input[type="text"] {
  background: transparent !important;
  -webkit-text-fill-color: #fff;
}

#phone-shell input[type="tel"]:-webkit-autofill,
#phone-shell input[type="tel"]:-webkit-autofill:focus,
#phone-shell input[type="tel"]:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 30px rgba(15,23,42,0) inset !important;
  background: transparent !important;
  -webkit-text-fill-color: #fff !important;
}
