/* script.css (chat 37): type rules for the scripts of the five service languages, loaded after site.css (and rtl.css for Arabic).
   System fonts first: every phone already carries Arabic, Devanagari and Han faces, so no web font is needed for speed.
   Fraunces and Sen carry Latin only; Indonesian and Catalan keep the English type unchanged. */

/* Arabic: never letter-space or uppercase (it breaks the joining); a little more line height for the marks; no italics */
:lang(ar) { --f-ar: "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; }
:lang(ar) body, :lang(ar) button, :lang(ar) input { font-family: var(--f-ar); }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { font-family: var(--f-ar); font-weight: 700; line-height: 1.35; }
:lang(ar) p, :lang(ar) li { line-height: 1.8; }

/* Hindi (Devanagari): taller line box for the headline bar and matras; no letter-spacing; Latin title shown beside (see DESIGN.md) */
:lang(hi) { --f-hi: "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", sans-serif; }
:lang(hi) body, :lang(hi) button, :lang(hi) input { font-family: var(--f-hi); }
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3 { font-family: "Noto Serif Devanagari", var(--f-hi); line-height: 1.4; }
:lang(hi) p, :lang(hi) li { line-height: 1.75; }
:lang(hi) .lat { font-family: Sen, system-ui, sans-serif; font-size: .82em; color: var(--ink-2, #5b5b6b); }

/* Chinese (Simplified): no italics, no letter-spacing, no uppercase; slightly larger body for Han legibility */
:lang(zh-CN) { --f-zh: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
:lang(zh-CN) body, :lang(zh-CN) button, :lang(zh-CN) input { font-family: var(--f-zh); }
:lang(zh-CN) h1, :lang(zh-CN) h2, :lang(zh-CN) h3 { font-family: "Noto Serif SC", "Songti SC", var(--f-zh); line-height: 1.4; }
:lang(zh-CN) p, :lang(zh-CN) li { line-height: 1.8; font-size: 1.04em; }

/* All three: the English kickers are uppercase and letter-spaced; neither exists in these scripts */
:lang(ar) *, :lang(hi) *, :lang(zh-CN) * { letter-spacing: 0 !important; text-transform: none !important; }
:lang(ar) em, :lang(ar) i, :lang(zh-CN) em, :lang(zh-CN) i, :lang(hi) em, :lang(hi) i { font-style: normal; font-weight: 600; }

/* Prices and numbers stay Western digits and left-to-right inside Arabic text (as Shopify's Arabic checkout shows them) */
:lang(ar) .price, :lang(ar) bdi.num { unicode-bidi: isolate; direction: ltr; }

/* Mirror fixes the generator cannot know: icons that point (arrows, chevrons) and corner buttons placed with inset */
[dir="rtl"] .arr, [dir="rtl"] .chev { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arr { transform: scaleX(-1) translateX(3px); }   /* after rtl.css: keeps the flip on hover */

/* Judge round 0 (28 Oct 12:30 CET; gpt-6.1-sol 7.0, gpt-6-astra 7.2; no P0) */
/* P1 astra: the marquee cover row (.mq-track) animates translateX to the left; under dir=rtl its start sits at the right edge and the loop exposes empty gaps. The track keeps LTR geometry (covers have no reading direction). */
[dir="rtl"] .mq, [dir="rtl"] .h12-mqbox, [dir="rtl"] .h12-wall { direction: ltr; }   /* the wrapper, not the track: the track inside an RTL box lost its covers (render r1) */
/* P2 both: forward arrows point the reading direction */
[dir="rtl"] .arr-t { display: inline-block; transform: scaleX(-1); }
/* P1 sol: the Trustpilot strip (tp17/tb17/cp-tp) must stay inside the gutter in every script: let it wrap as a group */
:lang(ar) .tb17-tp, :lang(hi) .tb17-tp, :lang(zh-CN) .tb17-tp, :lang(ar) .cp-tp, :lang(hi) .cp-tp, :lang(zh-CN) .cp-tp, :lang(ar) .tp-badge, :lang(hi) .tp-badge, :lang(zh-CN) .tp-badge { flex-wrap: wrap; row-gap: 4px; max-width: 100%; }
/* P2 both: the smallest Arabic and Devanagari labels read at 13 px at least */
:lang(ar) small, :lang(ar) .kick, :lang(ar) .meta, :lang(hi) small, :lang(hi) .kick, :lang(hi) .meta { font-size: max(13px, 1em); }
/* P1 both: number groups (ratings, durations, counts) are isolated by the build in <bdi dir="ltr"> (package LANG5-1, FIX 1); this keeps them on one line */
bdi[dir="ltr"] { unicode-bidi: isolate; white-space: nowrap; }

/* L8-LANG5 (28 Oct): longer words in these languages never push a page wider than the screen (measured 375: ca 417, hi 483 px before) */
body[data-lang5] .btn { max-width: 100%; white-space: normal; text-align: center; }
body[data-lang5] .nb { white-space: normal; }
body[data-lang5] .xm20 *, body[data-lang5] .bs16-item * { min-width: 0; overflow-wrap: anywhere; }
