/**
 * WISECP · Web Hosting Billing and Digital Services Platform
 * RTL Direction Styles for Input Groups, Icons & Components
 */
[dir=rtl] .bi-arrow-right,[dir=rtl] .bi-arrow-left,[dir=rtl] .bi-chevron-right,[dir=rtl] .bi-chevron-left,[dir=rtl] .bi-box-arrow-right,[dir=rtl] .bi-box-arrow-left {
  transform: scaleX(-1);
}

/* Perfect RTL Input Group & Icon Alignment: Icons on the RIGHT (liman), Inputs to the LEFT (lisar) */
html[dir="rtl"] .input-group,
[dir="rtl"] .input-group {
  flex-direction: row !important;
}

/* In RTL row flow: First child is on the RIGHT (liman) -> rounded right corners, flat left corners */
html[dir="rtl"] .input-group > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
[dir="rtl"] .input-group > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) {
  border-top-right-radius: var(--bs-border-radius, 0.375rem) !important;
  border-bottom-right-radius: var(--bs-border-radius, 0.375rem) !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* In RTL row flow: Last child is on the LEFT (lisar) -> rounded left corners, flat right corners */
html[dir="rtl"] .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback),
[dir="rtl"] .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  border-top-left-radius: var(--bs-border-radius, 0.375rem) !important;
  border-bottom-left-radius: var(--bs-border-radius, 0.375rem) !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

html[dir="rtl"] .input-group .form-control,
html[dir="rtl"] .input-group .form-select,
[dir="rtl"] .input-group .form-control,
[dir="rtl"] .input-group .form-select {
  text-align: right !important;
}

/* RTL Form Label Alignment */
html[dir="rtl"] .form-label,
[dir="rtl"] .form-label {
  text-align: right;
  display: block;
}
