/* The shared visual vocabulary from glyphs.js: tiers, risk pips, indicator chips, gauges and small marks.
 * Colours reuse the dashboard's ok / warn / crit steps, so a red here is the same red as everywhere else. */
:root {
  --tone-owner: #8a97a6; --tone-tier2: #5aa0dd; --tone-tier1: #317bc1; --tone-site: #c99a2e;
}
.gl-ic { flex: none; vertical-align: -2px; }

/* Tier ladder: owner, tier 2, tier 1, site. The entity's own rung is filled and ringed. */
.ladder { display: flex; align-items: flex-start; width: 100%; margin: 2px 0 4px; }
.rung { --tone: var(--tone-owner); display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 42px; }
.rung.owner { --tone: var(--tone-owner); } .rung.tier2 { --tone: var(--tone-tier2); }
.rung.tier1 { --tone: var(--tone-tier1); } .rung.site { --tone: var(--tone-site); }
.rung i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: var(--tone); background: #fff; border: 2px solid color-mix(in srgb, var(--tone) 40%, #fff); }
.rung em { font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rung.here i { color: #fff; background: var(--tone); border-color: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 22%, transparent); }
.rung.here em { color: var(--ink); }
.rung.rep i { color: var(--tone); background: #fff; border-style: dashed; box-shadow: none; }
.ladder .rail { flex: 1; height: 3px; margin-top: 10px; background: #d6dfea; border-radius: 2px; }

/* A tier disc: the number, in the tier's colour. */
.tier-chip { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; }
.tier-chip.t1 { background: var(--tone-tier1); } .tier-chip.t2 { background: var(--tone-tier2); }

/* Risk as signal strength: one, two or three rising bars. */
.risk-meter { --pip: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; color: var(--pip); }
.risk-meter.low { --pip: var(--ok); } .risk-meter.medium { --pip: var(--warn); } .risk-meter.high { --pip: var(--crit); }
.risk-meter .pips { display: inline-flex; align-items: flex-end; gap: 3px; }
.risk-meter .pips i { width: 6px; border-radius: 2px; background: #d9e1eb; }
.risk-meter .pips i:nth-child(1) { height: 8px; } .risk-meter .pips i:nth-child(2) { height: 13px; } .risk-meter .pips i:nth-child(3) { height: 18px; }
.risk-meter .pips i.on { background: var(--pip); }
.risk-meter.medium b { color: var(--warn-ink); }

/* Supplier indicators: an icon in a coloured capsule. */
.flag-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border: 1px solid transparent; border-radius: 20px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.flag-chip.warn { color: var(--warn-ink); background: var(--warn-bg); border-color: #ecd49a; }
.flag-chip.crit { color: var(--crit); background: var(--crit-bg); border-color: #f0c2b4; }
.flag-chip.info { color: #35597f; background: #eaf1fa; border-color: #cddcec; }
.flag-chip.gold { color: #7a5200; background: var(--gold-100); border-color: #e6cf8e; }
.flag-chip.gold .gl-ic { fill: currentColor; }

/* Gauges: stock against its minimum (the tick), and lead time against a 30-week scale. */
.gauge { display: inline-flex; align-items: center; gap: 9px; min-width: 120px; }
.gauge-bar { position: relative; flex: none; width: 68px; height: 9px; background: var(--surface-2); border-radius: 5px; overflow: hidden; box-shadow: inset 0 0 0 1px #e1e7f0; }
.gauge-bar .bar-fill { border-radius: 5px 0 0 5px; }
.gauge-tick { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--ink); opacity: .5; }
.gauge-num { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gauge-num b { font-weight: 800; } .gauge-num small { margin-left: 3px; font-size: 11px; color: var(--ink-3); }
.gauge.crit .gauge-num b { color: var(--crit); } .gauge.warn .gauge-num b { color: var(--warn-ink); }

/* Yes / no, as a tick or a cross. */
.mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.mark.yes { color: var(--ok); background: var(--ok-bg); } .mark.no { color: var(--crit); background: var(--crit-bg); }

/* Shipping mode: an icon and a colour for air, sea, truck and rail. */
.mode-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #1f4e89; background: #eaf1fa; }
.mode-chip.air { color: #2b5fc7; background: #e9f1ff; } .mode-chip.sea { color: #12707f; background: #e1f3f5; }
.mode-chip.truck { color: #8a5800; background: #fff1d6; } .mode-chip.rail { color: #5a3fb0; background: #eee9fb; }
