/* systemInfo — LCD-style system metrics panel */

/* ── Bar track — horizontal bar container ── */
.lcd-bar-track {
    flex: 1;
    height: 12px;
    border: 1px solid color-mix(in srgb, var(--lcd-ink, #2a3318) 30%, transparent);
    border-radius: 2px;
    background: color-mix(in srgb, var(--lcd-ink, #2a3318) 5%, transparent);
    overflow: hidden;
}

.lcd-bar-fill {
    height: 100%;
    width: 0%;
    background: color-mix(in srgb, var(--lcd-ink, #2a3318) 45%, transparent);
    border-radius: 1px;
    transition: width 0.4s ease;
}

/* ── Color thresholds for bar fill ── */
.lcd-bar-fill.bar-warn {
    background: rgba(120, 80, 20, 0.55);
}

.lcd-bar-fill.bar-crit {
    background: rgba(140, 40, 20, 0.6);
}

/* ── Numeric value display ── */
.lcd-value {
    font-size: 0.85em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
    flex-shrink: 0;
}

/* ── Top row: hostname, then temperature and uptime ── */
#sysinfo-panel .lcd-row-top {
    flex-wrap: wrap;
    row-gap: 2px;
}

#si-hostname {
    font-size: 1.3em;
}

.si-env {
    display: flex;
    gap: 2px 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

#si-temp,
#si-uptime {
    font-size: 0.95em;
    font-variant-numeric: tabular-nums;
}

/* ── CPU, RAM and disk: the name and figure on one line, the bar below ── */
#sysinfo-panel .si-metric {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    row-gap: 1px;
    column-gap: 4px;
    line-height: 1.15;
}

#sysinfo-panel .si-metric .lcd-bar-track {
    flex: 1 1 100%;
    height: 10px;
}

/* Phones: CPU, RAM and disk side by side */
@media (max-width: 575px) {
    #sysinfo-panel .lcd-screen {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 10px;
        align-content: start;
    }
    #sysinfo-panel .lcd-row-top { grid-column: 1 / -1; }
    #sysinfo-panel .si-metric .lcd-bar-track { height: 8px; }
    /* Each column the name, its figure under it, then the bar: the same
       three lines in all three, whatever the figure's length */
    #sysinfo-panel .si-metric .lcd-value { flex: 1 1 100%; text-align: left; font-size: 0.62em; }
    #si-hostname { font-size: 1.15em; }
    #si-temp, #si-uptime { font-size: 0.85em; }
    .si-env { gap: 2px 8px; }
}
