/* A rack panel rather than a web page: dark, dense, monospaced where numbers matter. */

:root {
    --bg: #16181c;
    --panel: #1e2126;
    --line: #2d323a;
    --ink: #dfe3ea;
    --dim: #8d96a5;
    --accent: #d7a05a;
    --ok: #7fbf7f;
    --warn: #d9a441;
    --bad: #d97070;
    --key-width: 34px;

    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

body {
    padding: 2rem 1.5rem 4rem;
}

header, main, footer {
    max-width: 60rem;
    margin: 0 auto;
}

h1 {
    margin: 0 0 .25rem;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: .02em;
}

h2 {
    margin: 0 0 .75rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}

.subtitle, footer p {
    color: var(--dim);
    max-width: 44rem;
}

footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: .85rem;
}

.booting {
    max-width: 26rem;
    margin: 6rem auto;
    padding: 0 1.5rem;
    text-align: center;
    color: var(--dim);
}

.booting h1 {
    font-size: 1.4rem;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.boot-bar {
    height: 3px;
    background: var(--line);
    border-radius: 2px;
    overflow: hidden;
    margin: .75rem 0 .5rem;
}

.boot-bar > div {
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width .2s linear;
}

/* Until every response's size is known there is no honest fraction to draw, so the bar says
   "working" rather than inventing one. */
.boot-bar.indeterminate > div {
    width: 30%;
    transition: none;
    animation: boot-sweep 1.1s ease-in-out infinite;
}

@keyframes boot-sweep {
    0% { margin-left: -30%; }
    100% { margin-left: 100%; }
}

.boot-detail {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .8rem;
    min-height: 1.2em;
    margin: 0;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1rem 1.25rem 1.25rem;
    margin: 1.25rem 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin: .5rem 0;
}

label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--dim);
}

select, input[type="file"], input[type="range"] {
    background: #14161a;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .3rem .4rem;
    font: inherit;
}

button {
    background: #2a2f37;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .4rem .9rem;
    font: inherit;
    cursor: pointer;
}

button:hover:not(:disabled) {
    border-color: var(--accent);
}

button:disabled {
    opacity: .45;
    cursor: default;
}

button.secondary {
    background: transparent;
    color: var(--dim);
}

button.tiny {
    padding: .1rem .35rem;
    font-size: .75rem;
    line-height: 1.2;
}

button.tiny.on {
    background: var(--accent);
    color: #16181c;
    border-color: var(--accent);
}

.note {
    color: var(--dim);
    font-size: .85rem;
}

.ok { color: var(--ok); }
.warn { color: var(--warn); }
.error, .bad { color: var(--bad); }

code, .hash, .clock {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.identity {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: .1rem .75rem;
    margin: 0 0 .75rem;
    font-size: .9rem;
}

.identity dt {
    color: var(--dim);
}

.identity dd {
    margin: 0;
}

.hash {
    word-break: break-all;
    font-size: .8rem;
}

.transport button {
    min-width: 5rem;
}

.scrub {
    width: 100%;
    margin: .5rem 0;
}

.readouts {
    font-size: .85rem;
}

.strips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .35rem .4rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    min-width: 3.6rem;
}

.strip.silent {
    opacity: .4;
}

.strip .label {
    font-size: .7rem;
    color: var(--dim);
    white-space: nowrap;
}

progress {
    width: 12rem;
}

/* The keys are absolutely positioned so black ones can sit over the whites they fall between. */
.keyboard {
    position: relative;
    height: 8rem;
    margin-top: .75rem;
    user-select: none;
    touch-action: none;
}

.key {
    position: absolute;
    top: 0;
    padding: 0;
    border-radius: 0 0 3px 3px;
    cursor: pointer;
}

.key.white {
    width: var(--key-width);
    height: 8rem;
    background: #e8e6e1;
    border: 1px solid #b8b5ae;
    color: #6a6864;
    font-size: .7rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: .3rem;
    z-index: 1;
}

.key.black {
    width: calc(var(--key-width) * .6);
    height: 5rem;
    background: #24262b;
    border: 1px solid #0d0e10;
    z-index: 2;
}

.key.down {
    background: var(--accent);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: .8rem 1.5rem;
    background: #4a1f1f;
    color: #ffd9d9;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
}
