/* UI type: IBM Plex Sans Arabic for body + numbers, Alexandria for titles.
   Same stack in Arabic and English. Do not remap digits to Inter. */

html,
body,
.gm-app-type,
.font-sans,
[dir="rtl"],
[dir="rtl"] body,
[dir="ltr"],
[dir="ltr"] body,
html.lang-ar,
html.lang-ar body,
html.lang-en,
html.lang-en body {
  font-family: "IBM Plex Sans Arabic", Alexandria, "Segoe UI", Tahoma, sans-serif !important;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures contextual;
  letter-spacing: 0;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html h1,
html h2,
html h3,
.font-black,
.font-extrabold,
[class*="font-black"],
[class*="font-extrabold"],
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="ltr"] h1,
[dir="ltr"] h2,
[dir="ltr"] h3 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif !important;
  letter-spacing: 0;
  line-height: 1.28;
}

html h1,
[dir="rtl"] h1,
[dir="ltr"] h1 {
  font-weight: 800;
}

nav,
[data-sidebar],
[data-sidebar] button,
[data-sidebar] a,
button,
input,
select,
textarea,
[role="dialog"],
[role="menu"],
[role="tab"] {
  font-family: "IBM Plex Sans Arabic", Alexandria, sans-serif !important;
}

.font-mono,
.tabular-nums,
[class*="tabular-nums"],
input[type="number"],
input[type="tel"],
input[inputmode="numeric"],
input[inputmode="decimal"],
[data-ltr],
.order-details-identity {
  font-family: "IBM Plex Sans Arabic", Alexandria, ui-sans-serif, sans-serif !important;
  font-style: normal !important;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "kern" 1;
  font-kerning: normal;
  letter-spacing: 0 !important;
  font-weight: 600;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[dir="rtl"] [data-gm="customer-panel"] b,
[dir="rtl"] [data-gm="customer-panel"] .font-mono,
[dir="rtl"] [data-gm="journey"] .tabular-nums,
[dir="rtl"] [data-gm="journey"] [class*="tabular-nums"] {
  font-family: "IBM Plex Sans Arabic", Alexandria, sans-serif !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  letter-spacing: 0 !important;
}

[class*="text-2xl"],
[class*="text-3xl"],
[class*="text-4xl"],
.dashboard-home [class*="font-bold"],
.dashboard-home [class*="font-extrabold"] {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

table td,
table th {
  font-variant-numeric: tabular-nums lining-nums;
}

[dir="rtl"] .text-muted-foreground.font-mono,
[dir="rtl"] .text-muted-foreground.tabular-nums,
[dir="rtl"] .text-muted-foreground[class*="tabular-nums"] {
  opacity: 1;
}

html.dark [dir="rtl"] .text-muted-foreground.font-mono,
html.dark [dir="rtl"] .text-muted-foreground.tabular-nums,
html.dark [dir="rtl"] .text-muted-foreground[class*="tabular-nums"] {
  color: #cbd5e1;
}

[data-gm="journey"],
[dir="rtl"] [data-gm="journey"] {
  font-family: "IBM Plex Sans Arabic", Alexandria, sans-serif;
}

/* English app chrome: kill leftover Inter tracking and Inter stylistic sets. */
html.lang-en [class*="tracking-"],
html.lang-en .tracking-tight,
html.lang-en .tracking-wide {
  letter-spacing: 0 !important;
}

html:not(.welcome-document) #root,
html:not(.welcome-document) #root .font-sans {
  font-family: "IBM Plex Sans Arabic", Alexandria, "Segoe UI", Tahoma, sans-serif !important;
}
