/*!
  Theme: GENESIS AnalytiX-BI SQL (gen-bi)
  Description: Syntax-highlighting theme for the ICONICS AnalytiX-BI Server query language (gen_bi).
               Token colours follow the BI SQL engine's own linter categories
               (IcoColumnarDbSqlParser -> TokenCategory). Where the engine distinguishes a
               category but does not pin an exact colour (Type, Locale), editorial colours from the
               Visual Studio / SSMS T-SQL convention are used so the categories read distinctly.
  Maintainer: ICONICS Technical Documentation

  IMPORTANT: Every rule is scoped under .language-gen_bi. This page also loads gen-exp.css, whose
  .hljs-* selectors are unscoped (global). Scoping keeps the BI theme from leaking onto gen_exp
  code blocks (e.g. built_in/type colours differ between the two languages) and gives these rules
  higher specificity than both gen-exp.css and the base default.min.css on BI blocks.

  Category -> colour map:
    Keyword (SELECT, FROM, JOIN, CASE, OVER …)          -> rgb(0,0,255)     Blue
    Literal (TRUE / FALSE / NULL)                       -> rgb(0,0,255)     Blue   (engine: Keyword)
    Functions (AVG, SUM, CAST, CONVERT, CURRENT_USER …) -> rgb(0,0,0)       Black  (engine: Identifier — default text, not highlighted)
    Type (INT32, STRING, DATETIME …)                    -> rgb(43,145,175)  Teal
    String literal ('text')                             -> rgb(128,0,0)     DarkRed
    Number (42, 3.14, 1e6)                              -> rgb(0,0,0)       Black
    Variable (@name)                                    -> rgb(0,128,128)   DarkCyan
    Operator (= != <> + - * / % & | ^ ~ .)              -> rgb(0,0,0)       Black
    Bracketed identifier ([Name])                       -> rgb(0,0,0)       Black  (engine: Identifier)
    Locale (en-US_CI)                                   -> rgb(121,94,38)   Brown
    Comment (-- … and /* … *\/)                         -> rgb(0,128,0)     Green
*/

/* ── Code block container ────────────────────────────────────────────────── */
pre code.hljs.language-gen_bi {
  display: block;
  overflow-x: auto;
  padding: 1em;
}

code.hljs.language-gen_bi {
  padding: 3px 5px;
}

/* Base text and background */
.hljs.language-gen_bi {
  background: #f8f8f8;
  color: #000000;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  line-height: 1.5;
}

/* ── Comments — line (--) and block (/* *\/) — Dark Green ────────────────── */
.language-gen_bi .hljs-comment {
  color: #008000;
}

/* ── Clause / control keywords (SELECT FROM WHERE JOIN CASE OVER …) — Blue ── */
.language-gen_bi .hljs-keyword {
  color: #0000ff;
}

/* ── Constant literals (TRUE / FALSE / NULL) — Blue ──────────────────────── */
/*    The BI engine files these under its Keyword category.                    */
.language-gen_bi .hljs-literal {
  color: #0000ff;
}

/* ── Functions (AVG, SUM, COUNT, CAST, CONVERT, CURRENT_USER …) ──────────── */
/*    The BI engine classifies these as Identifiers, so the product renders     */
/*    them as default (black) text. They are intentionally left unhighlighted   */
/*    by the grammar; this rule pins black for the unlikely case one is emitted. */
.language-gen_bi .hljs-built_in {
  color: #000000;
}

/* ── Data-type names (INT32, STRING, DATETIME, GUID …) — Teal ────────────── */
.language-gen_bi .hljs-type {
  color: #2b91af;
}

/* ── String literals ('text') — DarkRed ─────────────────────────────────── */
.language-gen_bi .hljs-string {
  color: #800000;
}

/* ── Numeric literals (decimal, floating-point, exponential) — Black ─────── */
.language-gen_bi .hljs-number {
  color: #000000;
}

/* ── Scripting variables (@name) — DarkCyan ──────────────────────────────── */
.language-gen_bi .hljs-variable {
  color: #008080;
}

/* ── Operators (= != <> > >= < <= + - * / % & | ^ ~ .) — Black ───────────── */
.language-gen_bi .hljs-operator {
  color: #000000;
}

/* ── Bracketed (delimited) identifiers ([Name With Spaces]) — Black ──────── */
/*    The BI engine treats these as ordinary identifiers (default colour).     */
.language-gen_bi .hljs-title {
  color: #000000;
}

/* ── COLLATE locale tokens (en-US_CI, fr-FR_CS) — Brown ──────────────────── */
.language-gen_bi .hljs-meta {
  color: #795e26;
}

/* ── Punctuation ─────────────────────────────────────────────────────────── */
.language-gen_bi .hljs-punctuation {
  color: #000000;
}
