/*
 * ShopOS RTL overrides. Loaded only when is_rtl() is true.
 *
 * Primitive classes in shopos.css use logical properties (margin-inline-*,
 * padding-inline-*, border-inline-*) so they flip automatically. This file
 * handles the remaining handful of exceptions plus icon mirroring.
 */

.shopos-rtl {
    direction: rtl;
    text-align: right;
    /* Hebrew display lines need slightly more breathing room than Latin at
       the same size (§6.3). */
    --shopos-ui-leading-flat: 1.1;
    --shopos-ui-leading-tight: 1.2;
}

/* Container + stack helpers are already logical. Keep block for future use. */
.shopos-rtl .shopos-ui-container {
    /* intentional no-op — here for IDE discoverability. */
}

/* Buttons with trailing icons: mirror glyph direction. */
.shopos-rtl .shopos-ui-btn .dashicons-external,
.shopos-rtl .shopos-ui-btn .dashicons-arrow-right-alt,
.shopos-rtl .dashicons-external {
    transform: scaleX(-1);
}

/* Never track a Hebrew heading — the display's Latin −0.02em is zeroed. */
.shopos-rtl .shopos-ui-display,
.shopos-rtl h1.is-display {
    letter-spacing: 0;
}

/* Cards: no physical-direction values used, but inherit text-align:right. */
.shopos-rtl .shopos-ui-card__body {
    text-align: right;
}

/* v3: the label voice is symmetric across scripts (§6.3) — sentence case,
   600, zero tracking, same size — so the v2 Hebrew Label Voice block
   (size-step + word-spacing + uppercase strips for the primitives) is gone,
   and so are the cart/account table-head strips that undid uppercase for
   Hebrew: no template stylesheet sets it any more. */

/* Input icons pinned with positioning (swatches etc.) need flipping. */
.shopos-rtl .shopos-ui-input--icon-end {
    padding-left: var(--shopos-ui-input-padding-x);
    padding-right: calc(var(--shopos-ui-input-padding-x) + 20px);
}

/* Skeleton shimmer direction should follow reading flow. */
.shopos-rtl .shopos-ui-skeleton {
    animation-direction: reverse;
}
