/* Right-to-left UI languages (ar, fa, ur; lang/languages.json dir "rtl"): loaded by sw_ui_head_assets() after the page CSS.
   The pages mostly use flex / grid, which mirror on their own under <html dir="rtl">; this sheet fixes what does not. */
[dir="rtl"] a[href^="tel:"], [dir="rtl"] a[href^="mailto:"], [dir="rtl"] .header__phone,
[dir="rtl"] code, [dir="rtl"] kbd, [dir="rtl"] pre, [dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="tel"] {
    direction: ltr; unicode-bidi: isolate;
}
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="tel"] { text-align: right; }
/* "next" / "more" arrows point the reading direction */
[dir="rtl"] .listen-home__learn svg, [dir="rtl"] .seo-cta svg, [dir="rtl"] .btn svg.arrow, [dir="rtl"] .help-pager svg,
[dir="rtl"] .bible-nav__next svg, [dir="rtl"] .bible-nav__prev svg { transform: scaleX(-1); }
[dir="rtl"] .seo-breadcrumbs li + li::before { display: inline-block; transform: scaleX(-1); }
/* text that was pinned left */
[dir="rtl"] .legal, [dir="rtl"] .faq__answer, [dir="rtl"] .help-article, [dir="rtl"] .plan-card__inner { text-align: right; }
[dir="rtl"] ul, [dir="rtl"] ol { padding-right: 1.25em; padding-left: 0; }
[dir="rtl"] .header__nav ul, [dir="rtl"] .footer__links, [dir="rtl"] .sw-lang-menu__list, [dir="rtl"] .seo-breadcrumbs ol { padding-right: 0; }
/* Nastaliq (ur) and Naskh need taller lines; never clip descenders in buttons / chips */
[dir="rtl"] .btn, [dir="rtl"] .seo-badge, [dir="rtl"] .listener-btn, [dir="rtl"] .features-nav__chip { line-height: 1.6; }
html[lang="ur"] .btn, html[lang="ur"] .seo-badge, html[lang="ur"] .listener-btn { line-height: 2; padding-top: .35em; padding-bottom: .35em; }
/* each paragraph takes the direction of its own text: English church names, sermon titles and summaries (user content)
   inside a right-to-left page keep their punctuation where it belongs ("A safe place to grow!", not "!A safe place to grow") */
[dir="rtl"] p, [dir="rtl"] li, [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] td, [dir="rtl"] th,
[dir="rtl"] dd, [dir="rtl"] dt, [dir="rtl"] blockquote, [dir="rtl"] figcaption { unicode-bidi: plaintext; }
/* Nastaliq (ur) is tall: headings need much more line height than Latin, or the lines overlap */
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3, html[lang="ur"] h4 { line-height: 1.95; }
html[lang="ur"] p, html[lang="ur"] li { line-height: 2.1; }
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="ar"] h1, html[lang="ar"] h2 { line-height: 1.45; }
/* off-screen honeypots (left: -9999px) would widen a right-to-left page: hide them in place instead */
[dir="rtl"] .signup-hp, [dir="rtl"] .dir-hp, [dir="rtl"] .sw-acct__trap {
    left: auto !important; right: auto !important; clip-path: inset(50%); white-space: nowrap; opacity: 0;
}
