/* Bottom sheet: Select country — matches PRX register / dashboard gold theme */
.prx-country-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.22s ease, visibility 0.22s;
}

.prx-country-modal.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.prx-country-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.prx-country-modal__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  /* Fixed footprint (~bottom 60%): same size while searching vs full list — no jump */
  height: min(65vh, 520px);
  max-height: min(78vh, 560px);
  background: #222222;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.prx-country-modal.is-open .prx-country-modal__sheet {
  transform: translateY(0);
}

.prx-country-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  flex-shrink: 0;
  position: relative;
}

.prx-country-modal__header::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.prx-country-modal__header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.prx-country-modal__confirm {
  background: none;
  border: none;
  padding: 6px 4px;
  font-size: 15px;
  font-weight: 700;
  color: #f5c518;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

.prx-country-modal__confirm:active {
  opacity: 0.85;
}

.prx-country-modal__search-wrap {
  position: relative;
  margin: 10px 16px 8px;
  flex-shrink: 0;
}

.prx-country-modal__search-wrap input {
  width: 100%;
  box-sizing: border-box;
  background: #2a2a2a;
  border: none;
  border-radius: 8px;
  padding: 11px 40px 11px 14px;
  font-size: 14px;
  color: #fff;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  font-family: inherit;
}

.prx-country-modal__search-wrap input::placeholder {
  color: #9e9e9e;
}

.prx-country-modal__search-wrap .bi {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #9e9e9e;
  pointer-events: none;
}

.prx-country-modal__list {
  list-style: none;
  margin: 0;
  padding: 4px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #222222;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.prx-country-modal__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  position: relative;
  border-bottom: none;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
}

.prx-country-modal__item::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: #353535;
}

.prx-country-modal__item:last-child::after {
  display: none;
}

.prx-country-modal__item:active {
  background: rgba(255, 255, 255, 0.06);
}

.prx-country-modal__item:active .prx-country-modal__item-name,
.prx-country-modal__item:active .prx-country-modal__item-dial {
  color: #f5c518;
}

.prx-country-modal__item:active .prx-country-modal__check {
  background: #f5c518;
  border-color: #c9a010;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Default: white bold text; selected/hover: accent blue (reference) */
.prx-country-modal__item-name {
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  transition: color 0.16s ease;
}

.prx-country-modal__item-dial {
  font-weight: 700;
  color: #fff;
  transition: color 0.16s ease;
}

.prx-country-modal__item.is-selected .prx-country-modal__item-name,
.prx-country-modal__item.is-selected .prx-country-modal__item-dial {
  color: #f5c518;
}

@media (hover: hover) {
  .prx-country-modal__item:hover .prx-country-modal__item-name,
  .prx-country-modal__item:hover .prx-country-modal__item-dial {
    color: #f5c518;
  }
}

/* Dark grey circle + black check (default); solid blue circle + black check (selected / hover) */
.prx-country-modal__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4a4a4a;
  border: 1px solid #0d0d0d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.prx-country-modal__check .bi {
  font-size: 11px;
  font-weight: 700;
  color: #000;
}

.prx-country-modal__item.is-selected .prx-country-modal__check {
  background: #f5c518;
  border-color: #c9a010;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@media (hover: hover) {
  .prx-country-modal__item:hover .prx-country-modal__check {
    background: #f5c518;
    border-color: #c9a010;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
}

body.prx-modal-open {
  overflow: hidden;
}

/* Register: country trigger as button */
.phone-country-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 0 8px;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  flex-shrink: 0;
  align-self: stretch;
  min-height: var(--input-min-h, 48px);
  cursor: pointer;
  color: #fff;
  font-size: var(--input-font, 14px);
  font-weight: 700;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.phone-country-btn .caret {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  margin-left: -2px;
}

.phone-wa.is-clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
