/*!
 * joy-phone.css — layout do campo de telefone padrão (joymaragrillo.com.br)
 * Só posicionamento. As cores/bordas são copiadas do input hospedeiro em runtime
 * pelo joy-phone.js, para o componente se adaptar a qualquer LP.
 */

.joy-phone {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.joy-phone__picker {
  position: relative;
  flex: 0 0 auto;
}

.joy-phone__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.joy-phone__flag {
  font-size: 1.15em;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.joy-phone__code {
  font-variant-numeric: tabular-nums;
}

.joy-phone__arrow {
  width: 10px;
  height: 6px;
  flex: 0 0 auto;
  opacity: .6;
  transition: transform .18s ease;
}

.joy-phone__btn[aria-expanded="true"] .joy-phone__arrow {
  transform: rotate(180deg);
}

.joy-phone__input {
  flex: 1 1 auto;
  min-width: 0;
}

.joy-phone__drop {
  position: absolute;
  z-index: 99999;
  top: calc(100% + 6px);
  left: 0;
  width: 290px;
  max-width: 78vw;
  display: none;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}

.joy-phone__drop.is-open {
  display: block;
}

.joy-phone__search {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 10px 12px;
  font: inherit;
  background: transparent;
  color: inherit;
  outline: none;
}

.joy-phone__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.joy-phone__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: .92em;
}

.joy-phone__item:hover,
.joy-phone__item.is-active {
  background: rgba(127, 127, 127, .18);
}

.joy-phone__item-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.joy-phone__item-code {
  opacity: .65;
  font-variant-numeric: tabular-nums;
}

.joy-phone__empty {
  padding: 14px 12px;
  opacity: .6;
  font-size: .9em;
}

.joy-phone__error {
  display: none;
  margin-top: 6px;
  font-size: .82em;
  line-height: 1.35;
  color: #e0564f;
}

.joy-phone__error.is-visible {
  display: block;
}

.joy-phone.is-invalid .joy-phone__input,
.joy-phone.is-invalid .joy-phone__btn {
  border-color: #e0564f !important;
}

@media (max-width: 420px) {
  .joy-phone__drop {
    width: 260px;
  }
}
