/* Localized homepage and pricing (#513). Only the locale pages load it; the English pages ship none of it. */

/* Arabic-first system fonts, as on the Arabic article (#503). Letter-spacing pulls joined Arabic
   letters apart, and a tight heading line-height clips the marks above and below the line. */
html:lang(ar) {
    --locale-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", Arial, sans-serif;
}
.upload-first:lang(ar) { --uf-display: var(--locale-font); --uf-body: var(--locale-font); }
html:lang(ar) body:not(.upload-first) { font-family: var(--locale-font); }
html:lang(ar) body * { letter-spacing: 0 !important; }
html:lang(ar) :is(h1, h2, h3) { line-height: 1.35; }

/* Time runs left to right in every locale: players, the trim strip, its times and steppers, progress bars. */
[dir=rtl] :is(video, progress, .uf-trim-track, .uf-trim-times, .uf-trim-controls, .uf-meter) { direction: ltr; }
[dir=rtl] :is(.uf-trim-actions, .uf-trim-field > label, .uf-meter p) { direction: rtl; }
[dir=rtl] .uf-preview-badge { unicode-bidi: plaintext; }

/* Links, file sizes and video lengths are Latin text: "956 KB", not "KB 956". */
[dir=rtl] #uf-link-url { direction: ltr; }
[dir=rtl] :is(.uf-file-list em, .uf-mock-drop small, .uf-formats li, #uf-file-info, #uf-filename) { unicode-bidi: plaintext; }
/* The sign-in button stays on one line at 375 px. */
[dir=rtl] .uf-signin { white-space: nowrap; }

/* Arrows point the way the page reads. */
[dir=rtl] #uf-translate svg { transform: scaleX(-1); }
[dir=rtl] .uf-advanced summary::after { transform: rotate(135deg); }
[dir=rtl] .uf-advanced[open] summary::after { transform: rotate(45deg); }

.uf-locale-note { max-width: 640px; margin: 14px auto 0; color: var(--uf-muted); font-size: 14px; line-height: 1.6; text-align: center; }
