/**
 * SS Universal RTL Fix — scoped direction styles.
 *
 * Rules:
 *  - Scoped to .ss-rtl-scope only. Nothing outside the boundary is touched.
 *  - No !important. Theme and author styles keep winning.
 *  - No physical alignment (never text-align:right/left — 'start' only,
 *    and only on our explicit direction classes).
 *  - direction + unicode-bidi only; layout direction is never changed.
 */

.ss-rtl-scope [dir="rtl"] {
	direction: rtl;
	unicode-bidi: isolate;
}

.ss-rtl-scope [dir="ltr"] {
	direction: ltr;
	unicode-bidi: isolate;
}

.ss-rtl-scope [dir="auto"] {
	unicode-bidi: isolate;
}

/* Explicit author/widget direction classes (Elementor prefix_class,
   Divi, WPBakery shortcodes) — 'start' respects the direction itself. */
.ss-rtl-scope .ss-direction-rtl {
	direction: rtl;
	unicode-bidi: isolate;
	text-align: start;
}

.ss-rtl-scope .ss-direction-ltr {
	direction: ltr;
	unicode-bidi: isolate;
	text-align: start;
}

.ss-rtl-scope bdi {
	unicode-bidi: isolate;
}

/* ACF field wrappers marked dir=rtl by the adapter — alignment follows
   direction; no inline styles injected onto ACF markup. */
.ss-rtl-field {
	unicode-bidi: isolate;
	text-align: start;
}

/* Form fields: direction comes from JS (dir=auto / dir=ltr); alignment
   follows start so placeholders and input text sit correctly. */
.ss-rtl-scope input[dir],
.ss-rtl-scope textarea[dir] {
	text-align: start;
}
