/* RTL Styles for Arabic Language */
:root {
    direction: rtl;
    text-align: right;
}

/* RTL Layout Overrides */
body {
    direction: rtl;
    text-align: right;
}

/* RTL Navigation */
.navbar-nav {
    padding-right: 0;
    margin-right: 0;
}

.navbar-nav .nav-item {
    margin-left: 1rem;
}

/* RTL Form Elements */
.form-control {
    text-align: right;
}

.form-check {
    padding-right: 1.25rem;
}

.form-check-input {
    margin-right: 0.25rem;
    margin-left: 0;
}

/* RTL Lists */
ul, ol {
    padding-right: 0;
    padding-left: 1rem;
}

/* RTL Margins and Paddings */
.ml-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.mr-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.pl-0 {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.pr-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* RTL Icons */
.bi-chevron-right:before {
    content: "\f284";
}

.bi-chevron-left:before {
    content: "\f285";
}

/* RTL Breadcrumbs */
.breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* RTL Dropdowns */
.dropdown-menu {
    text-align: right;
}

.dropdown-item {
    text-align: right;
}

/* RTL Tables */
table {
    direction: rtl;
}

th {
    text-align: right;
}

/* RTL Modal */
.modal-header .close {
    margin: -1rem auto -1rem -1rem;
}

/* RTL Carousel */
.carousel-control-prev {
    right: 0;
    left: auto;
}

.carousel-control-next {
    left: 0;
    right: auto;
}

/* RTL Cards */
.card {
    text-align: right;
}

.card-header {
    text-align: right;
}

/* RTL Badges */
.badge {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* RTL Buttons */
.btn-group > .btn:not(:first-child),
.btn-group > .btn-group:not(:first-child) {
    margin-right: -1px;
    margin-left: 0;
    border-radius: 0.25rem 0 0 0.25rem;
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > .btn-group:not(:last-child) > .btn {
    border-radius: 0 0.25rem 0.25rem 0;
}

/* RTL Pagination */
.pagination {
    padding-right: 0;
}

.page-item:first-child .page-link {
    margin-right: 0;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.page-item:last-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* RTL Progress Bars */
.progress {
    direction: ltr;
}

/* RTL Tooltips */
.tooltip {
    direction: rtl;
}

/* RTL Popovers */
.popover {
    direction: rtl;
    text-align: right;
}

/* RTL Media Objects */
.media {
    text-align: right;
}

.media-body {
    margin-right: 1rem;
    margin-left: 0;
}

/* RTL Custom Components */
.custom-control {
    padding-right: 1.5rem;
    padding-left: 0;
}

.custom-control-label::before,
.custom-control-label::after {
    right: 0;
    left: auto;
}

/* RTL Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-nav {
        padding-right: 0;
    }
    
    .dropdown-menu {
        right: 0;
        left: auto;
    }
} 