/* RTL overrides for playstation4.css.

   Almost everything in playstation4.css is written with logical properties (margin-block,
   padding-inline, border-inline-start), so it mirrors on its own. The diagonal edges, the
   theme 3 hero side and the theme 10 image side are mirrored by list_product_themes.rtl.css,
   which every page using those themes already loads. What is left here is the handful of
   things logical properties cannot express: physical gradient directions, latin runs inside
   Arabic copy, and the extra leading Arabic needs. */

/* The desktop hero body is row-reverse, which mirrors by itself; the gradient that lifts the
   copy is a physical direction and has to be said again. */
@media (min-width: 768px) {
    [dir="rtl"] .ps4 .pcg-hero__backdrop::after {
        background:
            linear-gradient(to top, rgba(12, 16, 24, .95) 0%, rgba(12, 16, 24, .35) 60%, rgba(12, 16, 24, .1) 100%),
            linear-gradient(to left, rgba(12, 16, 24, .88) 0%, rgba(12, 16, 24, .45) 45%, transparent 75%);
    }
}

/* The hero text scrim runs from the reading edge outwards. 90deg is a physical direction, so in
   Arabic it has to start on the right instead. */
[dir="rtl"] .ps4 .pcg-hero__text {
    background: linear-gradient(270deg, rgba(20, 22, 28, .92) 0%, rgba(20, 22, 28, .65) 45%, transparent 75%);
}

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

/* "PS4", "PS VR", "DualShock 4" and "EGP" keep their latin run intact inside Arabic copy. */
[dir="rtl"] .ps4-about h2,
[dir="rtl"] .ps4-about p { unicode-bidi: plaintext; }

/* Arabic runs taller than latin, so the closing copy needs the extra leading. */
[dir="rtl"] .ps4-about p {
    line-height: 1.85;
    max-width: 66ch;
}

/* Latin hardware values ("8-core Jaguar, 1.6 GHz", "4K (checkerboard)", "1.84 TFLOPS") 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; }
