/*
=================================================================
     RTL OVERRIDES (SHOULD BE AT THE TOP OF THE main.css FILE)
=================================================================
*/

/* Apply general RTL direction and text alignment */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* ---------------------- main elements ---------------------- */

[dir="rtl"] body {
    background: linear-gradient(to left, #FFFFFF, #E6F0FF, #F5F7FF);
    font-family: 'Cairo', sans-serif;

}

[dir="rtl"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(-45deg, #87929c, #87929c);
}

[dir="rtl"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(-45deg, #87929c, #1DE9B6);
}

[dir="rtl"] .text-green-ligh-bg-grad {
    background: linear-gradient(-45deg, #1de099, #1dc8cd);
}

/* border elements */
[dir="rtl"] .accepted-border {
    border-left: 0;
    border-right: 3px solid #0066FF;
}

[dir="rtl"] .not_accepted-border {
    border-left: 0;
    border-right: 3px solid #a3a3a3;
}

[dir="rtl"] .arrived-border {
    border-left: 0;
    border-right: 3px solid #b9ac8c;
}

[dir="rtl"] .inprog-border {
    border-left: 0;
    border-right: 3px solid #9c90db;
}

[dir="rtl"] .notresp-border {
    border-left: 0;
    border-right: 3px solid #db90c7;
}

[dir="rtl"] .done-border {
    border-left: 0;
    border-right: 3px solid #5BB799;
}

[dir="rtl"] .cancel-border {
    border-left: 0;
    border-right: 3px solid #ff838f;
}


/* - border element - */

[dir="rtl"] .border-left-gray {
    border-left: 0 !important;
    border-right: 1px solid #e8e8e8 !important;
}

[dir="rtl"] .border-right-gray {
    border-right: 0 !important;
    border-left: 1px solid #e8e8e8 !important;
}

[dir="rtl"] .border-right-white {
    border-right: 0 !important;
    border-left: 1px solid #e8e8e8 !important;
}

[dir="rtl"] .border-right-blue {
    border-right: 0 !important;
    border-left: 1px solid #508fe0 !important;
}

[dir="rtl"] .border-left-primary {
    border-left: 0 !important;
    border-right: .25rem solid #4e73df !important;
}

[dir="rtl"] .border-left-success {
    border-left: 0 !important;
    border-right: .25rem solid #1cc88a !important;
}

[dir="rtl"] .border-left-info {
    border-left: 0 !important;
    border-right: .25rem solid #36b9cc !important;
}

[dir="rtl"] .border-left-warning {
    border-left: 0 !important;
    border-right: .25rem solid #f6c23e !important;
}

[dir="rtl"] .border-flex {
    border-right: 0px !important;
    border-left: 1px solid #efefef !important;
}

/* - border and border radius - */
[dir="rtl"] .b-r-l-cont-right {
    border-radius: 32px 0px 0px 32px;
}

[dir="rtl"] .b-r-l-cont-left {
    border-radius: 0px 32px 32px 0px;
}


/* - status for avatar - */
[dir="rtl"] .status-indicator-img {
    right: auto;
    left: 20px;
}

[dir="rtl"] .status-indicator-img-small {
    right: auto;
    left: 12px;
}

/* - form inputs- */

[dir="rtl"] .input-group-text {
    border-radius: 0rem .25rem .25rem 0rem;
}

[dir="rtl"] .custom-checkbox {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .custom-control-inline-user {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .custom-control-input-user {
    left: auto;
    right: 0;
}

[dir="rtl"] .custom-control-label-user::before {
    left: auto;
    right: -1.5rem;
}

[dir="rtl"] .custom-control-label-user::after {
    left: auto;
    right: -1.5rem;
}

/* - select 2 plugin - */

[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    padding-right: 0px;
}

[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: auto;
    left: 5px;
}

[dir="rtl"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    padding: 3px 23px 2px 5px;
}

[dir="rtl"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    border-right: 0;
    border-left: 1px solid #5298f1;
    left: auto;
    right: 2px;
}

/* - owl plugin - */
[dir="rtl"] .owl-carousel .owl-nav .owl-prev {
    left: auto;
    right: -20px;
}

[dir="rtl"] .owl-carousel .owl-nav .owl-next {
    right: auto;
    left: -20px;
}

/* custom radio element */

[dir="rtl"] .check_custom_index label {
    padding: 0px 25px 0px 0px;
}

[dir="rtl"] .check_custom_index .check {
    left: auto;
    right: 0px;
}

/* international telephone input */

[dir="rtl"] .iti--allow-dropdown input,
[dir="rtl"] .iti--allow-dropdown input[type=text],
[dir="rtl"] .iti--allow-dropdown input[type=tel],
[dir="rtl"] .iti--separate-dial-code input,
[dir="rtl"] .iti--separate-dial-code input[type=text],
[dir="rtl"] .iti--separate-dial-code input[type=tel] {
    padding-right: 52px !important;
    padding-left: 6px !important;
}

/* ------ table ------- */

[dir="rtl"] .calander-left-border {
    border-left: 0px !important;
    border-right: 1px solid #e8e8e8 !important;
}

[dir="rtl"] table.dataTable>thead .sorting:before,
[dir="rtl"] table.dataTable>thead .sorting:after,
[dir="rtl"] table.dataTable>thead .sorting_asc:before,
[dir="rtl"] table.dataTable>thead .sorting_asc:after,
[dir="rtl"] table.dataTable>thead .sorting_desc:before,
[dir="rtl"] table.dataTable>thead .sorting_desc:after,
[dir="rtl"] table.dataTable>thead .sorting_asc_disabled:before,
[dir="rtl"] table.dataTable>thead .sorting_asc_disabled:after,
[dir="rtl"] table.dataTable>thead .sorting_desc_disabled:before,
[dir="rtl"] table.dataTable>thead .sorting_desc_disabled:after {
    bottom: 1.1em;
    left: 0.5em;
    /* move sorting icons to the left */
    right: auto;
}

/* ------ mutli steps form ------- */

[dir="rtl"] .progressbar li {
    float: right;
}

[dir="rtl"] #myform .action-button-previous {
    margin-right: 0;
    margin-left: 20px;
}


/* - messages - */
[dir="rtl"] #flash-msg {
    transform: translate(50%, -50%);
    /* Adjusted for RTL centering */
}

[dir="rtl"] #add_buttn_fixed, [dir="rtl"] #add_buttn_fixed2 {
    right: auto;
    left: 4%;
}

/* -------------------------- Admin panal -------------------------- */
[dir="rtl"] .sidebar {
    margin-left: 0;
    margin-right: 9px;
    padding: 0px;
}

[dir="rtl"] .sidebar .nav-item .collapse {
    left: auto;
    right: calc(5.0rem + 0rem / 0);
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
}


[dir="rtl"] .sidebar #sidebarToggle::after {
    content: '\f104';
    /* Left arrow */
    margin-right: 0;
    margin-left: 0.1rem;
}

[dir="rtl"] .sidebar.toggled #sidebarToggle::after {
    content: '\f105';
    /* Right arrow */
    margin-left: 0;
    margin-right: 0.0rem;
}

/* ------- topbar ------- */

[dir="rtl"] .topbar .dropdown .dropdown-menu {
    left: 12px;
    right: unset;
}

[dir="rtl"] .dropdown-menu-right {
    left: 0;
    right: auto;
}

[dir="rtl"] .topbar .nav-item .nav-link .badge-counter {
    right: auto;
    left: .25rem;
    transform-origin: top left;
}

/* ----------- Patients Profile ----------- */
[dir="rtl"] .patient-timeline {
    border-left: 0;
    border-right: 3px solid #e0eeff;
    padding-left: 0;
    padding-right: 12px;
}

[dir="rtl"] .patient-timeline .patient-timeline-pointer {
    left: auto;
    right: -9px;
    /* adjust for border width */
}

@media (min-width: 576px) {
    [dir="rtl"] .topbar .dropdown .dropdown-menu {
        left: -10px;
        right: auto;
    }

    [dir="rtl"] .topbar .dropdown .dropdown-menu:after {
        right: auto;
        left: 19px;
    }

    [dir="rtl"] .calendar_weekly_today,
    [dir="rtl"] .calendar_weekly_selected {
        text-align: end !important;
        padding: 0px 10px 0px 0px;
    }

    [dir="rtl"] .short_access_topbar_menu .dropdown-menu {
        left: -10px;
        right: auto;
    }
}


@media (min-width: 768px) {
    [dir="rtl"] .sidebar.toggled .nav-item .nav-link {
        text-align: right;
    }

    [dir="rtl"] .sidebar.toggled .sidebar-heading {
        text-align: right;
    }

    [dir="rtl"] .sidebar.toggled .nav-item .nav-link[data-bs-toggle="collapse"]::after {
        float: left;
    }

    [dir="rtl"] .sidebar.toggled .nav-item .nav-link i {
        margin-right: 0;
        margin-left: .25rem;
    }

    [dir="rtl"] .border-flex {
        border-left: 1px solid #efefef !important;
        border-right: 0px !important;
    }
}

/* --------- chat ----------- */
[dir="rtl"] .fast_access_btn, [dir="rtl"] .chatboat_btn {
    right: auto;
    left: 2%;
}

[dir="rtl"] .chatboat_cont {
    right: auto;
    left: 0;
}

/* Add other RTL specific styles here following the same [dir="rtl"] pattern */
[dir="rtl"] .text_animated_gradient {
    background: linear-gradient(to left, #0066FF 20%, #00affa 30%, #afcffe 70%, #1b4a90 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    background-size: 400% auto;
    animation: textShine 5s ease-in-out infinite alternate;
}

[dir="rtl"] .blue_linear_gradient {
    background: linear-gradient(-139deg, #0260ed 49%, rgb(1 56 137) 102%);
}

[dir="rtl"] .tree ul {
    margin-left: 0;
    margin-right: 1em;
}

[dir="rtl"] .tree ul li:before {
    left: auto;
    right: 0;
}

[dir="rtl"] #pwa-install-card {
    right: auto;
    left: 20px;
    transform: translateX(-120%);
}

[dir="rtl"] #pwa-install-card.show {
    transform: translateX(0);
}

[dir="rtl"] #pwa-install-card.hide {
    transform: translateX(-120%);
}


[dir="rtl"] .me-2 {
    margin-left: .5rem !important;
}



[dir="rtl"] .me-1 {
    margin-left: .25rem !important;
}

[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
}

[dir="rtl"] .calendar-time {
    padding-left: 8px;
}


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

[dir="rtl"] .topbar .dropdown .dropdown-menu {
    text-align: start;

}


[dir="rtl"] .btn-group>.btn-group:not(:last-child)>.btn, .btn-group>.btn:not(:last-child):not(.dropdown-toggle) {

    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir="rtl"] .btn-group>.btn-group:not(:first-child)>.btn, .btn-group>.btn:nth-child(n+3), .btn-group>:not(.btn-check)+.btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

[dir="rtl"] .modal-header .btn-close {
    margin: -.5rem auto -.5rem -.5rem;
}



[dir="rtl"] .end_0_lang {
    left: 0;
    right: unset;
}