/* PERSIAN_SCANNER_PRESENTATION_V1
   Display-only. No production JS, signal rules or access changes.
*/

/* Preserve the original English production column order. */
html[lang="fa-IR"] #currentTable,
html[lang="fa-IR"] #trackerTable {
    direction: ltr !important;
}

/* Persian headings read RTL inside their existing columns. */
html[lang="fa-IR"] #currentTable thead th,
html[lang="fa-IR"] #trackerTable thead th {
    direction: rtl;
    text-align: center;
    unicode-bidi: isolate;
}

/* Numbers, symbols and percentages remain LTR. */
html[lang="fa-IR"] #currentTable tbody td,
html[lang="fa-IR"] #trackerTable tbody td {
    direction: ltr;
}

/* Translate labels without reversing the entire table. */
html[lang="fa-IR"] :is(#currentTable,#trackerTable)
:is(.setup-pill,.clean,.warn,.detail-btn,.locked-signal) {
    unicode-bidi: isolate;
}

html[lang="fa-IR"] :is(#currentTable,#trackerTable) .locked-signal {
    direction: ltr;
    justify-content: center;
    flex-wrap: wrap;
}

html[lang="fa-IR"] :is(#currentTable,#trackerTable) .locked-signal
:is(b,span:not(.lock-icon),a) {
    direction: rtl;
    text-align: center;
}

/* Maintain readable Persian labels without modifying production widths. */
html[lang="fa-IR"] #trackerTable thead th {
    line-height: 1.6;
}

/* PERSIAN_SCANNER_PRESENTATION_V1_END */


/* PERSIAN_SCANNER_ALIGNMENT_V2
   Match English production table alignment.
   Keep Persian text and original LTR column order.
*/

html[lang="fa-IR"] #currentTable thead th,
html[lang="fa-IR"] #trackerTable thead th {
    text-align: left !important;
    direction: ltr !important;
}

/* First column: coin names and symbols aligned to production left edge. */
html[lang="fa-IR"] #currentTable th:first-child,
html[lang="fa-IR"] #currentTable td:first-child,
html[lang="fa-IR"] #trackerTable th:first-child,
html[lang="fa-IR"] #trackerTable td:first-child {
    text-align: left !important;
    direction: ltr !important;
}

/* Keep production-style left alignment for ordinary signal cells. */
html[lang="fa-IR"] #currentTable tbody td,
html[lang="fa-IR"] #trackerTable tbody td {
    text-align: left;
}

/* Do not change locked premium rows. */
html[lang="fa-IR"] :is(#currentTable,#trackerTable)
.locked-row td {
    text-align: inherit;
}

/* PERSIAN_SCANNER_ALIGNMENT_V2_END */


/* PERSIAN_MARKET_SUMMARY_DIRECTION_V2
   Keep financial signs to the left of numbers in RTL pages.
*/
html[lang="fa-IR"] #marketSummary .summary-card b {
    direction: ltr !important;
    unicode-bidi: isolate !important;
}

html[lang="fa-IR"] #marketSummary .summary-card span {
    direction: rtl;
    unicode-bidi: isolate;
}

/* PERSIAN_MARKET_SUMMARY_DIRECTION_V2_END */
