/* Arabic (RTL) layer for the Octopus Networks theme.
   Loaded only on pages marked as Arabic. Keep every rule scoped to .on-rtl so the
   English side is never touched. */

.on-rtl {
	direction: rtl;
	text-align: right;
	/* System Arabic stack first; the theme's Latin stack stays as fallback. */
	font-family: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Arial, sans-serif;
	/* Arabic needs more leading than the Latin setting. */
	line-height: 1.85;
}

.on-rtl :where(h1, h2, h3, h4, h5, h6) {
	line-height: 1.38;      /* the Latin 1.12 makes Arabic ascenders/descenders collide */
	letter-spacing: normal;  /* never tighten Arabic */
}

.on-rtl .on-kicker {
	letter-spacing: normal;
	text-transform: none;    /* Arabic has no uppercase; the transform only harms Latin words */
}

.on-rtl :where(ul, ol) {
	padding-right: 1.3em;
	padding-left: 0;
}

.on-rtl .wp-block-list,
.on-rtl .wp-block-post-excerpt,
.on-rtl p,
.on-rtl li {
	text-align: right;
}

/* Mirror the theme's directional decorations. */
.on-rtl .on-skip-link { left: auto; right: 1rem; }
.on-rtl .on-hero:before { right: auto; left: -12rem; }
.on-rtl .on-notice { border-left: 0; border-right: 4px solid #25d3c1; }
.on-rtl .on-whatsapp { right: auto; left: 1.25rem; }
.on-rtl .on-hp { left: auto !important; right: -10000px !important; }

/* Latin fragments inside Arabic text (Odoo, n8n, POS, numbers, emails). */
.on-rtl .on-ltr,
.on-rtl [dir="ltr"] { direction: ltr; text-align: left; unicode-bidi: isolate; }
.on-rtl .on-phone { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Forms: labels and inputs follow the reading direction, values that are always
   Latin (email, phone, numbers) stay LTR via dir="ltr" on the input itself. */
.on-rtl .on-form label,
.on-rtl .on-form p { text-align: right; }
.on-rtl .on-form__consent { flex-direction: row-reverse; justify-content: flex-end; gap: .5rem; }
.on-rtl .on-form input[dir="ltr"],
.on-rtl .on-form input[type="number"] { text-align: left; }
