/*
Theme Name: farajatna

RTL overrides. WordPress core loads this file automatically after the main
stylesheets when the site language is right-to-left (Arabic, Hebrew,
Persian, Urdu …).

Most of the layout already mirrors itself because the theme uses CSS
logical properties (margin-inline-start, inset-inline-end, text-align:
start, border-inline-start …) and transforms are multiplied by --fj-dir
(-1 in RTL). This file only contains what logical properties cannot express.

What is deliberately NOT mirrored:
- brand logos (Facebook, X, WhatsApp, Telegram …) and the site logo;
- media controls (play/pause keep the tape direction);
- the clock, search, mail, link and calendar icons;
- code blocks, URLs and e-mail addresses (always left-to-right text);
- WordPress alignleft/alignright images (physical by definition; the
  margins in style.css already face the text in both directions).
*/

/* 1. Icons that point in the reading direction (next/previous, "view all",
      breadcrumb separators). */
[dir="rtl"] .icon--directional {
	transform: scaleX(-1);
}

/* 2. Left-to-right inputs (e-mail, URLs) keep LTR typing but align with the
      right-to-left layout around them. */
[dir="rtl"] input[dir="ltr"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="url"] {
	text-align: right;
}

[dir="rtl"] input[dir="ltr"]::placeholder {
	direction: rtl;
}

/* 3. Arabic-script and Hebrew have no true italics; synthetic slanting is
      hard to read, so emphasis uses weight instead. */
[dir="rtl"] em,
[dir="rtl"] i,
[dir="rtl"] cite,
[dir="rtl"] dfn,
[dir="rtl"] .comment-awaiting-moderation {
	font-style: normal;
}

[dir="rtl"] em,
[dir="rtl"] i {
	font-weight: 700;
}

/* Latin passages inside RTL pages keep their italics. */
[dir="rtl"] :lang(en) em,
[dir="rtl"] :lang(en) i,
[dir="rtl"] em:lang(en),
[dir="rtl"] i:lang(en) {
	font-style: italic;
	font-weight: inherit;
}

/* 4. Underlines clear the dots below Arabic letters. */
[dir="rtl"] a {
	text-underline-offset: 0.35em;
}

/* 5. Arabic script has no letter case and must never be letter-spaced. */
[dir="rtl"] .cat-label,
[dir="rtl"] .breaking-news__label,
[dir="rtl"] .archive-header__kicker,
[dir="rtl"] .author-box__kicker,
[dir="rtl"] .post-nav__label,
[dir="rtl"] .zed-ad__label {
	letter-spacing: normal;
	text-transform: none;
}

/* 6. Slightly taller headings for stacked Arabic diacritics. */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .card__title {
	line-height: 1.45;
}

/* 7. Code is always left-to-right. */
[dir="rtl"] pre,
[dir="rtl"] code,
[dir="rtl"] kbd,
[dir="rtl"] .wp-block-code {
	direction: ltr;
	unicode-bidi: isolate;
}

[dir="rtl"] pre,
[dir="rtl"] .wp-block-code {
	text-align: left;
}
