/* ============================================================
   OMQ design standard: the five themes of OMQ Board, for every OMQ system.
   https://hub.omqpro.com/omq/theme.css   (docs/omq-design-standard.md)

   Themes: light (Default) · dark · glass (Liquid Glass) · clarity · hadeel.
   The chosen theme is <html data-omq-theme="…">, set by omq/theme.js from the one choice
   shared by every omqpro.com system. A system uses these names (var(--omq-…)) for its
   colours, or maps its own names onto them; it never needs to know which theme is on.

   Glass themes: the page shows a wallpaper (--omq-wall) and bars, menus and cards are
   see-through with a blur (--omq-blur; "none" in solid themes). Content stays readable:
   cards are thicker glass than the bars around them.
   ============================================================ */

:root {
  /* ---- Default: bright, the OMQ colours (Board's light theme) ---- */
  color-scheme: light;
  --omq-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
  --omq-radius: 12px;
  --omq-radius-sm: 8px;

  --omq-wall: #f2f7f7;                 /* the page behind everything (a colour or a picture) */
  --omq-page: #f2f7f7;                 /* the page as one colour, for anything that needs a colour */
  --omq-bar: #146e6d;                  /* the top bar */
  --omq-bar-ink: #ffffff;              /* text and icons on the bar */
  --omq-bar-muted: #d4eceb;
  --omq-bar-wash: rgba(255, 255, 255, 0.14);   /* buttons and hover on the bar */

  --omq-surface: #ffffff;              /* cards, menus, dialogs */
  --omq-surface-2: #e2eeee;            /* lists, secondary panels */
  --omq-sunken: #eef4f4;               /* inputs, panel backgrounds */
  --omq-line: #d3e3e3;
  --omq-line-soft: #e6efef;

  --omq-ink: #1e2b2d;                  /* text */
  --omq-ink-2: #4f5c5d;                /* secondary text */
  --omq-ink-3: #5e6b6c;                /* hints */
  --omq-disabled: #9aa6a7;

  --omq-accent: #1ba9a8;               /* brand teal: fills, the chosen item */
  --omq-accent-strong: #168f8e;
  --omq-accent-tint: #e0f3f2;
  --omq-on-accent: #08201f;            /* text on an accent fill */
  --omq-link: #0e7372;                 /* accent as text */
  --omq-focus: #1ba9a8;

  --omq-green: #22a06b;
  --omq-red: #c9372c;
  --omq-warn-bg: #fbede4;
  --omq-warn-ink: #8b3c12;
  --omq-danger-bg: #ffedeb;

  --omq-hover: rgba(20, 60, 62, 0.12);
  --omq-soft: rgba(20, 60, 62, 0.06);
  --omq-overlay: rgba(14, 40, 42, 0.45);
  --omq-card-shadow: 0 1px 2px rgba(20, 60, 62, 0.1), 0 0 0 1px var(--omq-line);
  --omq-pop-shadow: 0 8px 16px rgba(20, 60, 62, 0.16), 0 0 0 1px var(--omq-line);

  --omq-blur: none;                    /* backdrop-filter for bars and menus */
  --omq-rim: 0 0 0 0 transparent;      /* the bright edge of glass */
}

/* ---- Dark: easy on the eyes at night ---- */
:root[data-omq-theme='dark'] {
  color-scheme: dark;
  --omq-wall: #142022;
  --omq-page: #142022;
  --omq-bar: #0e1a1b;
  --omq-bar-ink: #ece8e1;
  --omq-bar-muted: #b9b6b0;
  --omq-bar-wash: rgba(255, 255, 255, 0.1);
  --omq-surface: #213235;
  --omq-surface-2: #1a2a2c;
  --omq-sunken: #1c2c2e;
  --omq-line: #2c4447;
  --omq-line-soft: #28393c;
  --omq-ink: #ece8e1;
  --omq-ink-2: #b3aea6;
  --omq-ink-3: #a39e96;
  --omq-disabled: #6e7a7b;
  --omq-accent-tint: #183a3b;
  --omq-link: #5fd0ce;
  --omq-warn-bg: #3a2217;
  --omq-warn-ink: #f08a55;
  --omq-danger-bg: #4a1f1c;
  --omq-hover: rgba(255, 255, 255, 0.12);
  --omq-soft: rgba(255, 255, 255, 0.06);
  --omq-overlay: rgba(0, 0, 0, 0.6);
  --omq-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--omq-line);
  --omq-pop-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--omq-line);
}

/* ---- Liquid Glass: deep teal glass over a teal-to-slate wallpaper ---- */
:root[data-omq-theme='glass'] {
  color-scheme: dark;
  --omq-wall:
    radial-gradient(circle 2px at 78% 59%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0)),
    radial-gradient(circle 1.5px at 88% 87%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
    radial-gradient(circle 1.5px at 18% 22%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    radial-gradient(circle 1.5px at 64% 12%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)),
    radial-gradient(1000px 640px at 30% 112%, rgba(72, 92, 150, 0.75) 0%, transparent 62%),
    radial-gradient(800px 560px at 88% 104%, rgba(58, 78, 128, 0.6) 0%, transparent 60%),
    radial-gradient(900px 620px at 20% 8%, rgba(70, 122, 116, 0.55) 0%, transparent 62%),
    radial-gradient(800px 600px at 96% 30%, rgba(40, 84, 86, 0.6) 0%, transparent 60%),
    linear-gradient(175deg, #2a4c4b 0%, #2c5150 34%, #2c4a55 70%, #33456a 100%) fixed;
  --omq-page: #2c4a55;
  --omq-bar: rgba(120, 168, 165, 0.24);
  --omq-bar-ink: #f2f8f7;
  --omq-bar-muted: #cfe1de;
  --omq-bar-wash: rgba(255, 255, 255, 0.14);
  --omq-surface: rgba(104, 152, 148, 0.56);
  --omq-surface-2: rgba(60, 100, 98, 0.5);
  --omq-sunken: rgba(20, 48, 48, 0.4);
  --omq-line: rgba(255, 255, 255, 0.18);
  --omq-line-soft: rgba(255, 255, 255, 0.1);
  --omq-ink: #f2f8f7;
  --omq-ink-2: #cfe1de;
  --omq-ink-3: #b6cfcb;
  --omq-disabled: #6f8f8b;
  --omq-accent: #7fd6ce;
  --omq-accent-strong: #5fbfb7;
  --omq-accent-tint: rgba(127, 214, 206, 0.22);
  --omq-on-accent: #06302e;
  --omq-link: #9fe6df;
  --omq-focus: #9fe6df;
  --omq-warn-bg: #3d3220;
  --omq-warn-ink: #f3a86b;
  --omq-danger-bg: #4a2524;
  --omq-hover: rgba(255, 255, 255, 0.12);
  --omq-soft: rgba(255, 255, 255, 0.07);
  --omq-overlay: rgba(2, 16, 18, 0.42);
  --omq-card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 6px 16px rgba(0, 20, 22, 0.22);
  --omq-pop-shadow: 0 24px 60px rgba(0, 18, 20, 0.5);
  --omq-blur: blur(26px) saturate(150%) brightness(1.04);
  --omq-rim: inset 0 1.5px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* ---- Clarity: light Liquid Glass, like iOS and macOS ---- */
:root[data-omq-theme='clarity'] {
  color-scheme: light;
  --omq-wall:
    radial-gradient(1100px 700px at 6% -10%, rgba(186, 214, 255, 0.42) 0%, transparent 60%),
    radial-gradient(900px 640px at 100% 0%, rgba(222, 208, 255, 0.34) 0%, transparent 58%),
    radial-gradient(1000px 720px at 30% 110%, rgba(200, 242, 232, 0.4) 0%, transparent 60%),
    radial-gradient(800px 600px at 95% 100%, rgba(255, 222, 206, 0.28) 0%, transparent 60%),
    #fbfbfd fixed;
  --omq-page: #fbfbfd;
  --omq-bar: rgba(255, 255, 255, 0.42);
  --omq-bar-ink: #1d1d1f;
  --omq-bar-muted: #5f5f66;
  --omq-bar-wash: rgba(118, 118, 128, 0.12);
  --omq-surface: #ffffff;
  --omq-surface-2: rgba(255, 255, 255, 0.75);
  --omq-sunken: rgba(242, 242, 247, 0.9);
  --omq-line: rgba(60, 60, 67, 0.16);
  --omq-line-soft: rgba(60, 60, 67, 0.09);
  --omq-ink: #1d1d1f;
  --omq-ink-2: #5f5f66;
  --omq-ink-3: #7c7c83;
  --omq-disabled: #aeaeb2;
  --omq-accent: #007aff;
  --omq-accent-strong: #0062cc;
  --omq-accent-tint: rgba(0, 122, 255, 0.12);
  --omq-on-accent: #ffffff;
  --omq-link: #0066cc;
  --omq-focus: rgba(0, 122, 255, 0.45);
  --omq-green: #248a3d;
  --omq-red: #d70015;
  --omq-warn-bg: #fff4e5;
  --omq-warn-ink: #9a4b00;
  --omq-danger-bg: #ffeceb;
  --omq-hover: rgba(118, 118, 128, 0.12);
  --omq-soft: rgba(118, 118, 128, 0.08);
  --omq-overlay: rgba(0, 0, 0, 0.12);
  --omq-card-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.05);
  --omq-pop-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  --omq-blur: blur(12px) saturate(190%) brightness(1.04);
  --omq-rim: inset 0 1px 0.5px rgba(255, 255, 255, 0.95), inset 0 -0.5px 0.5px rgba(255, 255, 255, 0.5), inset 0 0 0 0.5px rgba(255, 255, 255, 0.55);
}

/* ---- Hadeel: sea, shells and ocean blue (Clarity, in Hadeel's colours) ---- */
:root[data-omq-theme='hadeel'] {
  color-scheme: light;
  --omq-wall: url('https://hub.omqpro.com/omq/hadeel-sea.svg') center bottom / cover no-repeat fixed, #1e86cf;
  --omq-page: #fffdfa;
  --omq-bar: rgba(255, 255, 255, 0.52);
  --omq-bar-ink: #0d2b45;
  --omq-bar-muted: #3f5e78;
  --omq-bar-wash: rgba(13, 43, 69, 0.07);
  --omq-surface: rgba(255, 253, 250, 0.92);
  --omq-surface-2: rgba(255, 253, 250, 0.8);
  --omq-sunken: rgba(242, 242, 247, 0.9);
  --omq-line: rgba(13, 43, 69, 0.14);
  --omq-line-soft: rgba(13, 43, 69, 0.08);
  --omq-ink: #0d2b45;
  --omq-ink-2: #3f5e78;
  --omq-ink-3: #627d94;
  --omq-disabled: #aeaeb2;
  --omq-accent: #0b6fb3;
  --omq-accent-strong: #085a92;
  --omq-accent-tint: rgba(11, 111, 179, 0.13);
  --omq-on-accent: #ffffff;
  --omq-link: #0a64a4;
  --omq-focus: rgba(23, 146, 210, 0.5);
  --omq-green: #248a3d;
  --omq-red: #d70015;
  --omq-warn-bg: #fff4e5;
  --omq-warn-ink: #9a4b00;
  --omq-danger-bg: #ffeceb;
  --omq-hover: rgba(13, 43, 69, 0.07);
  --omq-soft: rgba(13, 43, 69, 0.05);
  --omq-overlay: rgba(0, 0, 0, 0.12);
  --omq-card-shadow: 0 0.5px 1px rgba(13, 43, 69, 0.08), 0 2px 8px rgba(11, 79, 134, 0.08);
  --omq-pop-shadow: 0 0 0 0.5px rgba(13, 43, 69, 0.08), 0 16px 40px rgba(11, 79, 134, 0.18), 0 2px 8px rgba(11, 79, 134, 0.07);
  --omq-blur: blur(12px) saturate(190%) brightness(1.04);
  --omq-rim: inset 0 1px 0.5px rgba(255, 255, 255, 0.95), inset 0 -0.5px 0.5px rgba(255, 255, 255, 0.5), inset 0 0 0 0.5px rgba(255, 255, 255, 0.55);
}

/* Glass that can't be seen through is worse than none: people who ask for less transparency get solid panels. */
@media (prefers-reduced-transparency: reduce) {
  :root[data-omq-theme='glass'] { --omq-blur: none; --omq-bar: #2c5150; --omq-surface: #3a6260; }
  :root[data-omq-theme='clarity'], :root[data-omq-theme='hadeel'] { --omq-blur: none; --omq-bar: #ffffff; --omq-surface: #ffffff; }
}
