/*
 * Arabic document direction with compatibility for Bailandocore's existing
 * explicit row-reverse layouts and JavaScript slider coordinates.
 */
html[dir="rtl"] body.rtl {
    direction: rtl;
}

/* Keep Arabic prose and mixed numbers/punctuation in their own reading context. */
html[dir="rtl"] body.rtl :is(p, h1, h2, h3, h4, h5, h6, label, .h3, .h4,
    .produkt-title, .news-cart > span, .file-span, .form-control) {
    direction: rtl;
    unicode-bidi: plaintext;
}
html[dir="rtl"] body.rtl :is(.pagenopadding, .news-detail-text, .recipes-text,
    .ingredients, .directions, .contact-post-adres, .csr-page-content) {
    direction: rtl;
}
html[dir="rtl"] body.rtl :is(ul, ol) {
    direction: rtl;
}

/*
 * These containers already have their Arabic ordering applied by the theme.
 * Their layout coordinate system stays LTR, while their text remains RTL.
 */
html[dir="rtl"] body.rtl :is(.row, .d-flex, .arab-rewerce, .arab-revers,
    .navbar, .navbar-collapse, .navbar-text, .menu-top-left, .menu-top-right,
    .navbar-nav, .nav-page, .share-page, .produkt-detail, .produkt-massa,
    .archive-variable-product, .job-cart, .job-cart-right, .location,
    .jobs-detail-title, .jobs-detail-main, .recipes-a-category, .pagin-produkt) {
    direction: ltr;
}

/* Slick and FlexSlider use physical left/right coordinates. */
html[dir="rtl"] body.rtl :is(.slick-slider, .slick-list, .slick-track,
    .flexslider, .flexslider .slides, .flexslider .slides > li, .carousel) {
    direction: ltr;
}
html[dir="rtl"] body.rtl :is(.carousel-caption, .slick-slide p, .slick-slide h3) {
    direction: rtl;
}

/* Recipe grids and the repaired news filters use RTL ordering exactly once. */
html[dir="rtl"] body.rtl .recipes-body .awp-recipe-grid,
html[dir="rtl"] body.rtl .awp-recipe-pagination ul,
html[dir="rtl"] body.rtl.awp-news-rtl .wrapp-news-select .searchandfilter ul,
html[dir="rtl"] body.rtl .ingredients > .arab-rewerce,
html[dir="rtl"] body.rtl .directions > .arab-rewerce {
    direction: rtl;
}
html[dir="rtl"] body.rtl .directions ol li {
    display: list-item;
    direction: rtl;
}
html[dir="rtl"] body.rtl :is(input[type="email"], input[type="tel"],
    input[type="url"], input[type="number"], a[href^="tel:"]) {
    direction: ltr;
    unicode-bidi: isolate;
}
html[dir="rtl"] body.rtl a[href^="tel:"] { display: inline-block; }
html[dir="rtl"] body.rtl :is(input[type="email"], input[type="tel"], input[type="url"]) {
    text-align: right;
}

/* Preserve components that already used native RTL before the document fix. */
html[dir="rtl"] body.rtl .wpcf7[lang="ar"] .row,
html[dir="rtl"] body.rtl .news-header .row,
html[dir="rtl"] body.rtl .news-body .row,
html[dir="rtl"] body.rtl .wrapp-news-select,
html[dir="rtl"] body.rtl .recipes-a,
html[dir="rtl"] body.rtl .page-produkt .row.arab-revers,
html[dir="rtl"] body.rtl .wraprodukt {
    direction: rtl;
}
@media (min-width: 480px) {
    html[dir="rtl"] body.rtl.home .recipes-home .mb-recipe-slider .slick-track {
        direction: rtl;
    }
}
