/**
 * Nexelyx — RTL overrides.
 *
 * The main stylesheet is written with logical properties (margin-inline,
 * inset-inline-start, padding-inline, text-align: start) so it serves both
 * directions unchanged. Only the handful of rules below cannot be expressed
 * logically and need a direction-aware override.
 *
 * @package Nexelyx
 */

/* Physical transforms in keyframes and the toast centring cannot use logical
   properties, so the horizontal translate is mirrored here. */
[dir="rtl"] .nx-toast {
	transform: translateX(50%);
}

@keyframes nx-toast-in-rtl {
	from {
		opacity: 0;
		transform: translate(50%, 10px);
	}

	to {
		opacity: 1;
		transform: translate(50%, 0);
	}
}

[dir="rtl"] .nx-toast {
	animation-name: nx-toast-in-rtl;
}

/* The drawer slides in from the inline-start edge; in RTL that is the right,
   which flex ordering handles, but the shadow direction must flip. */
[dir="rtl"] .nx-drawer {
	justify-content: flex-start;
}

[dir="ltr"] .nx-drawer {
	justify-content: flex-start;
}

/* WooCommerce ships `float: left` on the star-rating fill span. */
[dir="rtl"] .star-rating span {
	float: right;
}

/* Directional glyphs baked into copy: arrows in "View all →" and
   "← Continue shopping" must point the other way in Arabic. */
[dir="rtl"] .nx-arrow-forward {
	transform: scaleX(-1);
	display: inline-block;
}

[dir="rtl"] .nx-arrow-back {
	transform: scaleX(-1);
	display: inline-block;
}

/* Latin-script runs inside Arabic text (SKU codes, card numbers, IBANs,
   phone numbers) keep their own direction so digits do not reorder. */
[dir="rtl"] .nx-ltr-run {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
}

/* The range input has no logical-property equivalent for its fill direction. */
[dir="rtl"] .nx-range {
	transform: scaleX(-1);
}

[dir="rtl"] .nx-shipbar__fill {
	margin-inline-start: auto;
}

/* Arabic sits on a taller x-height; nudge the tight display sizes so the
   optical size matches Manrope at the same nominal px value. */
[dir="rtl"] .nx-hero__title,
[dir="rtl"] .nx-hero__slab,
[dir="rtl"] .nx-pdp__title,
[dir="rtl"] .nx-confirm__title {
	letter-spacing: 0;
	line-height: 1.25;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
	letter-spacing: 0;
}

[dir="rtl"] .nx-eyebrow,
[dir="rtl"] .nx-card-product__cat,
[dir="rtl"] .nx-hero__kicker,
[dir="rtl"] .nx-footer__coltitle,
[dir="rtl"] .nx-benefits__brand,
[dir="rtl"] .nx-about__kicker,
[dir="rtl"] .nx-tile__label,
[dir="rtl"] .nx-band__label {
	letter-spacing: 0;
}
