/* ===== Arabic (RTL) support for GuanJunLaiHua ===== */
/* Arabic webfonts (graceful fallback to system Arabic if offline) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;700&family=Cairo:wght@400;600;700&display=swap');

/* When the page is in Arabic, use an Arabic-friendly font stack */
[dir="rtl"] body,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea,
[dir="rtl"] .lang-btn {
  font-family: "Noto Naskh Arabic", "Cairo", "Segoe UI", Tahoma, "Geeza Pro", sans-serif;
}

/* Native RTL already flips reading order; a few explicit fixes */
[dir="rtl"] { text-align: right; }

/* HSK / CSCA exam countdown stays Left-To-Right even in Arabic mode
   (per request: the exam section is Chinese / English only) */
[dir="rtl"] .gjcd,
[dir="rtl"] .gjcd *,
[dir="rtl"] .cd-card,
[dir="rtl"] .cd-card * {
  direction: ltr;
  text-align: left;
}
/* But keep the card's own title/labels readable in Arabic context */
[dir="rtl"] .cd-card { text-align: left; }

/* Small spacing fixes where LTR icons/padding assume left anchoring */
[dir="rtl"] .lang-btn { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .tag,
[dir="rtl"] .badge { margin-right: 0; margin-left: 6px; }
