/*
 * Arabic (right-to-left) exceptions. The mirrored layout itself comes from the generated *-rtl.css
 * files (scripts/build-rtl.sh); this file holds what a mechanical flip cannot decide.
 */

/* Arabic letters join; any tracking breaks the joins. Uppercase has no meaning in Arabic. */
html[dir=rtl] body *{letter-spacing:0!important}
html[dir=rtl] .eyebrow,html[dir=rtl] .pd-label,html[dir=rtl] .bp-sector,html[dir=rtl] .panel-sector,html[dir=rtl] .lc-label{text-transform:none}

/* Kufi and Naskh need more room above and below the line than Anton and DM Sans. Their glyph size is matched to
   the Latin faces in fonts.css (size-adjust), so the Latin font sizes apply unchanged. */
html[lang|=ar] h1,html[lang|=ar] h2,html[lang|=ar] h3{line-height:1.3}
html[lang|=ar] .journey-copy h1,html[lang|=ar] .journey-copy h2{line-height:1.25}
/* Uppercase tracked labels read at 10–11px in Latin; untracked Arabic needs a step up to carry the same weight. */
html[lang|=ar] .eyebrow{font-size:13px}
html[lang|=ar] .serif{line-height:1.85}
html[lang|=ar] body{line-height:1.7}

/* Arrows point the way the text reads. `scale` composes with the hover `transform`. */
html[dir=rtl] .text-link svg,html[dir=rtl] .button svg,html[dir=rtl] .process-more svg,html[dir=rtl] .process-card-cta svg,html[dir=rtl] .bp-other-meta svg{scale:-1 1}

/* Latin-script values keep their own order inside Arabic text. */
html[dir=rtl] .contact-phones a,html[dir=rtl] .footer-grid a[href^="tel:"],html[dir=rtl] .pd-mono{direction:ltr;unicode-bidi:isolate}
html[dir=rtl] .footer-grid a[href^="tel:"]{justify-content:flex-end}

/* Values typed in Latin script ("50 ml, 100 ml, 1 L") take their direction from their own text, so a
   leading number stays in front; alignment stays on the right with the rest of the page. */
html[dir=rtl] dd,html[dir=rtl] td,html[dir=rtl] .pd-codes li,html[dir=rtl] .pd-card .pd-mono{unicode-bidi:plaintext;text-align:right}

/* ===== Arabic RTL fixes (Nov 2026) =====
   Arabic pages only (html[lang="ar"]); this file is loaded on RTL pages only. */

/* L1. Headings clipped at the bottom: Arabic needs more line-height than the Latin display font (Anton). */
html[lang="ar"] :is(h1,h2,h3,h4){line-height:1.4!important;padding-block:.06em;overflow:visible}

/* L2. Contact page: phone numbers sat on the far left (display:block + direction:ltr). Align right like the labels;
   the numbers still read left-to-right. */
html[lang="ar"] .contact-phones a{text-align:right}

/* L4. Product pages: CAS / supplier lines were forced LTR in monospace, which scrambled the Arabic
   ("المورّد: Tagros", "ETOC® من Sumitomo"). Right-to-left base, Latin codes keep their own order. */
html[lang="ar"] .pd-card .pd-mono{direction:rtl;unicode-bidi:isolate;text-align:right;font-family:inherit}

/* L7. Mobile menu open: on dark heroes the header stayed transparent, so the dark X, logo and language switcher vanished.
   Same light background as the open menu panel (--mint). */
html[lang="ar"] .site-header.menu-open{background:var(--mint)}

/* L9. Arabic text at 8–11px is unreadable on phones: buttons at least 13px, labels and captions at least 12px. */
html[lang="ar"] .button{font-size:13px}
html[lang="ar"] :is(.micro-label,.scroll-cue,.panel-sector,.product-caption,.product-caption span,.status-pill,.dev-notice-tag,.dev-flag,.dev-pill,
  .pp-stats span,.globe-kicker,.about-editorial-photo figcaption,.form-note,.inquiry-form label,.bp-sector,.bp-crumbs,.pd-crumbs,
  .pd-facts dt,.pd-table thead th,.pd-caption,.pd-label,.pd-label span,.pd-cmr-status,.pd-kind,.bp-kind,.lc-label,.lc-environment,.lc-time,
  .lc-cue,.lc-treatment-label,.footer-social a){font-size:12px}
html[lang="ar"] .footer-grid>div>a,html[lang="ar"] .footer-grid>div>h2{font-size:12px}
