/* Scoped bridge: no changes to the Appgrade theme files. Validate visually in staging. */
.appgrade-phone-wrap { display:block; width:100%; }
.appgrade-phone-wrap .appgrade-phone-widget { display:flex; width:100%; gap:1rem; direction:ltr; align-items:stretch; }
.appgrade-phone-wrap .iti__country-container { position:static; flex:0 0 4.5rem; padding:0; }
.appgrade-phone-wrap .iti__selected-country { width:100%; min-height:2.5rem; border:1px solid #d9dede; border-radius:.5rem; padding:0 .6rem; justify-content:center; color:inherit; }
.appgrade-phone-wrap .iti__selected-country-primary { padding:0; }
.appgrade-phone-wrap .appgrade-phone-widget input.iti__tel-input { flex:1; min-width:0; width:0; padding-inline:1rem !important; direction:ltr; text-align:left; }
.appgrade-phone-wrap .iti__dropdown-content { z-index:100; }
.appgrade-phone-wrap .iti__search-input { min-height:2.5rem; }
@media(max-width:576px) { .appgrade-phone-wrap .appgrade-phone-widget { gap:.5rem; } }

/* The demo form reserves a 120px column for its absolute-positioned labels.
   Keep the country selector in the control column and override legacy inputs
   that are positioned absolutely by .frow input. Registration forms do not
   use .frow.phone, so their accepted field layout is unaffected. */
.frow.phone { border-bottom:1px solid rgba(3,34,34,.2); }
.frow.phone .appgrade-phone-wrap { position:relative; padding:0; height:80px; }
.frow.phone .appgrade-phone-widget { width:calc(100% - 120px); margin-left:120px; height:80px; gap:20px; align-items:center; }
.frow.phone .appgrade-phone-widget .iti__country-container { flex-basis:90px; height:44px; }
.frow.phone .appgrade-phone-widget .iti__selected-country { height:44px; min-height:44px; max-height:44px; border:1px solid #979797; border-radius:24px; }
.frow.phone .appgrade-phone-widget input.iti__tel-input { position:static; left:auto; right:auto; height:80px; min-height:80px; max-height:80px; line-height:80px; margin:0 !important; padding-inline:0 !important; border-bottom:0; }
.frow.phone .appgrade-phone-widget input.iti__search-input { position:static; left:auto; right:auto; width:100%; min-width:0; height:40px; min-height:40px; max-height:none; line-height:normal; margin:0 !important; padding:.5rem !important; border:1px solid #d9dede; }
@media(max-width:576px) {
  .frow.phone { height:84px; min-height:84px; max-height:84px; }
  .frow.phone .appgrade-phone-wrap { height:54px; }
  .frow.phone .appgrade-phone-widget { width:100%; margin-left:0; height:54px; gap:16px; }
  .frow.phone .appgrade-phone-widget .iti__country-container { flex-basis:84px; height:36px; }
  .frow.phone .appgrade-phone-widget .iti__selected-country { height:36px; min-height:36px; max-height:36px; }
  .frow.phone .appgrade-phone-widget input.iti__tel-input { height:54px; min-height:54px; max-height:54px; line-height:54px; }
}
