/**
 * RTL pass for ar/he (stage 4).
 *
 * Loaded only when the active locale direction is rtl (see assets/index.php).
 * Body classes: .lang-ar / .lang-he / .lang-dir-rtl (LPDF_Seo::body_class).
 * Scope: flip direction + the handful of custom components that hard-code
 * left/right. Elementor's own layout already follows `direction`.
 */

body.lang-dir-rtl {
	direction: rtl;
	text-align: right;
}

/* Elementor site header/nav: keep flex rows but let direction flip them. */
body.lang-dir-rtl .elementor-nav-menu,
body.lang-dir-rtl .e-n-menu,
body.lang-dir-rtl .elementor-widget-nav-menu ul {
	direction: rtl;
}

/* Footer menu columns. */
body.lang-dir-rtl .elementor-widget-theme-site-footer ul,
body.lang-dir-rtl .menu {
	direction: rtl;
}

/* Upload box + instructions. */
body.lang-dir-rtl .upload-box,
body.lang-dir-rtl .pdf-instructions,
body.lang-dir-rtl .pi-list,
body.lang-dir-rtl .scroll-box,
body.lang-dir-rtl .form-box {
	direction: rtl;
	text-align: right;
}

body.lang-dir-rtl .pi-list,
body.lang-dir-rtl .pdf-instructions ul {
	padding-right: 1.2em;
	padding-left: 0;
}

/* Popups (Fancybox) and their close button. */
body.lang-dir-rtl .fancybox__container,
body.lang-dir-rtl .f-html,
body.lang-dir-rtl .form-box,
body.lang-dir-rtl .form-row {
	direction: rtl;
}

body.lang-dir-rtl .button-fb-close {
	right: auto;
	left: 10px;
}

/* Form inputs + labels. */
body.lang-dir-rtl input[type="text"],
body.lang-dir-rtl input[type="email"],
body.lang-dir-rtl input[type="password"],
body.lang-dir-rtl input[type="number"],
body.lang-dir-rtl textarea,
body.lang-dir-rtl select {
	direction: rtl;
	text-align: right;
}

body.lang-dir-rtl .popup-input,
body.lang-dir-rtl .form-note,
body.lang-dir-rtl .compliance {
	text-align: right;
}

/* Files table (dashboard). */
body.lang-dir-rtl .file-list,
body.lang-dir-rtl .file-row {
	direction: rtl;
	text-align: right;
}

/* ARMember blocks shown on localized pages. */
body.lang-dir-rtl .arm-default-form,
body.lang-dir-rtl .arm_module_box,
body.lang-dir-rtl .arm_membership_setup_form,
body.lang-dir-rtl .arm_module_plans_container {
	direction: rtl;
	text-align: right;
}

/* Checkout redesign (page 3813). */
body.lang-dir-rtl .lpdf-cr,
body.lang-dir-rtl [class*="checkout"] {
	direction: rtl;
}

/* FAQ accordions. */
body.lang-dir-rtl .faq-question,
body.lang-dir-rtl .faq-answer {
	text-align: right;
}

body.lang-dir-rtl .faq-icon {
	right: auto;
	left: 0;
}

/* ComPDF viewer chrome: the iframe app is LTR-only in the SDK; keep the
   container neutral so toolbars don't mirror-break. */
body.lang-dir-rtl #app,
body.lang-dir-rtl .compdf-webviewer,
body.lang-dir-rtl iframe[src*="webviewer"] {
	direction: ltr;
}

/* Status line under the viewer stays in the page language direction. */
body.lang-dir-rtl .status,
body.lang-dir-rtl [id^="compdf-status"] {
	direction: rtl;
	text-align: right;
}
