/*
 * BIG4 Assessment - right-to-left languages (Arabic, Urdu, Persian, Hebrew...).
 *
 * core.js sets dir="rtl" on .big4a-root when the visitor picks such a language, so these rules are
 * loaded on every page and apply only then. The layout itself mirrors through logical properties
 * (margin-inline, padding-inline, inset-inline...) in assessment.css; this file holds what does not.
 */

/* Arrows point the other way. */
:is(.big4a-root, #big4a)[dir='rtl'] .big4a-back__circle svg,
:is(.big4a-root, #big4a)[dir='rtl'] .big4a-btn__arrow svg,
:is(.big4a-root, #big4a)[dir='rtl'] .big4a-nav__btn svg {
	transform: scaleX(-1);
}

/* Letter spacing breaks the joined letters of Arabic-script languages. */
:is(.big4a-root, #big4a)[dir='rtl'] *,
:is(.big4a-root, #big4a)[dir='rtl'] *::before,
:is(.big4a-root, #big4a)[dir='rtl'] *::after {
	letter-spacing: 0 !important;
}

/* The brand fonts have no Arabic or Hebrew letters: name fonts that do, before the generic fallback. */
:is(.big4a-root, #big4a)[dir='rtl'] {
	--b4-heading: 'BIG4A Proxima', 'Proxima Nova', 'Segoe UI', Tahoma, 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Geeza Pro', Arial, sans-serif;
	--b4-body: 'Roboto', 'Segoe UI', Tahoma, 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Geeza Pro', Arial, sans-serif;
}

/* Arabic script has tall letters and dots below the line: a little more room between lines. */
:is(.big4a-root, #big4a)[dir='rtl'] p,
:is(.big4a-root, #big4a)[dir='rtl'] li {
	line-height: 1.75;
}

/* Hidden spam trap: off-screen on the side that does not create a horizontal scrollbar. */
:is(.big4a-root, #big4a)[dir='rtl'] .big4a-hp {
	left: auto !important;
	right: -9999px !important;
}

/* Email addresses, phone numbers and links are written left to right in every language. */
:is(.big4a-root, #big4a)[dir='rtl'] input[type='email'],
:is(.big4a-root, #big4a)[dir='rtl'] input[type='tel'],
:is(.big4a-root, #big4a)[dir='rtl'] input[type='url'] {
	direction: ltr;
	text-align: right;
}
