.phone-input-wrapper {
  position: relative;
  width: 100%;
  display: block;
  overflow: visible;
}

.iti {
  width: 100% !important;
  display: block !important;
  position: relative;
  overflow: visible;
}

.iti-tel-input {
  width: 100% !important;
  padding-inline-start: 55px !important;
  padding-inline-end: 10px !important;
  box-sizing: border-box !important;
  font-size: 16px !important;
  direction: ltr;
  text-align: start;
  unicode-bidi: isolate;
}

.iti__flag-container {
  position: absolute;
  inset-inline-start: 10px;
  inset-inline-end: auto;
  left: auto;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* Country list portal */
.iti--container {
  z-index: 10060 !important;
}

.iti__country-list {
  z-index: 10061 !important;
  max-width: min(22rem, calc(100vw - 1.5rem)) !important;
  max-height: min(18rem, 60vh) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  direction: ltr;
  text-align: start;
}

.iti--fullscreen-popup.iti--container {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  transform: none !important;
  background: rgb(23 35 60 / 45%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.iti--fullscreen-popup .iti__country-list,
.iti--fullscreen-popup .iti__dropdown-content {
  width: min(22rem, calc(100vw - 2rem)) !important;
  max-width: min(22rem, calc(100vw - 2rem)) !important;
  max-height: min(70vh, 28rem) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 12px 40px rgb(23 35 60 / 24%) !important;
}

.yacht-booking-card,
.service-booking,
.booking-card,
.phone-input-wrapper,
.iti {
  overflow: visible;
}



/* إتاحة المرونة للغلاف الأساسي */
.phone-input-wrapper .iti {
    display: flex !important;
    align-items: center;
    gap: 10px; /* المسافة الفاصلة بين زر القائمة وحقل الهاتف */
    width: 100%;
}

/* تنسيق زر اختيار الدولة كعنصر منفصل */
.phone-input-wrapper .iti__country-container {
    position: static !important;
    order: 1;
}

.phone-input-wrapper .iti__selected-country {
    background-color: #ffffff;
    border: 1px solid #d1d5db; /* لون الحدود */
    border-radius: 8px;       /* تدوير الحواف */
    padding: 8px 12px;
    height: 42px;             /* نفس ارتفاع حقل الإدخال */
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-input-wrapper input.iti-tel-input {
    order: 2;
    flex: 1;
    padding-left: 12px !important; 
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    height: 42px;
}

[dir="rtl"] .phone-input-wrapper .iti__country-container {
    order: 2;
}

[dir="rtl"] .phone-input-wrapper input.iti-tel-input {
    order: 1;
    padding-right: 12px !important;
}