/* Adjustments for right-to-left pages that mirroring the stylesheets cannot make. */

/* Arabic letters need a font that has them. Icon fonts keep their own. */
html[dir="rtl"] body,
html[dir="rtl"] body *:not(i):not([class^="fi-"]):not([class*=" fi-"]):not([class*="fa-"]):not(.fa):not([class*="bi-"]):not([class*="note-icon"]):not([class*="fc-icon"]):not(code):not(pre) {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif !important;
    letter-spacing: normal !important;
}

/* Charts are drawn left to right, so that figures such as -0.2 keep their sign in front. */
html[dir="rtl"] canvas {
    direction: ltr;
}

/* Arrows that point forward or back. */
html[dir="rtl"] [class*="arrow-left"],
html[dir="rtl"] [class*="arrow-right"],
html[dir="rtl"] [class*="arrow-alt-left"],
html[dir="rtl"] [class*="arrow-alt-right"],
html[dir="rtl"] [class*="angle-left"],
html[dir="rtl"] [class*="angle-right"],
html[dir="rtl"] [class*="chevron-left"],
html[dir="rtl"] [class*="chevron-right"],
html[dir="rtl"] [class*="arrow-small-left"],
html[dir="rtl"] [class*="arrow-small-right"],
html[dir="rtl"] [class*="angle-small-left"],
html[dir="rtl"] [class*="angle-small-right"],
html[dir="rtl"] [class*="sign-out"],
html[dir="rtl"] [class*="paper-plane"] {
    display: inline-block;
    transform: scaleX(-1);
}

/* A right-to-left calendar already picks the arrow that points the right way. */
html[dir="rtl"] .fc-direction-rtl .fc-icon {
    transform: none;
}

/* Addresses, numbers and passwords are read left to right, but sit on the starting side. */
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="password"],
html[dir="rtl"] input[type="number"] {
    direction: ltr;
    text-align: right;
}

html[dir="rtl"] input[type="email"]::placeholder,
html[dir="rtl"] input[type="url"]::placeholder,
html[dir="rtl"] input[type="tel"]::placeholder,
html[dir="rtl"] input[type="password"]::placeholder,
html[dir="rtl"] input[type="number"]::placeholder {
    direction: rtl;
}

/* Video players run left to right. */
html[dir="rtl"] .plyr {
    direction: ltr;
}

/* A phone number written in the top bar keeps its "+" and groups in order. */
html[dir="rtl"] .sub-header a[href^="tel:"] {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Arrows drawn by a stylesheet: a closed entry points forward, which is to the left here, and an
   open one down. */
html[dir="rtl"] .first-li-have-sub > a::after,
html[dir="rtl"] .second-li-have-sub > a::before,
html[dir="rtl"] .dropdown-list-have-sub > a::before {
    transform: translateY(-50%) scaleX(-1);
}

html[dir="rtl"] .first-li-have-sub.active > a::after,
html[dir="rtl"] .second-li-have-sub.active > a::before,
html[dir="rtl"] .dropdown-list-have-sub.active > a::before {
    transform: translateY(-50%) rotate(-90deg) scaleX(-1);
}

html[dir="rtl"] .qnaaccordion-two .accordion-button.collapsed::after,
html[dir="rtl"] .qnaaccordion-three .accordion-button.collapsed::after,
html[dir="rtl"] .lms1-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    transform: scaleX(-1);
}
