/* Arabic is a connected script: Latin tracking breaks shaping on mobile Safari.
   Apply to Arabic pages and RTL fields in the otherwise English CRM. */
:root:not([data-jas-update-mode="crm"]) :is(:lang(ar), [dir="rtl"], [dir="rtl"] *) {
  letter-spacing: normal !important;
  word-spacing: normal !important;
}

:root:not([data-jas-update-mode="crm"]) :is(:lang(ar), [dir="rtl"], [dir="rtl"] *):is(body, h1, h2, h3, h4, h5, h6, p, a, button, label, input, textarea, select, option, dt, dd, li, td, th, strong, small, span[lang="ar"]) {
  font-family: 'Cairo', Tahoma, Arial, sans-serif !important;
}

/* Leave room for dots, vowel marks and descenders, even in wrapped headings. */
:root:not([data-jas-update-mode="crm"]) :is(:lang(ar), [dir="rtl"], [dir="rtl"] *):is(h1, h2, h3, h4, h5, h6) {
  line-height: 1.5 !important;
}

:root:not([data-jas-update-mode="crm"]) :is(:lang(ar), [dir="rtl"], [dir="rtl"] *):is(p, label, input, textarea, select, option, dt, dd, li, td, th, strong, small, button, a, span[lang="ar"]) {
  line-height: 1.65 !important;
}

/* Service labels must wrap within the card alongside the price and add icon. */
html:lang(ar) .service-card-content {
  min-width: 0;
}

html:lang(ar) .service-card-content strong {
  white-space: normal;
  overflow-wrap: break-word;
}

/* CRM Arabic data has its own scope; website language never styles CRM chrome. */
body.crm-page [lang="ar"],
body.crm-page [dir="rtl"],
body.crm-page [dir="rtl"] * {
  letter-spacing: normal !important;
  word-spacing: normal !important;
  font-family: 'Cairo', Tahoma, Arial, sans-serif !important;
  line-height: 1.65 !important;
}
