.phone-country-trigger {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 50px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: start;
}

.phone-country-dialog {
  box-sizing: border-box;
  width: min(calc(100% - 24px), 32rem);
  max-height: min(75vh, 38rem);
  max-height: min(75dvh, 38rem);
  margin: auto;
  padding: 20px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.phone-country-dialog[open] { display: flex; flex-direction: column; gap: 8px; }
.phone-country-dialog::backdrop { background: rgb(23 25 29 / 50%); }
.phone-country-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phone-country-heading h2 { margin: 0; font: 400 clamp(1.5rem, 5.5vw, 2.05rem)/1.1 var(--display); }
.phone-country-heading button,
.phone-country-results button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.phone-country-heading button { flex: none; padding: 6px 4px; text-decoration: underline; text-underline-offset: .17em; }
.phone-country-status { font-size: .9rem; }
.phone-country-status:empty { margin: 0; }
.phone-country-results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.phone-country-results h3 { margin: 12px 0 3px; font: 700 .8rem/1.35 var(--body); }
.phone-country-results ul { margin: 0; padding: 0; list-style: none; }
.phone-country-results li { border-bottom: 1px solid var(--line, var(--rule)); }
.phone-country-results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 4px;
  text-align: start;
}

.phone-country-results button:focus-visible { outline-offset: -2px; }
.phone-country-results button[aria-current="true"] { font-weight: 700; }
.phone-country-results button span { flex: none; }
.phone-country-results button:hover { text-decoration: underline; text-underline-offset: .17em; }
