/* RTL fixes for shared page headings and icon-backed form controls. */
@media (min-width: 768px) {
    html[dir="rtl"] body:not([data-layout="horizontal"]):not([data-sidebar-style="overlay"]) .deznav {
        left: auto !important;
        right: 0 !important;
    }

    html[dir="rtl"] body[data-sidebar-style="overlay"] .deznav {
        left: auto !important;
        right: -100% !important;
    }

    html[dir="rtl"] body[data-sidebar-style="overlay"] .menu-toggle .deznav {
        right: 0 !important;
    }

    html[dir="rtl"] body:not([data-layout="horizontal"]) .content-body {
        min-width: 0;
        margin-right: var(--dz-sidebar-width) !important;
        margin-left: 0 !important;
    }

    html[dir="rtl"] body[data-layout="horizontal"] .content-body,
    html[dir="rtl"] body[data-sidebar-style="overlay"] .content-body {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 767.98px) {
    html[dir="rtl"] body[data-sidebar-style="overlay"] .deznav {
        left: auto !important;
        right: -100% !important;
    }

    html[dir="rtl"] body[data-sidebar-style="overlay"] .menu-toggle .deznav {
        right: 0 !important;
    }
}

@media (max-width: 767.98px) {
    html[dir="rtl"] .content-body {
        min-width: 0;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

html[dir="rtl"] .content-body .page-titles {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .content-body .form-head {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .content-body .form-head > .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
    text-align: right;
}

html[dir="rtl"] .content-body .page-titles .breadcrumb {
    direction: ltr;
    flex-direction: row;
    justify-content: flex-end;
}

html[dir="rtl"] .input-hasicon .icon,
html[direction="rtl"] .input-hasicon .icon,
body[direction="rtl"] .input-hasicon .icon,
[dir="rtl"] .input-hasicon .icon,
[direction="rtl"] .input-hasicon .icon {
    left: 0 !important;
    right: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 2;
}

html[dir="rtl"] .input-hasicon .form-control,
html[direction="rtl"] .input-hasicon .form-control,
body[direction="rtl"] .input-hasicon .form-control,
[dir="rtl"] .input-hasicon .form-control,
[direction="rtl"] .input-hasicon .form-control {
    padding-left: 2rem !important;
    padding-inline-start: 0.75rem !important;
    padding-inline-end: 2rem !important;
}

html[dir="rtl"] .login-remember,
html[direction="rtl"] .login-remember {
    display: flex !important;
    width: 100%;
    align-items: center;
    direction: rtl;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.5rem;
    margin: 0 0 1rem !important;
    padding: 0 !important;
}

html[dir="rtl"] .login-remember .form-check-input,
html[direction="rtl"] .login-remember .form-check-input {
    position: static !important;
    float: none !important;
    flex: 0 0 auto;
    margin: 0 !important;
}

html[dir="rtl"] .login-remember .form-check-label,
html[direction="rtl"] .login-remember .form-check-label {
    margin: 0 !important;
}

html[dir="rtl"] #modal-generate #txtexpiry + .icon,
html[direction="rtl"] #modal-generate #txtexpiry + .icon {
    position: absolute !important;
    top: 0 !important;
    right: auto !important;
    left: 0 !important;
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 5 !important;
    width: 2rem !important;
    height: 100% !important;
    color: #7e7e7e !important;
}

html[dir="rtl"] #modal-generate #txtexpiry,
html[direction="rtl"] #modal-generate #txtexpiry {
    padding-left: 2rem !important;
    padding-right: 0.75rem !important;
}

html[dir="rtl"] .dtp:not(.hidden),
html[direction="rtl"] .dtp:not(.hidden) {
    z-index: 10000 !important;
    direction: ltr !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

html[dir="rtl"] .dataTables_wrapper .dataTables_paginate .fa-angle-double-right,
html[dir="rtl"] .dataTables_wrapper .dataTables_paginate .fa-angle-double-left {
    display: inline-block;
    transform: scaleX(-1);
}

html[dir="rtl"] .dataTables_wrapper,
html[dir="rtl"] .dataTables_wrapper table.dataTable {
    direction: rtl;
}

html[dir="rtl"] .dataTables_wrapper table.dataTable thead,
html[dir="rtl"] .dataTables_wrapper table.dataTable tbody,
html[dir="rtl"] .dataTables_wrapper table.dataTable tfoot {
    direction: rtl;
}

html[dir="rtl"] .dataTables_wrapper table.dataTable thead th,
html[dir="rtl"] .dataTables_wrapper table.dataTable thead td,
html[dir="rtl"] .dataTables_wrapper table.dataTable tbody th,
html[dir="rtl"] .dataTables_wrapper table.dataTable tbody td,
html[dir="rtl"] .dataTables_wrapper table.dataTable tfoot th,
html[dir="rtl"] .dataTables_wrapper table.dataTable tfoot td {
    direction: rtl;
    text-align: right !important;
}

html[dir="rtl"] .dataTables_wrapper table.dataTable thead > tr > th[class*="sorting"],
html[dir="rtl"] .dataTables_wrapper table.dataTable thead > tr > td[class*="sorting"] {
    padding-right: 0.9375rem !important;
    padding-left: 26px !important;
}

html[dir="rtl"] .dataTables_wrapper table.dataTable thead > tr > th[class*="sorting"]::before,
html[dir="rtl"] .dataTables_wrapper table.dataTable thead > tr > th[class*="sorting"]::after,
html[dir="rtl"] .dataTables_wrapper table.dataTable thead > tr > td[class*="sorting"]::before,
html[dir="rtl"] .dataTables_wrapper table.dataTable thead > tr > td[class*="sorting"]::after {
    right: auto !important;
    left: 10px !important;
    margin-left: 0 !important;
    margin-right: 5px !important;
}

html[dir="rtl"] .dataTables_wrapper .dataTables_length,
html[dir="rtl"] .dataTables_wrapper .dataTables_filter,
html[dir="rtl"] .dataTables_wrapper .dataTables_info,
html[dir="rtl"] .dataTables_wrapper .dataTables_processing,
html[dir="rtl"] .dataTables_wrapper .dataTables_paginate {
    direction: rtl;
    text-align: right !important;
}

html[dir="rtl"] .dataTables_wrapper .dataTables_length,
html[dir="rtl"] .dataTables_wrapper .dataTables_info {
    float: right !important;
}

html[dir="rtl"] .dataTables_wrapper .dataTables_filter,
html[dir="rtl"] .dataTables_wrapper .dataTables_paginate {
    float: left !important;
}

html[dir="rtl"] .dataTables_wrapper .dataTables_paginate {
    flex-direction: row;
}
