/* RTL CSS — text-level RTL only.
 * The dashboard layout stays LTR (sidebar left, content middle, panel right)
 * but text content inside elements is rendered RTL when lang=ar.
 * This way Arabic reads naturally right-to-left WITHOUT breaking the layout.
 */

/* Apply RTL to text containers ONLY, not layout containers */
html[lang="ar"] p,
html[lang="ar"] span,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] li,
html[lang="ar"] td,
html[lang="ar"] th,
html[lang="ar"] dd,
html[lang="ar"] dt,
html[lang="ar"] blockquote,
html[lang="ar"] label,
html[lang="ar"] legend,
html[lang="ar"] figcaption,
html[lang="ar"] caption,
html[lang="ar"] summary,
html[lang="ar"] textarea,
html[lang="ar"] input[type="text"],
html[lang="ar"] input[type="search"],
html[lang="ar"] input[type="email"],
html[lang="ar"] input[type="password"],
html[lang="ar"] [contenteditable="true"] {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

/* Buttons / links text content only — not the button itself */
html[lang="ar"] button > *,
html[lang="ar"] a > * {
  unicode-bidi: plaintext;
}

/* Better Arabic font + line-height (Arabic has tall diacritics) */
html[lang="ar"] {
  font-family: "Tajawal", "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif;
}

html[lang="ar"] body {
  line-height: 1.7;
}

/* Numbers stay LTR even in Arabic blocks */
html[lang="ar"] code,
html[lang="ar"] kbd,
html[lang="ar"] pre,
html[lang="ar"] [data-ltr="true"] {
  direction: ltr;
  unicode-bidi: embed;
}
