/* RTL overrides for playstation5.css. The tiles and the console slide mirror through logical
   properties; only direction-specific type and latin runs need help here. */

/* Arabic runs taller than latin, so the two-line tile caption needs the extra room. */
[dir="rtl"] .ps5-intent strong { line-height: 1.4; }
[dir="rtl"] .ps5-intent strong + span { line-height: 1.5; }

/* "PSN", "PS Plus", "DualSense" and "EA SPORTS FC" stay left-to-right inside Arabic copy. */
[dir="rtl"] .ps5-intent strong,
[dir="rtl"] .ps5-about h3 { unicode-bidi: plaintext; }

/* The PS5 badge is always latin. */
[dir="rtl"] .ps5 .pcg-badge--platform { direction: ltr; }

/* The hero body is row-reverse on desktop, which mirrors by itself; the drop shadow and the
   copy-side gradient are the only things that need saying twice. */
@media (min-width: 768px) {
    [dir="rtl"] .ps5 .pcg-hero__backdrop::after {
        background:
            linear-gradient(to top, rgba(6, 12, 22, .95) 0%, rgba(6, 12, 22, .35) 60%, rgba(6, 12, 22, .1) 100%),
            linear-gradient(to left, rgba(6, 12, 22, .85) 0%, rgba(6, 12, 22, .45) 45%, transparent 75%);
    }
}

/* "From EGP 38,499" keeps its latin run intact inside Arabic copy. */
[dir="rtl"] .ps5-hero__from { unicode-bidi: plaintext; }

/* The mow stripes lean off-vertical, and which way "off" is depends on the reading direction:
   103deg leaning one way in English is 77deg leaning the same way relative to the reader in
   Arabic. The turf tile underneath is seamless and needs no mirroring. */
[dir="rtl"] .ps5-fc-band::after {
    background-image:
        radial-gradient(120% 100% at 50% 45%, transparent 45%, rgba(0,0,0,.55) 100%),
        repeating-linear-gradient(77deg,
            rgba(255,255,255,.08) 0 90px,
            rgba(0,0,0,.08) 90px 180px),
        radial-gradient(120% 80% at 50% -10%, rgba(255,255,255,.12), transparent 60%);
}

/* The theme 10 sweep travels with the reading direction; a gradient angle is physical, so in
   Arabic the highlight has to start on the right. The pre-order badge sweep is mirrored in
   list_product_themes.rtl.css, next to the badge it belongs to. */
[dir="rtl"] .ps5 .theme_10::before {
    background: linear-gradient(255deg, transparent 34%, rgba(255, 255, 255, .22) 50%, transparent 66%);
}

/* Latin hardware values ("8-core Zen 2, 3.5 GHz", "390 x 104 x 260") stay left-to-right
   inside the Arabic comparison. */
[dir="rtl"] .theme_9--static .theme_9_spec dd,
[dir="rtl"] .theme_9--static .theme_9_title { unicode-bidi: plaintext; }

/* The hero body is row-reverse in Arabic, so the console render sits on the LEFT. The bloom and
   the highlight follow it across, and the face buttons flip so they do not sit in the same
   corners twice. */
/* !important for the same reason as the LTR sheet: the div also carries .pcg-hero__backdrop,
   and the rules painting that class outrank this one. */
[dir="rtl"] .ps5-hero__stage {
    background:
        radial-gradient(60% 90% at 28% 50%, rgba(0,112,209,.55), transparent 65%),
        radial-gradient(90% 120% at 80% 10%, #123a6b 0%, transparent 60%),
        linear-gradient(200deg, #0b2a56 0%, #071c3a 55%, #050f22 100%) !important;
}

[dir="rtl"] .ps5-hero__stage::after {
    background: radial-gradient(55% 55% at 28% 45%, rgba(255,255,255,.20), transparent 70%) !important;
}

[dir="rtl"] .ps5-hero__shapes { transform: scaleX(-1); }
