/**
 * Navard theme — RTL-specific overrides.
 *
 * Loaded only when is_rtl() returns true. The body has direction:rtl in
 * frontend.css already; this file handles cases where the LTR assumptions
 * baked into blocks need adjustment.
 *
 * @package Navard
 */

/* Logical-property safety net: a few WordPress/woocommerce outputs still use
   physical properties. We pin them to the correct logical side here. */
.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
	text-align: start;
}

.woocommerce ul.products li.product .price {
	text-align: start;
}

/* Star ratings are LTR by default; flip for RTL display. */
.woocommerce .star-rating {
	float: inline-end;
}

/* Numeric prices should display LTR for clarity, even in RTL context. */
.woocommerce-Price-amount,
.navard-cta-phone,
.navard-topbar-phone-number {
	direction: ltr;
	unicode-bidi: embed;
}

/* Mega menu links should keep icon on the inline-start side. */
.navard-mega-link {
	flex-direction: row;
}

/* Hero arrows: in RTL, "previous" should point to the left visually, which is
   the inline-end in RTL. We keep "prev" with the inset-inline-end positioning
   so the icon glyph (‹) faces the right direction. */
.navard-hero-prev,
.navard-slider-prev {
	transform: translateY(-50%) scaleX(-1);
}

.navard-hero-next,
.navard-slider-next {
	transform: translateY(-50%) scaleX(-1);
}

/* Floating buttons: keep icon direction stable; icons are already
   direction-neutral but text labels (if any) should be RTL. */
.navard-floating-btn {
	direction: rtl;
}

/* Tables in price tabs: ensure column alignment matches RTL reading. */
.navard-tabpanel table {
	direction: rtl;
}

.navard-tabpanel table th,
.navard-tabpanel table td {
	text-align: start;
}

/* Search form: button should sit at the inline-end in RTL. Default flex order
   is fine; the visual "end" is the left in RTL, which is correct. */

/* Form inputs: keep numerals LTR for phone numbers but text RTL. */
input[type="tel"],
input[type="number"],
input[type="email"] {
	direction: ltr;
	text-align: start;
}

input[type="text"],
input[type="search"],
input[type="password"],
select,
textarea {
	direction: rtl;
	text-align: start;
}

/* Numerical content in CTA phone: keep LTR. */
.navard-cta-phone span:last-child {
	direction: ltr;
	display: inline-block;
}
