/* UONO phone field with a country / calling-code picker (phone-input.js). Shared by ai.uono.ru and game.uono.ru:
   landing/assets/phone-input.css and game/assets/phone-input.css are byte-identical copies. Each site matches the
   button to its own fields and sets the --pi-* colours on .phone-input. The popup is position:fixed (placed by
   the script), so a scrolling dialog never clips it. Selectors in the popup are three classes deep to stay above
   the sites' generic ".field input" rules. */
.phone-input {
  --pi-bg: #fff;
  --pi-ink: #101b2d;
  --pi-muted: #4f5b70;
  --pi-line: #d5dee6;
  --pi-active: #eef4f8;
  --pi-accent: #1f6fd6;
  --pi-radius: 12px;
  position: relative; display: flex; align-items: stretch; min-width: 0;
}
.phone-input > input { flex: 1 1 auto; min-width: 0; }

.phone-input__country {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; margin: 0; padding: 0 10px 0 2px;
  border: 0; background: transparent; color: inherit; font: inherit; line-height: 1; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.phone-input__country:disabled { cursor: default; }
.phone-input__code { font-variant-numeric: tabular-nums; }
.phone-input__chev { flex: none; transition: transform .15s ease; }
.phone-input__country[aria-expanded="true"] .phone-input__chev { transform: rotate(180deg); }

.phone-input__flag {
  flex: none; display: inline-block; min-width: 1.4em; text-align: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 20px; line-height: 1;
}
/* No emoji flags (Windows): a small ISO badge instead of two loose letters */
.phone-input__flag--text {
  min-width: 28px; padding: 4px 3px; border-radius: 4px; background: var(--pi-active); color: var(--pi-ink);
  font: 700 11px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .04em;
}

.phone-input .phone-input__popup {
  position: fixed; z-index: 1000; top: 0; left: 0; box-sizing: border-box;
  display: flex; flex-direction: column; width: 320px; max-height: 360px; margin: 0; padding: 8px; overflow: hidden;
  background: var(--pi-bg); color: var(--pi-ink); border: 1px solid var(--pi-line); border-radius: var(--pi-radius);
  box-shadow: 0 12px 32px rgba(16, 27, 45, .22);
  font-weight: 400; font-size: 16px; line-height: 1.3; text-align: left; text-transform: none; letter-spacing: normal;
  user-select: none; -webkit-user-select: none;
}
.phone-input .phone-input__popup[hidden] { display: none; }
.phone-input .phone-input__popup .phone-input__search {
  flex: none; box-sizing: border-box; width: 100%; min-height: 44px; margin: 0 0 6px; padding: 0 12px;
  border: 1px solid var(--pi-line); border-radius: 8px; background: var(--pi-bg); color: var(--pi-ink); box-shadow: none;
  font: inherit; font-size: 16px; /* 16px: iOS does not zoom in */
  outline: none; -webkit-appearance: none; appearance: none; user-select: text; -webkit-user-select: text;
}
.phone-input .phone-input__popup .phone-input__search:focus-visible { border-color: var(--pi-accent); box-shadow: 0 0 0 1px var(--pi-accent); }
.phone-input .phone-input__popup .phone-input__search::placeholder { color: var(--pi-muted); opacity: 1; }
.phone-input .phone-input__popup .phone-input__list {
  position: relative; flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; list-style: none;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; outline: none;
}
.phone-input .phone-input__popup .phone-input__list[hidden] { display: none; }
.phone-input .phone-input__option {
  display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 6px 10px;
  border-radius: 8px; cursor: pointer;
}
.phone-input .phone-input__option[hidden] { display: none; }
.phone-input .phone-input__option--pinned { position: relative; margin-bottom: 7px; }
.phone-input .phone-input__option--pinned::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -4px; height: 1px; background: var(--pi-line);
}
.phone-input .phone-input__option.is-active { background: var(--pi-active); }
.phone-input .phone-input__list:focus .phone-input__option.is-active,
.phone-input .phone-input__search:focus ~ .phone-input__list .phone-input__option.is-active { box-shadow: inset 0 0 0 2px var(--pi-accent); }
.phone-input .phone-input__option[aria-selected="true"] { font-weight: 700; }
.phone-input .phone-input__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.phone-input .phone-input__dial { flex: none; color: var(--pi-muted); font-variant-numeric: tabular-nums; }
.phone-input .phone-input__empty { margin: 8px 10px; color: var(--pi-muted); }
.phone-input .phone-input__empty[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .phone-input__chev { transition: none; }
}
