/* RTL Support for ITR POS Language Module */

/* RTL Body and Main Container */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .main-wrapper {
    direction: rtl;
}

/* RTL Sidebar */
body.rtl .sidebar {
    right: 0;
    left: auto;
}

body.rtl .sidebar-inner {
    text-align: right;
}

body.rtl .sidebar-menu ul li a {
    text-align: right;
}

body.rtl .sidebar-menu ul li a i {
    margin-left: 10px;
    margin-right: 0;
}

/* RTL Header */
body.rtl .header {
    direction: rtl;
}

body.rtl .header-left {
    order: 2;
}

body.rtl .header .user-menu {
    order: 1;
}

body.rtl .header .user-menu .nav-item {
    margin-left: 0;
    margin-right: 0.5em;
}

/* RTL Dropdown Menus */
body.rtl .dropdown-menu {
    right: 0;
    left: auto;
    text-align: right;
}

body.rtl .dropdown-menu .dropdown-item {
    text-align: right;
}

/* RTL Cards and Content */
body.rtl .card {
    text-align: right;
}

body.rtl .card-header {
    text-align: right;
}

body.rtl .card-body {
    text-align: right;
}

/* RTL Forms */
body.rtl .form-group label {
    text-align: right;
}

body.rtl .form-control {
    text-align: right;
}

body.rtl .input-group {
    direction: rtl;
}

body.rtl .input-group .form-control {
    text-align: right;
}

/* RTL Tables */
body.rtl .table {
    text-align: right;
}

body.rtl .table th,
body.rtl .table td {
    text-align: right;
}

/* RTL Buttons */
body.rtl .btn {
    text-align: center;
}

/* RTL Navigation */
body.rtl .nav {
    direction: rtl;
}

body.rtl .nav-item {
    margin-left: 0;
    margin-right: 0.5em;
}

/* RTL Modal */
body.rtl .modal-dialog {
    direction: rtl;
}

body.rtl .modal-header {
    text-align: right;
}

body.rtl .modal-body {
    text-align: right;
}

body.rtl .modal-footer {
    text-align: right;
}

/* RTL Alert */
body.rtl .alert {
    text-align: right;
}

/* RTL Badge */
body.rtl .badge {
    text-align: center;
}

/* RTL Breadcrumb */
body.rtl .breadcrumb {
    direction: rtl;
}

body.rtl .breadcrumb-item + .breadcrumb-item::before {
    content: "\\";
    margin-left: 0.5rem;
    margin-right: 0;
}

/* RTL Pagination */
body.rtl .pagination {
    direction: rtl;
}

/* RTL List Group */
body.rtl .list-group-item {
    text-align: right;
}

/* RTL Progress */
body.rtl .progress {
    direction: rtl;
}

/* RTL Tooltip */
body.rtl .tooltip {
    direction: rtl;
}

/* RTL Popover */
body.rtl .popover {
    direction: rtl;
}

/* RTL Carousel */
body.rtl .carousel {
    direction: rtl;
}

/* RTL Accordion */
body.rtl .accordion-button {
    text-align: right;
}

body.rtl .accordion-body {
    text-align: right;
}

/* RTL Tabs */
body.rtl .nav-tabs {
    direction: rtl;
}

body.rtl .tab-content {
    text-align: right;
}

/* RTL Offcanvas */
body.rtl .offcanvas {
    direction: rtl;
}

body.rtl .offcanvas-header {
    text-align: right;
}

body.rtl .offcanvas-body {
    text-align: right;
}

/* RTL Toast */
body.rtl .toast {
    direction: rtl;
}

body.rtl .toast-header {
    text-align: right;
}

body.rtl .toast-body {
    text-align: right;
}

/* RTL Spinner */
body.rtl .spinner-border,
body.rtl .spinner-grow {
    direction: ltr; /* Keep spinners LTR */
}

/* RTL Close Button */
body.rtl .btn-close {
    margin-left: 0;
    margin-right: -0.375rem;
}

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

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

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

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

/* RTL Margin and Padding */
body.rtl .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
body.rtl .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
body.rtl .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
body.rtl .me-4 { margin-left: 1.5rem !important; margin-right: 0 !important; }
body.rtl .me-5 { margin-left: 3rem !important; margin-right: 0 !important; }

body.rtl .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
body.rtl .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
body.rtl .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
body.rtl .ms-4 { margin-right: 1.5rem !important; margin-left: 0 !important; }
body.rtl .ms-5 { margin-right: 3rem !important; margin-left: 0 !important; }

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

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

/* RTL Border */
body.rtl .border-start {
    border-left: 0 !important;
    border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
}

body.rtl .border-end {
    border-right: 0 !important;
    border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
}

/* RTL Rounded */
body.rtl .rounded-start {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: var(--bs-border-radius) !important;
    border-bottom-right-radius: var(--bs-border-radius) !important;
}

body.rtl .rounded-end {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: var(--bs-border-radius) !important;
    border-bottom-left-radius: var(--bs-border-radius) !important;
}
