/* RTL overrides for the Arabic version of the public site */

body {
    text-align: right;
    direction: rtl;
    font-family: 'Cairo', 'Poppins', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Roboto', sans-serif;
}

/* Bootstrap 4 utility classes are physical (left/right), flip the ones used on this theme */
[dir="rtl"] .ml-auto {
    margin-left: unset !important;
    margin-right: auto !important;
}

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

[dir="rtl"] .pr-0 {
    padding-right: unset !important;
    padding-left: 0 !important;
}

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

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

/* Navigation */
[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

@media (min-width: 1200px) {
    [dir="rtl"] .btn-nav {
        margin-left: 0;
        margin-right: 15px;
    }
}

/* Hero */
[dir="rtl"] .hero-content {
    text-align: right;
}

/* Media / call to action blocks */
[dir="rtl"] .media {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .media-left {
    margin-left: 15px;
    margin-right: 0;
}

/* Pricing cards */
[dir="rtl"] .pricing-features .feature {
    text-align: right;
}

[dir="rtl"] .cs-price-card-info h1 sup {
    margin-left: 4px;
    margin-right: 0;
}

/* Footer */
[dir="rtl"] .footer-links,
[dir="rtl"] .footer-share-it {
    padding-right: 0;
}

@media (min-width: 768px) {
    [dir="rtl"] .copy-text {
        text-align: left;
    }
}

/* Icons that sit before text in the LTR markup should keep a gap on their new (left) side */
[dir="rtl"] .fa,
[dir="rtl"] .fab {
    margin-left: 0.35em;
    margin-right: 0;
}

[dir="rtl"] .btn-nav .fa,
[dir="rtl"] .btn-nav .fab {
    margin-left: 0;
}

/* Login / signup icon fields (the icon and input padding are hardcoded to the left in the base theme) */
[dir="rtl"] .svgIcon {
    left: auto;
    right: 10px;
}

[dir="rtl"] .input.form-control {
    padding-left: 15px;
    padding-right: 50px;
}

@media (max-width: 768px) {
    [dir="rtl"] .svgIcon {
        left: auto;
        right: 7px;
    }
}

[dir="rtl"] .uiIcon .input-group-text {
    border-radius: 5px 0 0 5px !important;
}

/* Newsletter signup input group: button + rounded corners are hardcoded to the LTR (right) end */
[dir="rtl"] .call-action-primary-input {
    padding-left: 20px;
    padding-right: 20px;
}

[dir="rtl"] .call-action-primary-btn {
    border-radius: 27px 0 0 27px;
}

/* Bootstrap's input-group rounds/squares corners by DOM position (first/last-child), which is
   physical left/right and doesn't flip with dir="rtl". The name field is first in the DOM but
   sits at the visual right (outer) end in RTL, so its rounding needs to be mirrored explicitly. */
[dir="rtl"] .call-action-primary-search .call-action-primary-input:first-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 27px;
    border-bottom-right-radius: 27px;
}

[dir="rtl"] .call-action-primary-search .call-action-primary-input + .call-action-primary-input {
    margin-left: 0;
    margin-right: -1px;
}

[dir="rtl"] .sign-form-text.d-flex {
    text-align: right;
}
