/**
 * Bootstrap overrides for RTL
 *
 * This file is only for overriding sass from upstream bootstrap, all general rtl fixes for
 * moodle scss should be placed immediately after the definition of the ltr rule.
 */

.breadcrumb-item {
    + .breadcrumb-item::before {
        content: "#{$breadcrumb-divider-rtl}";
        /*rtl:remove*/
        content: "#{$breadcrumb-divider}"; /* stylelint-disable-line declaration-block-no-duplicate-properties */
    }
}

.dir-rtl {
    .custom-select {
        background-position: 0.75rem center;
    }

    .custom-switch .custom-control-input:checked ~ .custom-control-label::after {
        transform: translateX(-($custom-switch-width - $custom-control-indicator-size));
    }

    .tooltip {
        &.bs-tooltip-left,
        &.bs-tooltip-right {
            .arrow {
                transform: rotate(180deg);
            }
        }

        &.bs-tooltip-left .arrow {
            left: auto;
            right: 0;
        }

        &.bs-tooltip-right .arrow {
            left: 0;
            right: auto;
        }
    }
}
