/**
 * @file
 * The analyser's colour tokens and score legend
 * (templates/biopama-score-legend.html.twig, js/analyser/scoreLegend.js).
 *
 * The tokens are declared once, on the analyser's skin root, which holds the
 * sidebar, the map column, the drawer and the results tray. The legend, the
 * map paint (read by scoreLegend.colours()) and the map image all use them.
 * Score classes: ColorBrewer RdYlGn, low to high.
 */

[data-biopama-analyser] {
  --biopama-score-1: #d7191c;
  --biopama-score-2: #fdae61;
  --biopama-score-3: #ffffbf;
  --biopama-score-4: #a6d96a;
  --biopama-score-5: #1a9641;
  --biopama-score-highlight: #179dc7;
  --biopama-score-excluded: #595958;
}

/* Continuous scale: low (min), middle (mean), high (max), as the map's
   interpolation. */
.biopama-score-gradient {
  height: 0.5rem;
  background: linear-gradient(to right, var(--biopama-score-1), var(--biopama-score-3), var(--biopama-score-5));
}

.biopama-score-class {
  height: 0.75rem;
}

.biopama-score-class--1 {
  background-color: var(--biopama-score-1);
}

.biopama-score-class--2 {
  background-color: var(--biopama-score-2);
}

.biopama-score-class--3 {
  background-color: var(--biopama-score-3);
}

.biopama-score-class--4 {
  background-color: var(--biopama-score-4);
}

.biopama-score-class--5 {
  background-color: var(--biopama-score-5);
}

.biopama-score-swatch {
  width: 0.75rem;
  height: 0.75rem;
}

.biopama-score-swatch--highlight {
  background-color: var(--biopama-score-highlight);
}

.biopama-score-swatch--excluded {
  background-color: var(--biopama-score-excluded);
}
