/**
 * RTL refinements loaded by WordPress only when is_rtl() is true.
 * Most layout rules use logical properties in the shared stylesheets; this
 * file handles document flow, mixed-direction content and third-party output.
 */
html {
	direction: rtl;
}

body {
	text-align: start;
}

/* Keep native and Elementor controls aligned with Persian reading flow. */
input:not([type="email"]):not([type="url"]):not([type="tel"]),
select,
textarea,
.elementor-field:not([type="email"]):not([type="url"]):not([type="tel"]) {
	direction: rtl;
	text-align: start;
}

/* Technical values retain a predictable LTR sequence inside RTL copy. */
input[type="email"],
input[type="url"],
input[type="tel"],
a[href^="mailto:"],
a[href^="tel:"],
code,
kbd,
samp,
pre,
.zd-ltr,
.zd-dashboard__line-chart,
.zd-dashboard__sparkline {
	direction: ltr;
	unicode-bidi: isolate;
}

input[type="email"],
input[type="url"],
input[type="tel"],
pre {
	text-align: left;
}

/* WordPress pagination follows Persian reading flow. */
.navigation.pagination .nav-links,
.page-links {
	direction: rtl;
}

.navigation.pagination .page-numbers,
.page-links .post-page-numbers,
.entry-date,
.error-code {
	unicode-bidi: isolate;
}

/* Preserve RTL when Elementor supplies the outer document locations. */
.elementor-location-header,
.elementor-location-footer,
.elementor-location-single,
.elementor-location-archive,
.zd-elementor-content {
	direction: rtl;
}

/* Keep Persian labels readable around fixed-direction chart primitives. */
.zd-dashboard,
.zd-dashboard__axis,
.zd-dashboard__legend,
.zd-dashboard__metric,
.zd-kpi {
	text-align: start;
}
