/*
 * Phase 3 RTL (JLRMED-1047) — content-only RTL stylesheet.
 *
 * Gated by the `lang-rtl-content` class added to <body> in
 * jlr_media_preprocess_html() / jlr_media_2024_preprocess_html() when
 * _jlr_rtl_should_apply() returns TRUE (Arabic interface + Arabic translation
 * present + field_rtl_enabled = 1 + non-admin theme).
 *
 * Scope: only the article text inside text-only strips and the news header
 * block (title / date / "Further information" / "Notes to editors").
 * Chrome (header, hamburger, language switcher, footer), forms, buttons,
 * carousels, hero media and the strip-level wrappers themselves are NEVER
 * targeted here.
 */

body.lang-rtl-content .strip-body-copy,
body.lang-rtl-content .text-area-with-editor,
body.lang-rtl-content .title-block-template .title-block,
body.lang-rtl-content .subheading-template,
body.lang-rtl-content .col2-text-template,
body.lang-rtl-content.page-node-type-news .section-title,
body.lang-rtl-content.page-node-type-news .headline,
body.lang-rtl-content.page-node-type-news .bullet-strip,
body.lang-rtl-content.page-node-type-news .blockquote-template,
body.lang-rtl-content.page-node-type-news .panel-body,
body.lang-rtl-content.page-node-type-news .tint-text {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

body.lang-rtl-content.page-node-type-news .page-title,
body.lang-rtl-content.page-node-type-news .date-holder,
body.lang-rtl-content.page-node-type-news .foot-titles,
body.lang-rtl-content.page-node-type-news .upper-title-description,
body.lang-rtl-content.page-node-type-news .additional-information .col-first > div,
body.lang-rtl-content.page-node-type-news .additional-information .notes-to-editors > div {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

body.lang-rtl-content.page-node-type-news .container.wysiwyg {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

body.lang-rtl-content.page-node-type-news .blockquote-template :is(.text-center, .central-quote-titles) {
  text-align: right;
}

body.lang-rtl-content.page-node-type-news .bullet-strip ul {
  direction: rtl;
  padding-inline-start: 40px;
  padding-inline-end: 0;
}

body.lang-rtl-content .strip-body-copy :is(p, li, h1, h2, h3, h4, h5, h6, blockquote),
body.lang-rtl-content .text-area-with-editor :is(p, li, h1, h2, h3, h4, h5, h6, blockquote) {
  unicode-bidi: plaintext;
}

body.lang-rtl-content .tint-text i.jlrnew-arrow_right {
  display: inline-block;
  transform: scaleX(-1);
}

/*
 * JLRMED-1047 follow-up — image-overlay / inset-text strips on feature_article,
 * page, image_packs, video_pack. The narrow news-only scope above leaves these
 * strips LTR. Targets the text wrapper inside the inset card, not the strip's
 * structural columns (image stays on the original side).
 */
body.lang-rtl-content .image-with-inset-text .inset-text-box .panel-body,
body.lang-rtl-content .image-with-inset-text .inset-text-box .panel-body :is(h1, h2, h3, h4, h5, h6, p, div, li),
body.lang-rtl-content .big-image-left .panel-box .panel-body,
body.lang-rtl-content .big-image-right .panel-box .panel-body,
body.lang-rtl-content .impact-full .tint-block,
body.lang-rtl-content .impact-half .tint-block,
body.lang-rtl-content .impact-full .tint-block :is(h1, h2, h3, h4, h5, h6, p),
body.lang-rtl-content .impact-half .tint-block :is(h1, h2, h3, h4, h5, h6, p),
body.lang-rtl-content .hero-image-strip .hero-text-box,
body.lang-rtl-content .hero-image-strip .hero-text-box :is(h1, h2, h3, h4, h5, h6, p) {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}
