/**
 * Ataa — RTL-Specific Overrides
 *
 * These rules apply only when the document direction is RTL (Arabic default).
 * They override any LTR assumptions that may creep in from third-party plugins.
 *
 * Strategy: Arabic is the default direction. This file *reinforces* RTL and
 * corrects any LTR leaks from WP core, Elementor, GiveWP etc.
 *
 * @package Ataa
 */

/* ── Float direction corrections ── */
[dir="rtl"] .alignleft  { float: right; margin-left: var(--ataa-space-4); margin-right: 0; }
[dir="rtl"] .alignright { float: left;  margin-right: var(--ataa-space-4); margin-left: 0; }

/* ── Input/form text direction ── */
[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="number"],
[dir="rtl"] textarea,
[dir="rtl"] select {
	direction: rtl;
	text-align: right;
}

/* For LTR languages restore neutral direction on inputs */
html[lang="en"] input,
html[lang="fr"] input,
html[lang="es"] input,
html[lang="en"] textarea,
html[lang="fr"] textarea,
html[lang="es"] textarea {
	direction: ltr;
	text-align: left;
}

/* ── Flex/grid row direction ── */
[dir="rtl"] .ataa-flex-row {
	flex-direction: row-reverse;
}

/* ── Icon directional flip ── */
[dir="rtl"] .ataa-icon-dir {
	transform: scaleX(-1);
}

/* ── Nav arrow direction ── */
[dir="rtl"] .ataa-nav-arrow {
	transform: rotate(180deg);
}

/* ── Progress bar fill direction ── */
[dir="rtl"] .ataa-progress__fill {
	/* Progress fills still flow left-to-right visually — do not flip */
	/* Override only if a slider/UI element needs RTL direction */
}

/* ── Breadcrumb separator ── */
[dir="rtl"] .ataa-breadcrumb__sep::before {
	content: '/';
}

/* ── GiveWP form corrections ── */
[dir="rtl"] #give-form-wrap .give-donation-amount,
[dir="rtl"] .give-form .form-row input {
	direction: rtl;
	text-align: right;
}

[dir="rtl"] .give-form .give-currency-symbol {
	order: 1;
}

/* ── Elementor RTL corrections ── */
[dir="rtl"] .elementor-widget-image-box .elementor-image-box-content {
	text-align: right;
}

[dir="rtl"] .elementor-icon-list--layout-inline .elementor-icon-list-items {
	justify-content: flex-end;
}

/* ── Scroll margin for anchor links (accounts for sticky nav) ── */
[id] {
	scroll-margin-top: 90px;
}
