/* Colour palettes of Faol SMS (common\components\qd\Palette, webapp/src/palettes.ts).
   <html data-palette="..."> picks one (cookie "qd_palette", the same on the site and in the admin panel); <html class="dark">
   switches any of them to the night colours. Values are "R G B" triples so Tailwind can add opacity:
   rgb(var(--p) / 0.2). Used as is by the admin panel (common\assets\Theme) and imported by webapp/src/index.css.

   The four temperaments + black & white:
   - sanguine (default): ochre - warm dark yellow close to brown, sunny and sociable;
   - choleric: crimson - energetic, decisive;
   - melancholic: indigo - deep, thoughtful;
   - phlegmatic: emerald - calm, steady;
   - mono: black & white - strict, no colour at all.

   --p primary · --p-dark its deep tone · --p-light its pale tint · --a accent · --ink the dark tiles (logo, buttons)
   --glow the light colour on --ink · --p-night text-primary on a dark page · --n-* neutrals (light page)
   --d-* the dark page: bg, surface, surface-2, border, text, muted
   --hero-1..3 the dark gradient panels (banner, "security"), --hero-acc the light colour on them - the same in light and dark mode */

:root,
:root[data-palette="sanguine"] {
  --p: 180 83 9; --p-dark: 120 53 15; --p-light: 254 243 199; --a: 245 158 11; --ink: 28 20 16; --glow: 252 211 77; --p-night: 251 191 36;
  --hero-1: 28 20 16; --hero-2: 120 53 15; --hero-3: 180 83 9; --hero-acc: 252 211 77;
  --n-50: 250 248 245; --n-100: 245 241 236; --n-200: 231 225 218; --n-300: 214 206 196; --n-400: 168 158 147; --n-500: 120 111 102;
  --n-600: 87 80 73; --n-700: 68 62 56; --n-800: 41 37 33; --n-900: 28 25 22; --n-950: 18 15 12;
  --d-bg: 17 13 10; --d-surface: 30 24 19; --d-surface-2: 44 36 29; --d-border: 61 51 42; --d-text: 245 238 230; --d-muted: 176 164 150;
}
:root[data-palette="choleric"] {
  --p: 185 28 28; --p-dark: 127 29 29; --p-light: 254 226 226; --a: 249 115 22; --ink: 26 10 10; --glow: 253 186 116; --p-night: 248 113 113;
  --hero-1: 26 10 10; --hero-2: 127 29 29; --hero-3: 185 28 28; --hero-acc: 253 186 116;
  --n-50: 250 248 247; --n-100: 245 241 240; --n-200: 231 225 223; --n-300: 214 205 202; --n-400: 168 157 154; --n-500: 120 110 107;
  --n-600: 87 79 77; --n-700: 68 61 59; --n-800: 41 36 35; --n-900: 28 24 23; --n-950: 18 14 13;
  --d-bg: 18 11 11; --d-surface: 32 20 20; --d-surface-2: 47 30 29; --d-border: 66 43 41; --d-text: 246 236 234; --d-muted: 178 160 157;
}
:root[data-palette="melancholic"] {
  --p: 67 56 202; --p-dark: 49 46 129; --p-light: 224 231 255; --a: 139 92 246; --ink: 15 13 36; --glow: 196 181 253; --p-night: 165 180 252;
  --hero-1: 15 13 36; --hero-2: 49 46 129; --hero-3: 67 56 202; --hero-acc: 196 181 253;
  --n-50: 248 250 252; --n-100: 241 245 249; --n-200: 226 232 240; --n-300: 203 213 225; --n-400: 148 163 184; --n-500: 100 116 139;
  --n-600: 71 85 105; --n-700: 51 65 85; --n-800: 30 41 59; --n-900: 15 23 42; --n-950: 2 6 23;
  --d-bg: 9 10 24; --d-surface: 18 20 42; --d-surface-2: 28 31 60; --d-border: 44 48 86; --d-text: 236 238 252; --d-muted: 155 160 196;
}
:root[data-palette="phlegmatic"] {
  --p: 15 118 110; --p-dark: 19 78 74; --p-light: 204 251 241; --a: 16 185 129; --ink: 7 26 24; --glow: 94 234 212; --p-night: 94 234 212;
  --hero-1: 7 26 24; --hero-2: 19 78 74; --hero-3: 15 118 110; --hero-acc: 94 234 212;
  --n-50: 248 250 249; --n-100: 241 245 244; --n-200: 226 232 230; --n-300: 203 212 209; --n-400: 148 163 159; --n-500: 100 116 112;
  --n-600: 71 85 82; --n-700: 51 65 62; --n-800: 30 41 39; --n-900: 17 26 24; --n-950: 6 14 13;
  --d-bg: 7 15 14; --d-surface: 15 28 26; --d-surface-2: 24 41 38; --d-border: 38 60 56; --d-text: 232 245 242; --d-muted: 150 176 170;
}
:root[data-palette="mono"] {
  --p: 23 23 23; --p-dark: 0 0 0; --p-light: 229 229 229; --a: 82 82 82; --ink: 10 10 10; --glow: 245 245 245; --p-night: 245 245 245;
  --hero-1: 10 10 10; --hero-2: 38 38 38; --hero-3: 64 64 64; --hero-acc: 212 212 212;
  --n-50: 250 250 250; --n-100: 245 245 245; --n-200: 229 229 229; --n-300: 212 212 212; --n-400: 163 163 163; --n-500: 115 115 115;
  --n-600: 82 82 82; --n-700: 64 64 64; --n-800: 38 38 38; --n-900: 23 23 23; --n-950: 10 10 10;
  --d-bg: 0 0 0; --d-surface: 18 18 18; --d-surface-2: 30 30 30; --d-border: 48 48 48; --d-text: 245 245 245; --d-muted: 163 163 163;
}
/* black & white at night: the "primary" fills turn white, their text black */
.dark[data-palette="mono"] { --p: 245 245 245; --p-dark: 255 255 255; --a: 163 163 163; --ink: 245 245 245; --glow: 10 10 10; }

/* the palette switch's samples: three dots of each palette, drawn in its own colours whatever the page uses */
[data-palette-sample="sanguine"] { --s1: #b45309; --s2: #f59e0b; --s3: #1c1410; }
[data-palette-sample="choleric"] { --s1: #b91c1c; --s2: #f97316; --s3: #1a0a0a; }
[data-palette-sample="melancholic"] { --s1: #4338ca; --s2: #8b5cf6; --s3: #0f0d24; }
[data-palette-sample="phlegmatic"] { --s1: #0f766e; --s2: #10b981; --s3: #071a18; }
[data-palette-sample="mono"] { --s1: #171717; --s2: #a3a3a3; --s3: #ffffff; }
.qd-swatch { display: inline-flex; gap: 3px; vertical-align: middle; }
.qd-swatch i { display: block; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.qd-swatch i:nth-child(1) { background: var(--s1); }
.qd-swatch i:nth-child(2) { background: var(--s2); }
.qd-swatch i:nth-child(3) { background: var(--s3); }
