/*
 * People's Choice Awards — Fragrance Edition
 * Right-to-left corrections.
 *
 * Enqueued only when the site is reading Arabic. It is deliberately short:
 * public.css uses logical properties (margin-inline, padding-inline,
 * inset-inline, border-inline-start) everywhere, so almost everything mirrors on
 * its own. What is left here is what logical properties cannot express — fixed
 * gradient angles, a transform, and the direction islands that stop numbers
 * reordering.
 */

/* The hero slide overlay is a directional gradient: unmirrored, the dark end
   would sit under the empty side of the slide and the headline would be white
   text on a photograph. */
[dir='rtl'] .slide::before {
	background: linear-gradient(
		260deg,
		rgba(58, 15, 38, 0.94) 8%,
		rgba(126, 23, 71, 0.65) 52%,
		rgba(126, 23, 71, 0.2) 100%
	);
}

/* The slider track is moved by a transform in JavaScript, which has no logical
   equivalent; the sign flip itself is handled in public.js, and this only fixes
   the origin so the first slide starts flush against the right edge. */
[dir='rtl'] .slides-track {
	transform-origin: right center;
}

/*
 * Chevrons and arrow glyphs point the other way. `display: inline-block` is not
 * decoration: `transform` has no effect on a non-replaced inline element, and
 * these glyphs are authored as `<span>`, so without it the arrows kept pointing
 * the Latin way on the Arabic site while the link beside them went the other.
 */
[dir='rtl'] .pcfa-chevron,
[dir='rtl'] .arrow-glyph {
	display: inline-block;
	transform: scaleX(-1);
}

/*
 * Islands that must stay left-to-right inside Arabic text. A certificate code,
 * a running total, "3 / 12" and a Kuwaiti phone number all read the same in both
 * languages, and left to the paragraph's direction the digits and the leading
 * `+` or `/` reorder into nonsense.
 */
[dir='rtl'] .pcfa-code,
[dir='rtl'] .pcfa-tel,
[dir='rtl'] .pcfa-price,
[dir='rtl'] .pcfa-count,
[dir='rtl'] .pcfa-lightbox-counter,
[dir='rtl'] .stepper-count {
	direction: ltr;
	unicode-bidi: isolate;
}

/* The maroon accent bar is drawn with border-inline-start and mirrors on its
   own; the text alignment inside a mirrored heading does not. */
[dir='rtl'] .bi-row > .ar {
	text-align: start;
}

[dir='rtl'] .bi-row > .en {
	text-align: end;
}
