/* ==========================================================================
   RTL overrides — loaded only when <html dir="rtl"> (Arabic / UAE market).
   The base layout uses flexbox + grid with `gap`, so switching `direction`
   mirrors most of the UI automatically; this file fixes the physical-property
   exceptions (absolute dropdowns, auto margins) and keeps numeric / Latin
   content left-to-right so prices, phones and codes stay readable.
   ========================================================================== */

body { direction: rtl; }

/* Inherently left-to-right content (money, stats, latin inputs, code, brand). */
.price-big, .pcard__price, .stat .v, .hero-stat b, .score-row .val,
.brand, .avatar, code,
input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], input[type="datetime-local"] {
  direction: ltr;
}
.price-big, .pcard__price, .stat .v, .loccard__meta { unicode-bidi: plaintext; }

/* Dropdown / mega panels: anchor to the right edge (were pinned left). */
.geo-pick__menu { left: auto; right: 0; }
.user-menu .geo-pick__menu { right: auto; left: 0; }
.mega { left: auto; right: 0; }

/* Header nav spacing (was a left margin). */
.nav { margin-left: 0; margin-right: 6px; }

/* Form controls read from the right; numeric/latin ones stay LTR but right-aligned. */
input, select, textarea { text-align: right; }
input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"] { text-align: right; }

/* Auto margins that pushed blocks to the left edge. */
.tot { margin-left: 0 !important; margin-right: auto; }

/* Tables and the dashboard sidebar follow the text direction. */
table th, table td { text-align: right; }
.dash-side, .dash-nav a, .dash-main { text-align: right; }

/* A couple of inline arrows point the other way in RTL. */
[dir="rtl"] .car { transform: scaleX(1); }
