/* Country dial-code picker — see assets/js/country-phone-picker.js
   Kept generic (flex row, inherits form-control sizing) so it drops into
   both the Metronic admin theme and the portal's own styling without a
   theme-specific stylesheet. Portal-specific colour touches live in
   portal/assets/portal.css under .portal-field .ecc-phone-group. */

.ecc-phone-group {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.ecc-phone-group .ecc-country-select {
  flex: 0 0 auto;
  width: auto;
  max-width: 160px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-left: 0;
  font-size: 0.92rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  background-position: left 0.5rem center;
}

.ecc-phone-group .ecc-phone-input {
  flex: 1 1 auto;
  min-width: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  direction: ltr;
  text-align: left;
}

/* RTL pages (this app is ar/RTL throughout): the select visually reads as
   the leading segment, so flip the row instead of fighting logical borders. */
[dir="rtl"] .ecc-phone-group,
html[lang="ar"] .ecc-phone-group {
  flex-direction: row-reverse;
}

[dir="rtl"] .ecc-phone-group .ecc-country-select,
html[lang="ar"] .ecc-phone-group .ecc-country-select {
  border-top-right-radius: 0.42rem;
  border-bottom-right-radius: 0.42rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 1px solid inherit;
  border-right: 0;
}

[dir="rtl"] .ecc-phone-group .ecc-phone-input,
html[lang="ar"] .ecc-phone-group .ecc-phone-input {
  border-top-left-radius: 0.42rem;
  border-bottom-left-radius: 0.42rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
