/* 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: rgba(255, 252, 247, 0.72);
  border: 1px solid rgba(93, 150, 127, 0.35);
  border-radius: 0.35rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.ecn-phone__country:focus,
.ecn-phone__field:focus-within {
  border-color: rgba(47, 107, 80, 0.65);
  box-shadow: 0 0 0 2px rgba(205, 229, 219, 0.7);
}

.ecn-phone__country {
  color: #1F2428;
  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%, #1F6247 50%),
    linear-gradient(135deg, #1F6247 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 8px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* End-to-end / Create / trade / NDA: Country select is the single country UI.
   Phone keeps dial + national only (synced from Country). */
.ecn-phone--country-synced .ecn-phone__country {
  display: none !important;
}
.ecn-phone--country-synced .ecn-phone__shell {
  grid-template-columns: 1fr;
}
.ecn-phone__country option {
  background: #FFFFFF;
  color: #1F2428;
}

.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: #1F6247;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  user-select: none;
  pointer-events: none;
  background: rgba(31, 98, 71, .1);
  border-right: 1px solid rgba(31, 98, 71, .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: #1F2428;
  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: .8rem;
    padding: .55rem 2rem .55rem .65rem;
    line-height: 1.35;
  }
  .ecn-phone__national {
    font-size: .8rem !important;
    padding: .55rem .65rem !important;
  }
  .ecn-phone__field { min-height: 2.55rem; }
  .ecn-phone__dial {
    font-size: .78rem;
    padding: 0 .65rem;
  }
  .ecn-phone__hint {
    font-size: .68rem;
    line-height: 1.45;
  }
}
.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: #6B6259;
  font-weight: 300;
}
.ecn-phone__hint strong {
  color: #7A5F30;
  font-weight: 500;
}
.ecn-phone__fix { color: #1F6247; }

.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;
}
