/* doc-project | commande/v1/assets/css/components/phone_country_selector.css | Style le composant partagé indicatif pays + numéro et son sélecteur graphique à vrais drapeaux PNG sur compte et panier, avec liste portée hors des cartes afin d’éviter tout clipping, états hover/focus et comportement responsive. | Expose: .phoneCountrySelector, .phoneCountrySelector__country, .phoneCountrySelector__number, .phoneCountrySelector__other, .phoneCountrySelect, .phoneCountrySelect__trigger, .phoneCountrySelect__menu, .phoneCountrySelect__option, .phoneCountrySelect__flag | Dépend de: phone_country_selector.js, styles de champs existants account et cart | Impacte: affichage stable des drapeaux, liste d’indicatifs visible au-dessus des cards et ergonomie tactile de la saisie téléphone internationale | Tables: aucune */

.phoneCountrySelector {
  display: grid;
  grid-template-columns: minmax(185px, 0.95fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: end;
}

.phoneCountrySelector__country,
.phoneCountrySelector__number {
  min-width: 0;
}

.phoneCountrySelector__country {
  position: relative;
}

.phoneCountrySelector select,
.phoneCountrySelector input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.phoneCountrySelect {
  position: relative;
  width: 100%;
}

.phoneCountrySelect__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.phoneCountrySelect__trigger:hover {
  border-color: rgba(15, 23, 42, 0.3);
  background-color: rgba(248, 250, 252, 0.96);
}

.phoneCountrySelect__trigger:focus-visible,
.phoneCountrySelect.is-open .phoneCountrySelect__trigger {
  outline: none;
  border-color: #2563eb;
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.14),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.phoneCountrySelect__current {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.phoneCountrySelect__currentText,
.phoneCountrySelect__optionText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.phoneCountrySelect__flag {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14);
}

.phoneCountrySelect__flag--empty {
  box-shadow: none;
}

.phoneCountrySelect__arrow {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin: -4px 3px 0 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.phoneCountrySelect.is-open .phoneCountrySelect__arrow {
  margin-top: 4px;
  transform: rotate(225deg);
}

.phoneCountrySelect__menu {
  position: fixed;
  z-index: 100000;
  display: none;
  width: auto;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 24px);
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.22),
    0 4px 12px rgba(15, 23, 42, 0.10);
}

.phoneCountrySelect__menu.is-open {
  display: block;
}

.phoneCountrySelect__option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.phoneCountrySelect__option:hover,
.phoneCountrySelect__option:focus-visible {
  outline: none;
  background: #f1f5f9;
}

.phoneCountrySelect__option.is-selected {
  background: #eff6ff;
  color: #1d4ed8;
}

.phoneCountrySelect__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.phoneCountrySelector__other {
  margin-top: 8px;
}

.phoneCountrySelector__other[hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  .phoneCountrySelector {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .phoneCountrySelect__trigger {
    min-height: 50px;
    font-size: 16px;
  }

  .phoneCountrySelect__menu {
    max-width: calc(100vw - 12px);
    border-radius: 14px;
  }
}