/* RTL Overrides for Urdu */

html[dir="rtl"] {
    font-family: var(--font-ur);
}

/* Ensure data-i18n items use Nastaliq in RTL mode */
html[dir="rtl"] [data-i18n] {
    font-family: var(--font-ur);
}

/* Specific elements where spacing needs adjustment for RTL */

html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-subtitle,
html[dir="rtl"] .btn-start,
html[dir="rtl"] .isp-display,
html[dir="rtl"] .test-phase,
html[dir="rtl"] .result-label,
html[dir="rtl"] .btn-restart,
html[dir="rtl"] .section-title,
html[dir="rtl"] .feedback-summary,
html[dir="rtl"] .activity-name,
html[dir="rtl"] .share-btn-text,
html[dir="rtl"] .newsletter-title,
html[dir="rtl"] .newsletter-subtitle,
html[dir="rtl"] .newsletter-btn,
html[dir="rtl"] .data-notice,
html[dir="rtl"] .footer-brand,
html[dir="rtl"] .footer-links a,
html[dir="rtl"] .footer-mission {
    font-family: var(--font-ur);
    line-height: 1.8;
    /* Nastaliq needs more line height */
}

/* Any specific flexbox direction flips that aren't handled natively */
html[dir="rtl"] .activity-row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .activity-name {
    text-align: right;
}

html[dir="rtl"] .isp-client-label {
    margin-right: 0;
    margin-left: 0.75rem;
}

html[dir="rtl"] .isp-ip {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* Keep numbers and units consistently LTR */
.result-value,
.result-unit,
.gauge-speed-text,
.gauge-unit-text,
.isp-name,
.isp-city,
.isp-type-badge {
    direction: ltr;
    unicode-bidi: isolate;
}