/* Mediora RTL polish — 2026-06-10
   Layered on top of the V2 base styles whenever `dir="rtl"` is active
   on a parent (Hebrew). Most V2 components already use logical
   properties (margin-inline-*, padding-inline-*); this file fixes
   the leftovers and the cases where physical directions sneak in
   through inline styles, transforms, or icons. */

/* ── Hebrew font stack ── */
:root {
    --v2-font-he: "Segoe UI", "Heebo", "Assistant", "Rubik", "Noto Sans Hebrew", "Arial Hebrew", sans-serif;
}
[dir="rtl"], [lang="he"] {
    font-family: var(--v2-font-he);
    font-feature-settings: "kern" 1, "liga" 1;
}

/* Numbers inside RTL paragraphs stay LTR (digits/dates/email/url) */
[dir="rtl"] .ltr-fix,
[dir="rtl"] time,
[dir="rtl"] [data-numeric],
[dir="rtl"] .v2-price-card__amount,
[dir="rtl"] .adminv2__north-val,
[dir="rtl"] .adminv2__tile-val,
/* P2-18/19 — North Star inputs строка (X · Y · Z цифры) + admin paginator */
[dir="rtl"] .adminv2__north-inputs-val,
[dir="rtl"] .adminv2-pager__current,
[dir="rtl"] .adminv2-pager__total,
[dir="rtl"] .adminv2-table .num,
[dir="rtl"] .reward-row__amount,
[dir="rtl"] .inbox-card__id,
[dir="rtl"] .inbox-card__amount,
[dir="rtl"] .ds-stat__value {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Hero CTA arrows flip in RTL (chevron-right → chevron-left visual) */
[dir="rtl"] .v2-hero__cta i.fa-arrow-right,
[dir="rtl"] .v2-hero__cta i.fa-chevron-right,
[dir="rtl"] .v2-btn i.fa-arrow-right,
[dir="rtl"] .dc-btn i.fa-arrow-right,
[dir="rtl"] .reward-row__article i.fa-arrow-right,
[dir="rtl"] .adminv2__card-cta i.fa-arrow-right,
[dir="rtl"] .dashv2__cta-band-btn i.fa-arrow-right,
[dir="rtl"] .hv2-card__chev,
[dir="rtl"] .alv2-card__cta i.fa-arrow-right,
[dir="rtl"] .pv2__hero a i.fa-arrow-right {
    transform: scaleX(-1);
}

/* Card chevrons (history list, articles list) flip */
[dir="rtl"] .hv2-card__chev i,
[dir="rtl"] .alv2-card__chev i,
[dir="rtl"] .report-card__chev i {
    transform: scaleX(-1);
}

/* SVG line charts: keep timeline reading left-to-right is correct for
   most use (time always reads chronologically), but in Hebrew the
   convention is right-to-left for reading order. Mirror the chart
   axis labels so 'today' lands on the left edge instead of right. */
[dir="rtl"] .v2-chart-card svg,
[dir="rtl"] .dynv2__svg {
    transform: scaleX(-1);
}
[dir="rtl"] .v2-chart-card svg text,
[dir="rtl"] .dynv2__svg text {
    transform: scaleX(-1);
    transform-origin: center;
}

/* Hero badge / eyebrow alignment — eyebrows are decorative tags */
[dir="rtl"] .v2-eyebrow,
[dir="rtl"] .adminv2__eyebrow,
[dir="rtl"] .ds-eyebrow {
    letter-spacing: 1.2px; /* tighter — Hebrew letters carry less spacing */
}

/* Footer link rows — wrap RTL properly */
[dir="rtl"] footer > div {
    direction: rtl;
}

/* Skip link slides in from the right in RTL */
[dir="rtl"] .mediora-skip-link {
    left: auto;
    right: -9999px;
}
[dir="rtl"] .mediora-skip-link:focus-visible {
    left: auto;
    right: 0;
    border-radius: 0 0 0 8px;
}

/* Mobile drawer slides in from the right in RTL (visual symmetry) */
[dir="rtl"] .mobile-drawer { left: auto; right: 0; }

/* MudBlazor outliers — push appbar logo to the right in RTL */
[dir="rtl"] .mud-appbar .mud-link img { margin-inline-start: 4px; }

/* Doctor cabinet card grids — ensure CTA arrow flips and amount stays LTR */
[dir="rtl"] .inbox-card__foot .dc-btn i { transform: scaleX(-1); }
[dir="rtl"] .dc-card__cta .dc-btn i    { transform: scaleX(-1); }

/* Pricing card 'most popular' badge in RTL should align right */
[dir="rtl"] .v2-price-card__badge {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Report risk-banner i.fa-triangle-exclamation never flips (symmetric) */

/* Hebrew-specific: tighter line-height for h1/h2 (Hebrew has no descenders
   the way Latin does, so 1.1 looks too airy in display sizes) */
[lang="he"] .v2-hero__title,
[lang="he"] .v2-section-title,
[lang="he"] .adv2__title,
[lang="he"] .pv2__hero h1,
[lang="he"] .alv2__head h1,
[lang="he"] .hv2__head h1,
[lang="he"] .dashv2__hero h1,
[lang="he"] .adminv2__head h1 {
    line-height: 1.18;
}
