/*
 * MIRSAL brand layer for Chatwoot CE: token values and fonts only, no component styles.
 * Contract: docs/blueprint/DESIGN.md. Verify: node infra/scripts/check-contrast.mjs
 * Selectors are one step more specific than upstream (`:root`, and `.dark` on <body>), so load order does not matter.
 */

/* Arabic glyphs render in IBM Plex Sans Arabic under the existing Inter families; Latin and digits stay Inter. */
@font-face { font-family: 'Inter'; src: url('fonts/IBMPlexSansArabic-Regular.woff2') format('woff2'); font-weight: 100 449; font-display: swap; size-adjust: 106%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Inter'; src: url('fonts/IBMPlexSansArabic-Medium.woff2') format('woff2'); font-weight: 450 549; font-display: swap; size-adjust: 106%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Inter'; src: url('fonts/IBMPlexSansArabic-SemiBold.woff2') format('woff2'); font-weight: 550 649; font-display: swap; size-adjust: 106%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Inter'; src: url('fonts/IBMPlexSansArabic-Bold.woff2') format('woff2'); font-weight: 650 900; font-display: swap; size-adjust: 106%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'InterDisplay'; src: url('fonts/IBMPlexSansArabic-Regular.woff2') format('woff2'); font-weight: 100 449; font-display: swap; size-adjust: 106%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'InterDisplay'; src: url('fonts/IBMPlexSansArabic-Medium.woff2') format('woff2'); font-weight: 450 549; font-display: swap; size-adjust: 106%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'InterDisplay'; src: url('fonts/IBMPlexSansArabic-SemiBold.woff2') format('woff2'); font-weight: 550 649; font-display: swap; size-adjust: 106%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'InterDisplay'; src: url('fonts/IBMPlexSansArabic-Bold.woff2') format('woff2'); font-weight: 650 900; font-display: swap; size-adjust: 106%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

body { font-variant-numeric: tabular-nums; }

/* Brand scale replaces Chatwoot's `blue` (primary) scale; `n-brand` points at --blue-9 (theme/colors.js). */
html:root {
  --blue-1: 252 253 253;  /* #FCFDFD */
  --blue-2: 246 249 249;  /* #F6F9F9 */
  --blue-3: 237 243 242;  /* #EDF3F2 */
  --blue-4: 225 236 234;  /* #E1ECEA */
  --blue-5: 211 227 224;  /* #D3E3E0 */
  --blue-6: 193 216 212;  /* #C1D8D4 */
  --blue-7: 169 200 195;  /* #A9C8C3 */
  --blue-8: 136 180 172;  /* #88B4AC */
  --blue-9: 11 94 85;     /* #0B5E55 owner primary (light) */
  --blue-10: 1 82 74;     /* #01524A */
  --blue-11: 21 117 106;  /* #15756A */
  --blue-12: 14 53 48;    /* #0E3530 */

  /* Not used by Chatwoot; shared with Sidecar Dashboard Apps and mobile (DESIGN.md §2.3). */
  --ai-9: 21 94 158;          /* #155E9E */
  --ai-11: 21 94 158;         /* #155E9E */
  --accent-sand: 233 212 180;       /* #E9D4B4 backgrounds only, with text-primary */
  --accent-terracotta: 201 111 58;  /* #C96F3A fills/large text only on light */
}

body.dark {
  --blue-1: 10 19 16;     /* #0A1310 */
  --blue-2: 14 27 22;     /* #0E1B16 */
  --blue-3: 13 46 36;     /* #0D2E24 */
  --blue-4: 1 60 45;      /* #013C2D */
  --blue-5: 9 74 56;      /* #094A38 */
  --blue-6: 40 93 76;     /* #285D4C */
  --blue-7: 35 104 83;    /* #236853 */
  --blue-8: 40 123 99;    /* #287B63 */
  --blue-9: 4 128 99;     /* #048063 fill under white labels (owner #14A37F is 3.19:1 with white) */
  --blue-10: 2 134 103;   /* #028667 */
  --blue-11: 20 163 127;  /* #14A37F owner primary (dark), brand text */
  --blue-12: 202 238 224; /* #CAEEE0 */

  --ai-11: 71 139 207;    /* #478BCF */
}

/* Dark mode: brand text uses step 11; fills, borders and focus rings stay on step 9 (DESIGN.md §2.1). */
body.dark .text-n-brand,
body.dark .hover\:text-n-brand:hover,
body.dark .dark\:hover\:text-n-brand:hover,
body.dark .group:hover .group-hover\:text-n-brand,
body.dark .group:focus-within .group-focus-within\:text-n-brand,
body.dark .prose-a\:text-n-brand a,
body.dark .prose-strong\:text-n-brand strong {
  color: rgb(var(--blue-11) / var(--tw-text-opacity, 1));
}
