/*
 * Right-to-left corrections for Urdu.
 *
 * style.css is written with CSS logical properties (inset-inline-end,
 * padding-inline-start, margin-inline), so the layout already mirrors itself.
 * What remains here is only what cannot be expressed logically: physical floats
 * that the WordPress block editor emits into page content, gradient directions,
 * and the diagonal sheen on the hero, which would otherwise lean the wrong way.
 */

/* Block editor alignment classes are physical by definition and must swap. */
body.ksw-rtl .alignleft  { float: right; margin: 0 0 1rem 1.5rem; }
body.ksw-rtl .alignright { float: left;  margin: 0 1.5rem 1rem 0; }

/* The brushed-metal rule reads the same either way, but the hero sheen is
   directional — mirror its angle so the light falls consistently. */
body.ksw-rtl .ksw-hero::after {
	background:
		linear-gradient(245deg, rgba(255,255,255,.07) 0 12%, transparent 12% 24%,
		rgba(255,255,255,.05) 24% 30%, transparent 30%);
}

/* The active-page underline on navigation is a box-shadow, which is physical. */
body.ksw-rtl .ksw-nav-list .current-menu-item > a,
body.ksw-rtl .ksw-nav-list .current_page_item > a,
body.ksw-rtl .ksw-nav-list .ksw-current > a {
	box-shadow: inset 0 -3px 0 var(--navy-800);
}

/* Phone numbers, prices and URLs stay left-to-right inside Urdu sentences.
   Without this, "0300-3039293" renders as "3039293-0300". */
body.ksw-rtl .ksw-topbar-phones a,
body.ksw-rtl .ksw-cta-phones a,
body.ksw-rtl .ksw-contact-value a[href^="tel:"],
body.ksw-rtl .ksw-contact-value a[href^="mailto:"],
body.ksw-rtl .ksw-footer-list a[href^="tel:"] {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
}

/* Form controls: the text inside is Urdu, so the caret and placeholder belong
   on the right — but a phone number field stays LTR for the same reason above. */
body.ksw-rtl .ksw-field input,
body.ksw-rtl .ksw-field select,
body.ksw-rtl .ksw-field textarea { text-align: right; }

body.ksw-rtl .ksw-field input[type="tel"],
body.ksw-rtl .ksw-field input[type="email"],
body.ksw-rtl .ksw-field input[type="url"] {
	direction: ltr;
	text-align: left;
}

/* Lists indent from the correct edge. */
body.ksw-rtl ul,
body.ksw-rtl ol { padding-inline-start: 1.25em; padding-inline-end: 0; }

/* The breadcrumb separator arrow points the other way. */
body.ksw-rtl .ksw-breadcrumb .ksw-sep { transform: scaleX(-1); display: inline-block; }
