/* RTL (Right-to-Left) Specific Styles */

/* Text Alignment */
.text-start {
    text-align: right !important;
}

.text-end {
    text-align: left !important;
}

/* Margin and Padding */
.ms-1, .ms-2, .ms-3, .ms-4, .ms-5 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

.me-1, .me-2, .me-3, .me-4, .me-5 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

.ps-1, .ps-2, .ps-3, .ps-4, .ps-5 {
    padding-right: 0.25rem !important;
    padding-left: 0 !important;
}

.pe-1, .pe-2, .pe-3, .pe-4, .pe-5 {
    padding-left: 0.25rem !important;
    padding-right: 0 !important;
}

/* Flexbox Direction */
.flex-row {
    flex-direction: row !important;
}

.flex-row-reverse {
    flex-direction: row-reverse !important;
}

/* Border Radius */
.rounded-s {
    border-top-right-radius: 0.25rem !important;
    border-bottom-right-radius: 0.25rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.rounded-e {
    border-top-left-radius: 0.25rem !important;
    border-bottom-left-radius: 0.25rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Float */
.float-start {
    float: right !important;
}

.float-end {
    float: left !important;
}

/* Text Direction */
.text-start {
    text-align: right !important;
}

.text-end {
    text-align: left !important;
}

/* Form Controls */
.form-check {
    padding-right: 1.5em !important;
    padding-left: 0 !important;
}

.form-check .form-check-input {
    float: right !important;
    margin-right: -1.5em !important;
    margin-left: 0 !important;
}

/* Dropdown Menus */
.dropdown-menu {
    text-align: right !important;
}

/* List Groups */
.list-group {
    padding-right: 0 !important;
}

/* Input Groups */
.input-group > .input-group-prepend {
    margin-left: -1px !important;
    margin-right: 0 !important;
}

.input-group > .input-group-append {
    margin-right: -1px !important;
    margin-left: 0 !important;
}

.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.25rem !important;
    border-bottom-right-radius: 0.25rem !important;
}

.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 0.25rem !important;
    border-bottom-left-radius: 0.25rem !important;
}

/* Custom RTL Fixes */
.lang-ar .fa-arrow-right {
    transform: rotate(180deg);
}

.lang-en .fa-arrow-left {
    transform: rotate(180deg);
}