/* International phone — full-width stacked country + number */
.ecn-phone {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ecn-phone__shell {
  display: grid;
  gap: .5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ecn-phone__country,
.ecn-phone__field {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: #FFFFFF;
  border: 1px solid rgba(94, 122, 104, .35);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.ecn-phone__country:focus,
.ecn-phone__field:focus-within {
  border-color: rgba(94, 122, 104, .8);
  box-shadow: 0 0 0 1px rgba(94, 122, 104, .18);
}

.ecn-phone__country {
  color: #2A2926;
  font: inherit;
  font-size: .9rem;
  line-height: 1.3;
  padding: .8rem 2rem .8rem .9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-color: #FFFFFF;
  background-image:
    linear-gradient(45deg, transparent 50%, #5E7A68 50%),
    linear-gradient(135deg, #5E7A68 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 8px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.ecn-phone__country option {
  background: #FFFFFF;
  color: #2A2926;
}

.ecn-phone__field {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 3rem;
  padding: 0;
  overflow: hidden;
}

.ecn-phone__dial {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 .7rem;
  font-size: .88rem;
  font-weight: 500;
  color: #5E7A68;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  user-select: none;
  pointer-events: none;
  background: rgba(94, 122, 104, .1);
  border-right: 1px solid rgba(94, 122, 104, .28);
  line-height: 1;
}

.ecn-phone__national {
  flex: 1 1 auto;
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #2A2926;
  font: inherit;
  font-size: .95rem;
  letter-spacing: .03em;
  padding: .8rem .9rem !important;
  margin: 0 !important;
  outline: none;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .ecn-phone__country {
    font-size: 16px;
    padding: .85rem 2.1rem .85rem .9rem;
    line-height: 1.35;
  }
  .ecn-phone__national {
    font-size: 16px !important; /* avoid iOS focus zoom */
    padding: .85rem .9rem !important;
  }
  .ecn-phone__field { min-height: 3.15rem; }
  .ecn-phone__dial {
    font-size: .9rem;
    padding: 0 .75rem;
  }
  .ecn-phone__hint {
    font-size: .74rem;
    line-height: 1.5;
  }
}
.ecn-phone__national::placeholder {
  color: rgba(154, 145, 130, .5);
  letter-spacing: .02em;
}

.ecn-phone__hint {
  margin: .4rem 0 0;
  font-size: .72rem;
  line-height: 1.45;
  color: #7A7168;
  font-weight: 300;
}
.ecn-phone__hint strong {
  color: #C4A574;
  font-weight: 500;
}
.ecn-phone__fix { color: #5E7A68; }

.ecn-phone__error {
  margin: .35rem 0 0;
  font-size: .75rem;
  line-height: 1.4;
  color: #fda4af;
}

.ecn-phone.is-invalid .ecn-phone__country,
.ecn-phone.is-invalid .ecn-phone__field {
  border-color: rgba(253, 164, 175, .55);
  box-shadow: none;
}

/* Compact chat */
.ecn-phone--compact .ecn-phone__shell { gap: .35rem; }
.ecn-phone--compact .ecn-phone__country,
.ecn-phone--compact .ecn-phone__field {
  border-radius: 8px;
}
.ecn-phone--compact .ecn-phone__country {
  font-size: .78rem;
  padding: .55rem 1.6rem .55rem .7rem;
}
.ecn-phone--compact .ecn-phone__field { min-height: 2.35rem; }
.ecn-phone--compact .ecn-phone__dial {
  font-size: .75rem;
  padding: 0 .45rem;
}
.ecn-phone--compact .ecn-phone__national {
  font-size: .82rem;
  padding: .55rem .65rem !important;
}
.ecn-phone--compact .ecn-phone__hint,
.ecn-phone--compact .ecn-phone__error {
  display: none; /* keep chat panel short */
}

/* Kill parent form rules that shrink nested phone inputs */
.ws-form .ecn-phone,
.contact-form .ecn-phone {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
}
.ws-form .ecn-phone input,
.ws-form .ecn-phone select,
.contact-form .ecn-phone input,
.contact-form .ecn-phone select {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0 !important;
}
.ws-form .ecn-phone__national,
.contact-form .ecn-phone__national {
  width: 100% !important;
  padding: .8rem .9rem !important;
  border: 0 !important;
  background: transparent !important;
}
