/*
 * RTL overrides that the mirrored *.rtl.css files and bootstrap.rtl cannot express.
 * Physical left/right flips live in the generated files (npm run build:rtl).
 */

/* Bootstrap 4 helpers still used in older views */
[dir="rtl"] .text-left { text-align: right !important; }
[dir="rtl"] .text-right { text-align: left !important; }
[dir="rtl"] .float-left { float: right !important; }
[dir="rtl"] .float-right { float: left !important; }
[dir="rtl"] .ml-auto { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .mr-auto { margin-right: 0 !important; margin-left: auto !important; }
[dir="rtl"] .ml-1 { margin-left: 0 !important; margin-right: .25rem !important; }
[dir="rtl"] .ml-2 { margin-left: 0 !important; margin-right: .5rem !important; }
[dir="rtl"] .ml-3 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .mr-1 { margin-right: 0 !important; margin-left: .25rem !important; }
[dir="rtl"] .mr-2 { margin-right: 0 !important; margin-left: .5rem !important; }
[dir="rtl"] .mr-3 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .pl-3 { padding-left: 0 !important; padding-right: 1rem !important; }
[dir="rtl"] .pr-3 { padding-right: 0 !important; padding-left: 1rem !important; }

/* Directional arrows point the reading way */
[dir="rtl"] .fa-arrow-right,
[dir="rtl"] .fa-arrow-left,
[dir="rtl"] .fa-arrow-right-long,
[dir="rtl"] .fa-arrow-left-long,
[dir="rtl"] .fa-angle-right,
[dir="rtl"] .fa-angle-left,
[dir="rtl"] .fa-chevron-right,
[dir="rtl"] .fa-chevron-left,
[dir="rtl"] .fa-long-arrow-right,
[dir="rtl"] .fa-long-arrow-left,
[dir="rtl"] .fi-rr-arrow-right,
[dir="rtl"] .fi-rr-arrow-left,
[dir="rtl"] .fi-rr-angle-small-right,
[dir="rtl"] .fi-rr-angle-small-left,
[dir="rtl"] .fi-rr-angle-right,
[dir="rtl"] .fi-rr-angle-left,
[dir="rtl"] .fi-br-angle-right,
[dir="rtl"] .fi-br-angle-left {
    display: inline-block;
    transform: scaleX(-1);
}

/* Content that must stay left-to-right */
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="url"],
[dir="rtl"] input[name="phone"],
[dir="rtl"] .ltr-island,
[dir="rtl"] code,
[dir="rtl"] pre {
    direction: ltr;
    text-align: right;
}

[dir="rtl"] input[type="tel"]::placeholder,
[dir="rtl"] input[type="email"]::placeholder,
[dir="rtl"] input[name="phone"]::placeholder {
    direction: rtl;
}

[dir="rtl"] .plyr,
[dir="rtl"] .plyr__controls,
[dir="rtl"] .plyr__progress,
[dir="rtl"] .plyr__volume {
    direction: ltr;
}

/* Carousels compute positions in LTR, slides read RTL */
[dir="rtl"] .owl-carousel,
[dir="rtl"] .slick-slider {
    direction: ltr;
}

[dir="rtl"] .owl-carousel .owl-item,
[dir="rtl"] .slick-slide {
    direction: rtl;
}

/* Rich text from editors keeps list indentation on the reading side */
[dir="rtl"] .description ul,
[dir="rtl"] .description ol,
[dir="rtl"] .course-description ul,
[dir="rtl"] .course-description ol,
[dir="rtl"] .blog-details ul,
[dir="rtl"] .blog-details ol {
    padding-left: 0;
    padding-right: 1.4rem;
}

[dir="rtl"] .owl-nav i,
[dir="rtl"] .slick-arrow i,
[dir="rtl"] .swiper-button-next i,
[dir="rtl"] .swiper-button-prev i {
    transform: none;
}

/* jQuery UI range slider keeps its math in LTR */
[dir="rtl"] .ui-slider {
    direction: ltr;
}
