/*
 * RTL. Spec 13.1.
 *
 * This file is deliberately short, and that is the point. Everything else uses
 * logical properties, so almost nothing needs mirroring by hand. What remains is
 * only the things that genuinely cannot be expressed logically: glyph direction,
 * and content that must stay left to right inside a right to left page.
 */

/* Numerals inside Dari prose are Eastern Arabic, but times, prices and any
 * latin string must stay isolated so bidi does not reorder them. Spec 13.1. */
[dir="rtl"] :is(time, .nb-mode__price, .nbb__countdown, .nbb__slot-time, .nb-chip__time, code, .nb-certs__id) {
	direction: ltr;
	unicode-bidi: isolate;
}

/* Email addresses and URLs in RTL text. */
[dir="rtl"] a[href^="mailto:"],
[dir="rtl"] a[href^="http"] {
	unicode-bidi: isolate;
}

/* Directional glyphs. These are drawings, not text, so they mirror. */
[dir="rtl"] .nbb__nav,
[dir="rtl"] .nb-arrow {
	transform: scaleX(-1);
}

/* The details marker sits on the opposite side, but + and minus are symmetric
 * so only the flex direction matters, which the logical layout already handles. */

/* Cairo renders Arabic script slightly tighter than Latin, so Dari headings get
 * a fraction more leading to stay readable at display sizes. */
[dir="rtl"] :is(h1, .nb-hero__title) {
	line-height: 1.2;
	letter-spacing: 0;
}

[dir="rtl"] body {
	/* Diacritics and descenders in Arabic script need slightly more room. */
	line-height: 1.85;
}
