/* WebcamTest.com — RTL overrides, used by /ar/.
   Everything is scoped under html[dir="rtl"], so loading this file on every
   page (including all LTR pages) is a harmless no-op. Modern flexbox/grid
   already mirror automatically once `direction` is set by the native
   dir="rtl" attribute; this file only patches the handful of rules that
   hard-code a physical left/right instead of a logical start/end. */

html[dir="rtl"]{direction:rtl;text-align:right}

html[dir="rtl"] .skip-link{left:auto;right:14px}

/* Dropdown menus (nav sections + language switcher) hang from the visual
   right in LTR; in RTL they should hang from the visual left so they don't
   run off the edge of the viewport. */
html[dir="rtl"] .nav-dropdown-menu,
html[dir="rtl"] .lang-menu{right:auto;left:0}

html[dir="rtl"] .lang-toggle .lang-chevron{transform:none}
html[dir="rtl"] .lang-switcher.is-open .lang-toggle .lang-chevron,
html[dir="rtl"] .lang-switcher:hover .lang-toggle .lang-chevron{transform:rotate(180deg)}

/* Metric value rows: label/value pairs read start-to-end, which flexbox
   already mirrors — this just keeps numerals themselves left-to-right
   (mixed number/unit strings like "1920x1080" or "30 fps" stay legible). */
html[dir="rtl"] .metrics-list .value,
html[dir="rtl"] .value,
html[dir="rtl"] .gauge-value,
html[dir="rtl"] .slider-val{unicode-bidi:isolate;direction:ltr;text-align:left}
html[dir="rtl"] .metrics-list li{text-align:right}

html[dir="rtl"] .search-input-row svg{transform:scaleX(-1)}

/* Checklist / kv rows: keep checkbox and numbered label on the visual
   right where a reader's eye starts in RTL. */
html[dir="rtl"] .checklist li{flex-direction:row-reverse;justify-content:flex-end;text-align:right}

/* Data table first column and footer columns already mirror via text-align
   inheritance from the html rule above; no extra rule needed. */
