/* International dial-code selector: one phone field, with a compact prefix. */
.phone-control {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 52px;
  background: #fff;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.phone-control:focus-within { border-color: #146ab4; box-shadow: 0 0 0 2px rgba(20,106,180,.13); }
.phone-control:has(input[aria-invalid="true"]) { border-color: #c34232; }
.phone-country-button {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  padding: 0 9px;
  border: 0;
  border-right: 1px solid #e1e8ef;
  border-radius: 8px 0 0 8px;
  background: #f8fafc;
  color: #1d2d3d;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}
.phone-country-button:hover { background: #eef4fa; }
.phone-country-button:focus-visible { outline: 2px solid #146ab4; outline-offset: -3px; }
.phone-selected-flag { width: 26px; height: 20px; object-fit: contain; flex-shrink: 0; }
.phone-selected-code { font-weight: 700; font-variant-numeric: tabular-nums; }
.phone-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-left: 1px;
  border-right: 1.5px solid #6f8296;
  border-bottom: 1.5px solid #6f8296;
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
  transition: transform .15s ease, border-color .15s ease;
  font-size: 0;
  line-height: 0;
  color: transparent;
}
.phone-country-button[aria-expanded="true"] .phone-chevron {
  transform: rotate(225deg) translateY(-1px);
}
.field .phone-control input[type="tel"] {
  flex: 1 1 0;
  min-width: 0;
  width: 1%;
  min-height: 50px;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 0 8px 8px 0;
  box-shadow: none;
  background: transparent;
  outline: 0;
  font-size: 16px;
}
.field .phone-control input[type="tel"][aria-invalid="true"] { border: 0; }
/* Picker is a body-level portal, not a child of modal-dialog. */
.phone-country-overlay {
  position: fixed;
  z-index: 9000;
  inset: 0;
  background: rgba(6, 25, 43, .28);
}
.phone-country-panel {
  position: fixed;
  left: 12px;
  top: 12px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d6e0e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(10, 25, 39, .24);
}
.phone-country-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 12px 14px 6px;
  color: #163d64;
  font-size: 17px;
}
.phone-country-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #34495e;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.phone-country-search {
  flex-shrink: 0;
  min-height: 44px;
  margin: 4px 12px 8px;
  padding: 10px 12px;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background: #fff;
  color: #1d2d3d;
  outline-offset: 1px;
  font: inherit;
  font-size: 16px;
}
.phone-country-results { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.phone-country-option {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid #f1f3f6;
  background: white;
  color: #253a4e;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.phone-country-option:hover, .phone-country-option:focus-visible { background: #eff6fd; }
.phone-country-option[aria-selected="true"] { background: #ecf5ff; }
.phone-country-option img { width: 28px; height: 21px; flex: 0 0 auto; object-fit: contain; }
.phone-country-name { flex: 1 1 auto; min-width: 0; }
.phone-country-option-code { color: #607586; white-space: nowrap; font-variant-numeric: tabular-nums; }
.phone-country-empty { padding: 20px 14px; text-align: center; color: #66798a; }
@media (max-width: 620px) {
  .phone-country-overlay { display: flex; align-items: center; justify-content: center; padding: 10px; }
  .phone-country-panel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 440px;
    height: min(490px, calc(100dvh - 20px));
    max-height: calc(100dvh - 20px);
  }
  .phone-country-button { min-width: 90px; padding: 0 7px; gap: 5px; }
  .field .phone-control input[type="tel"] { padding-left: 10px; padding-right: 8px; }
}
