/* RTL Styles for CIS-Health-Insurance Arabic Support */

/* General RTL overrides */
body[dir="rtl"] {
    text-align: right;
}

/* Sidebar menu RTL adjustments */
body[dir="rtl"] .pc-sidebar .navbar-content .pc-navbar .pc-item .pc-submenu {
    right: 100%;
    left: auto;
}

body[dir="rtl"] .pc-sidebar .navbar-content .pc-navbar .pc-item .pc-arrow {
    transform: rotate(180deg);
    margin-left: 0;
    margin-right: auto;
}

body[dir="rtl"] .pc-sidebar .navbar-content .pc-navbar .pc-item .pc-micon {
    margin-right: 0;
    margin-left: 10px;
}

/* Table RTL adjustments */
body[dir="rtl"] .table {
    direction: rtl;
}

/* Form RTL adjustments */
body[dir="rtl"] .form-label {
    text-align: right;
}

body[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}

body[dir="rtl"] .form-check .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -1.5em;
}

/* Floating label RTL adjustments for login page */
body[dir="rtl"] .form-floating > label {
    right: 0;
    left: auto;
    transform-origin: 100% 0;
    text-align: right;
}

body[dir="rtl"] .form-floating > .form-control {
    padding-right: 1rem;
    padding-left: 0;
}

/* Cards RTL adjustments */
body[dir="rtl"] .card-header {
    text-align: right;
}

/* Dropdowns RTL adjustments */
body[dir="rtl"] .dropdown-menu {
    text-align: right;
}

/* Float adjustments */
body[dir="rtl"] .float-end {
    float: left !important;
}

body[dir="rtl"] .float-start {
    float: right !important;
}

/* Text alignment adjustments */
body[dir="rtl"] .text-start {
    text-align: right !important;
}

body[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Margin and padding adjustments */
body[dir="rtl"] .ms-1, body[dir="rtl"] .ms-2, body[dir="rtl"] .ms-3, body[dir="rtl"] .ms-4, body[dir="rtl"] .ms-5 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

body[dir="rtl"] .me-1, body[dir="rtl"] .me-2, body[dir="rtl"] .me-3, body[dir="rtl"] .me-4, body[dir="rtl"] .me-5 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

body[dir="rtl"] .ps-1, body[dir="rtl"] .ps-2, body[dir="rtl"] .ps-3, body[dir="rtl"] .ps-4, body[dir="rtl"] .ps-5 {
    padding-right: 0.25rem !important;
    padding-left: 0 !important;
}

body[dir="rtl"] .pe-1, body[dir="rtl"] .pe-2, body[dir="rtl"] .pe-3, body[dir="rtl"] .pe-4, body[dir="rtl"] .pe-5 {
    padding-left: 0.25rem !important;
    padding-right: 0 !important;
}

/* Modal RTL adjustments */
body[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

/* Button group RTL adjustments */
body[dir="rtl"] .btn-group > .btn:not(:first-child),
body[dir="rtl"] .btn-group > .btn-group:not(:first-child) > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

body[dir="rtl"] .btn-group > .btn:not(:last-child):not(.dropdown-toggle),
body[dir="rtl"] .btn-group > .btn-group:not(:last-child) > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}
