.phone-country-picker {
  display: block;
  position: relative;
  min-width: 0;
  color: var(--color-text-secondary, var(--muted));
}

.phone-country-picker::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 14px;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.phone-country-picker .phone-country-search {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding-inline-end: 32px;
  color: var(--color-text, var(--ink));
  background: var(--color-surface, var(--surface));
  font-weight: 400;
  text-overflow: ellipsis;
}

.phone-country-search:not(:focus)::placeholder { opacity: 1; }
.phone-country-search[aria-invalid="true"] { border-color: var(--color-danger, var(--red)); }

.phone-country-popup {
  position: fixed;
  inset: auto;
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-border-strong, var(--line));
  border-radius: var(--radius-md, 9px);
  background: var(--color-surface, var(--surface));
  box-shadow: var(--shadow-md, var(--shadow));
  color: var(--color-text, var(--ink));
  font-size: .875rem;
  font-weight: 400;
}

.phone-country-popup [role="listbox"] { display: block; }

.phone-country-popup [role="option"], .phone-country-empty:not(:empty) {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.phone-country-popup [role="option"] { cursor: pointer; }
.phone-country-popup [aria-selected="true"] { color: var(--color-accent-dark, var(--orange-dark)); font-weight: 700; }
.phone-country-popup :is([role="option"]:hover, [data-active]) { background: var(--color-bg, var(--paper)); }
.phone-country-popup [data-active] { box-shadow: inset 3px 0 var(--color-accent-action, var(--orange-action)); }
.phone-country-empty { color: var(--color-text-secondary, var(--muted)); }
