/**
 * MynoxMC Sell by Weight — Frontend stylesheet
 * Loaded only on WooCommerce pages (shop, single product, cart, checkout, account).
 *
 * Uses exclusively logical CSS properties so RTL (fa_IR) works automatically.
 * No [dir="rtl"] override blocks are needed.
 *
 * Version: 1.0.0
 */

/* ── Unit label (inline, after quantity input) ────────────────────────── */

.mynoxmc-sbw-unit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-inline-start: 0.45em;
	margin-inline-end: 0;
	padding: 0.2em 0.6em;
	font-size: 0.82em;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: #3c434a;
	background: #f6f7f7;
	border: 1px solid #dfe1e6;
	border-radius: 4px;
	line-height: 1.45;
	vertical-align: middle;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	box-sizing: border-box;
	white-space: nowrap;
}

/* ── Price unit suffix (inline, after price) ──────────────────────────── */

.mynoxmc-sbw-price-unit {
	display: inline;
	margin-inline-start: 0.15em;
	margin-inline-end: 0;
	font-size: 0.8em;
	font-weight: 400;
	color: #68717a;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

/* ── Accessibility: respect reduced-motion preference ─────────────────── */

@media (prefers-reduced-motion: reduce) {
	.mynoxmc-sbw-unit,
	.mynoxmc-sbw-price-unit {
		transition: none;
	}
}

/* ── High-contrast mode support ───────────────────────────────────────── */

@media (forced-colors: active) {
	.mynoxmc-sbw-unit {
		border: 1px solid ButtonText;
		color: ButtonText;
		background: Canvas;
	}

	.mynoxmc-sbw-price-unit {
		color: ButtonText;
	}
}
