/* Celular: código de país compacto + número más ancho */
.mc-phone {
  display: grid;
  grid-template-columns: minmax(5.75rem, 7.25rem) minmax(0, 1fr);
  gap: 0.55rem;
  align-items: stretch;
  position: relative;
}

/* El menú vive en la columna país: debe pintar por encima del input hermana */
.mc-phone__country {
  position: relative;
  min-width: 0;
  z-index: 5;
}

.mc-phone:has(.mc-phone__dial[aria-expanded="true"]) {
  z-index: 40;
}

.mc-phone:has(.mc-phone__dial[aria-expanded="true"]) .mc-phone__country {
  z-index: 50;
}

.mc-phone__dial {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 0.5rem;
  border: 1px solid #ced4da;
  background: #fff;
  padding: 0.5rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mc-phone__dial:hover {
  border-color: rgba(7, 155, 174, 0.45);
}

.mc-phone__dial:focus,
.mc-phone__dial[aria-expanded="true"] {
  outline: none;
  border-color: #079bae;
  box-shadow: 0 0 0 0.2rem rgba(7, 155, 174, 0.2);
}

.mc-phone__flag {
  width: 1.25rem;
  height: 0.94rem;
  object-fit: cover;
  border-radius: 0.15rem;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
}

.mc-phone__code {
  flex: 1;
  min-width: 0;
  text-align: left;
  letter-spacing: -0.01em;
}

.mc-phone__caret {
  font-size: 0.62rem;
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.mc-phone__dial[aria-expanded="true"] .mc-phone__caret {
  transform: rotate(180deg);
}

.mc-phone__menu {
  position: absolute;
  z-index: 1060;
  top: calc(100% + 0.35rem);
  left: 0;
  right: auto;
  width: max(15.5rem, 100%);
  min-width: 15.5rem;
  max-height: 16rem;
  overflow: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.mc-phone__option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 0.55rem;
  padding: 0.45rem 0.55rem;
  text-align: left;
  cursor: pointer;
  color: #0f172a;
  font-size: 0.86rem;
}

.mc-phone__option:hover,
.mc-phone__option:focus {
  background: rgba(7, 155, 174, 0.1);
  outline: none;
}

.mc-phone__option.is-active {
  background: rgba(7, 155, 174, 0.16);
  font-weight: 700;
}

.mc-phone__option-name {
  flex: 1;
  min-width: 0;
}

.mc-phone__option-dial {
  color: #64748b;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mc-phone__number {
  position: relative;
  min-width: 0;
  display: flex;
  z-index: 1;
}

.mc-phone__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.mc-phone__national {
  width: 100%;
  min-height: 2.75rem;
  padding-left: 2.35rem !important;
}

.mc-phone.event-reg-phone .mc-phone__national.event-reg-input {
  padding-left: 2.75rem !important;
}

/* Variante evento (inputs más altos) */
.mc-phone--lg .mc-phone__dial,
.mc-phone--lg .mc-phone__national {
  min-height: 3.1rem;
  border-radius: 0.75rem;
}

@media (max-width: 420px) {
  .mc-phone {
    grid-template-columns: minmax(5.25rem, 6.5rem) minmax(0, 1fr);
    gap: 0.45rem;
  }
  .mc-phone__menu {
    left: 0;
    right: auto;
    min-width: min(18rem, 85vw);
  }
}
