/* Part of the APK.audio project — http://APK.audio — made by Anthony Kuzub
   MIT Licence. Free, for everyone, for ever. Full text in LICENSE at the root.
   GENERATED by contracts/scripts/gen.ts — DO NOT EDIT. Source: contracts/src/web.ts,
   contracts/tokens/. Regenerate: (cd contracts && npm run gen). */

/* Brand and state tokens for pages that cannot import @apkaudio/contracts.
   Link it:  <link rel="stylesheet" href="/APK:OS/vendor/apk-contracts/apk-tokens.css">
   Accent:   color: var(--apk-accent);   rgba(var(--apk-accent-rgb), .3)
   State:    <span class="apk-state-text" data-apk-state="online">online</span>
             (a word the token does not name draws kinda, the honest default) */

:root {
    --apk-accent: #f4902c;
    --apk-accent-rgb: 244, 144, 44;
    --apk-accent-hover: #ffa552;
    --apk-accent-hover-rgb: 255, 165, 82;
    --apk-accent-tint: rgba(244,144,44,0.18);
    --apk-on-accent: #1e1e1e;
    --apk-state-good: #2ea043;
    --apk-state-good-rgb: 46, 160, 67;
    --apk-state-good-tint: rgba(46,160,67,0.14);
    --apk-state-dead: #f85149;
    --apk-state-dead-rgb: 248, 81, 73;
    --apk-state-dead-tint: rgba(248,81,73,0.13);
    --apk-state-kinda: #d29922;
    --apk-state-kinda-rgb: 210, 153, 34;
    --apk-state-kinda-tint: rgba(210,153,34,0.12);
}

/* A word the token does not name is kinda. Declared first, so a named word below wins. */
[data-apk-state] { --apk-tone: var(--apk-state-kinda); --apk-tone-rgb: var(--apk-state-kinda-rgb); --apk-tone-tint: var(--apk-state-kinda-tint); }
[data-apk-state="online" i],
[data-apk-state="identified" i],
[data-apk-state="live" i],
[data-apk-state="up" i],
[data-apk-state="discovered" i],
[data-apk-state="ok" i],
[data-apk-state="locked" i],
[data-apk-state="listening" i] { --apk-tone: var(--apk-state-good); --apk-tone-rgb: var(--apk-state-good-rgb); --apk-tone-tint: var(--apk-state-good-tint); }
[data-apk-state="offline" i],
[data-apk-state="fault" i],
[data-apk-state="down" i],
[data-apk-state="unresponsive" i],
[data-apk-state="removed" i],
[data-apk-state="no connection" i],
[data-apk-state="lost clock" i],
[data-apk-state="degraded" i],
[data-apk-state="unavailable" i] { --apk-tone: var(--apk-state-dead); --apk-tone-rgb: var(--apk-state-dead-rgb); --apk-tone-tint: var(--apk-state-dead-tint); }
[data-apk-state="unknown" i],
[data-apk-state="declared" i],
[data-apk-state="unasked" i],
[data-apk-state="stale" i],
[data-apk-state="quiet" i],
[data-apk-state="pending" i],
[data-apk-state="starting" i],
[data-apk-state="stopping" i],
[data-apk-state="stub" i],
[data-apk-state="partial" i],
[data-apk-state="under_test" i],
[data-apk-state="cleared" i],
[data-apk-state="absent" i] { --apk-tone: var(--apk-state-kinda); --apk-tone-rgb: var(--apk-state-kinda-rgb); --apk-tone-tint: var(--apk-state-kinda-tint); }
[data-apk-tone="good"] { --apk-tone: var(--apk-state-good); --apk-tone-rgb: var(--apk-state-good-rgb); --apk-tone-tint: var(--apk-state-good-tint); }
[data-apk-tone="dead"] { --apk-tone: var(--apk-state-dead); --apk-tone-rgb: var(--apk-state-dead-rgb); --apk-tone-tint: var(--apk-state-dead-tint); }
[data-apk-tone="kinda"] { --apk-tone: var(--apk-state-kinda); --apk-tone-rgb: var(--apk-state-kinda-rgb); --apk-tone-tint: var(--apk-state-kinda-tint); }

/* Three ways to spend a tone. Colour is never the only channel (state.json): keep the word visible. */
.apk-state-text { color: var(--apk-tone); }
.apk-state-dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--apk-tone); }
.apk-state-badge { color: var(--apk-tone); background: var(--apk-tone-tint); border: 1px solid var(--apk-tone); border-radius: 4px; padding: 0 .4em; }
