/**
 * Terms page – RTL and mixed text direction
 * Keeps Persian content RTL and preserves correct word order when Persian
 * is mixed with English terms (e.g. HTTPS, HTTPS/TLS).
 */

.terms-content-rtl {
    direction: rtl !important;
    text-align: justify !important;
    text-align-last: right !important;
    unicode-bidi: embed;
}

.terms-content-rtl h4,
.terms-content-rtl h5,
.terms-content-rtl p,
.terms-content-rtl li,
.terms-content-rtl ul {
    direction: rtl !important;
    text-align: justify !important;
    text-align-last: right !important;
}

.terms-content-rtl ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

/* Inline LTR spans (e.g. HTTPS, TLS) keep correct order within RTL line */
.terms-content-rtl [dir="ltr"] {
    direction: ltr !important;
    unicode-bidi: embed;
}

/* Ensure strong/em inside RTL block inherit direction */
.terms-content-rtl strong,
.terms-content-rtl em {
    unicode-bidi: inherit;
}
