// 
// bootstrap-rtl.scss
//




// Dropdowns

.dropdown-menu{
    text-align: right !important;
}

.dropdown-menu[style] {
    left: 0 !important;
    right: auto !important;
}







// List

ul {
    padding-right: 0;
}

.list-inline-item:not(:last-child) {
    margin-left: 8px;
    margin-right: 0px;
}

// border

.border-right   { 
    border-left: $border-width solid $border-color !important; 
}

.border-left    { 
    border-right: $border-width solid $border-color !important; 
}


// Buttons

.btn-group,
.btn-group-vertical {
    direction: ltr;
}
// Modal

.custom-modal-title{
    text-align: right;
}

.modal-header {
    .close {
        right: auto !important;
        top: 0;
        left: 0;
    }
}

.modal-demo {
    .close{
        left: 25px;
        right: auto;
    }
}


.modal-footer {
    > :not(:first-child) {
        margin-right: .25rem;
        margin-left: 0;
    }

    > :not(:last-child) {
        margin-left: .25rem;
        margin-right: 0;
    }
}

.form-check-inline{
    margin-left: .75rem;
    margin-right: 0;
}

.custom-file-label {
    &::after {
        right: auto;
        left: 0;
        border-right: inherit;
    }
}

.custom-switch-md{
    padding-right: 3rem;
    padding-left: 0;
    .custom-control-label{
        &:before{
            left: auto;
            right: -3rem;
        }

        &:after{
            right: calc(-3rem + 2px);
            left: auto;
        }

    }

    .custom-control-input:checked~.custom-control-label::after{
        transform: translateX(-1.25rem);
    }
}


.custom-switch-lg{
    padding-right: 3.75rem;
    padding-left: 0;
    .custom-control-label{
        &:before{
            left: auto;
            right: -3.75rem;
        }

        &:after{
            right: calc(-3.75rem + 2px);
            left: auto;
        }

    }

    .custom-control-input:checked~.custom-control-label::after{
        transform: translateX(-1.5rem);
    }
}


// Input Group

.input-group-prepend {
    margin-left: -1px;
    margin-right: 0;
}

.input-group-append {
    margin-right: -1px;
    margin-left: 0;
}

.input-group>.input-group-prepend>.btn,
.input-group>.input-group-prepend>.input-group-text,
.input-group>.input-group-append:not(:last-child)>.btn,
.input-group>.input-group-append:not(:last-child)>.input-group-text,
.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),
.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),
.input-group>.custom-select:not(:last-child),
.input-group>.form-control:not(:last-child) {
    border-top-right-radius: $input-border-radius;
    border-bottom-right-radius: $input-border-radius;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group>.input-group-append>.btn,
.input-group>.input-group-append>.input-group-text,
.input-group>.input-group-prepend:not(:first-child)>.btn,
.input-group>.input-group-prepend:not(:first-child)>.input-group-text,
.input-group>.input-group-prepend:first-child>.btn:not(:first-child),
.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),
.input-group>.custom-select:not(:first-child),
.input-group>.form-control:not(:first-child) {
    border-top-left-radius: $input-border-radius;
    border-bottom-left-radius: $input-border-radius;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}