/* =========================================================
   JFES Gauge
   ========================================================= */

:root {
    --page-bg: #080c09;
    --hero-bg: #0a0f0b;
    --panel-bg: #e4e4e4;
    --panel-border: #aaa;
    --row-border: #c8c8c8;

    --header-bg: #29402d;
    --header-border: #1d2d20;

    --button-bg: #226622;
    --button-hover: #2d7a35;
    --button-disabled: #999;

    --text: #000;
    --white: #fff;
    --muted: #666;

    --value: #b06a00;
    --security: #555500;
    --core: #008000;
}

/* =========================================================
   Base
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

body {
    min-width: 320px;
}

/* =========================================================
   Navigation
   ========================================================= */

#navUp {
    width: 100%;
    padding: 0.8vw 2vw;
    background: #000;
    color: #aaa;
    font-size: 1.3vw;
    text-align: left;
}

#navUp span {
    cursor: pointer;
}

#navUp span:hover {
    color: #fff;
}

/* =========================================================
   Hero
   ========================================================= */

#fraqC {
    position: relative;
    width: 100%;
    min-height: 24vw;
    background: var(--hero-bg);
    border-bottom: 1px solid #222;
}

#fraqC img {
    position: absolute;
    left: 10vw;
    top: 4vw;
    width: 20vw;
    max-width: 240px;
}

#fraqC > div {
    position: absolute;
    left: 35vw;
    top: 4vw;
    width: 58vw;
    color: #fff;
    text-align: left;
}

#fraqC h1 {
    margin: 0 0 1vw;
    color: #fff;
    font-size: 3vw;
    font-weight: 600;
    letter-spacing: 0.04em;
}

#fraqC p {
    margin: 0.6vw 0;
    color: #bbb;
    font-size: 1.5vw;
}

/* =========================================================
   Section separator
   ========================================================= */

.sw {
    height: 1px;
    background: #222;
}

/* =========================================================
   Main Gauge area
   ========================================================= */

#demo {
    width: 100%;
    padding: 4vw 3vw;
    background: #101810;
}

/* =========================================================
   Gauge form
   ========================================================= */

#fes {
    width: min(87vw, 1100px);
    margin: 0 auto !important;
    padding: 0;
    color: #000;
}

/* =========================================================
   Gauge tables
   ========================================================= */

#fes table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--panel-border) !important;
    background: var(--panel-bg);
    color: #000;
    font-size: 1.05rem !important;
}

/* =========================================================
   Section headers
   ========================================================= */

#fes th {
    padding: 0.7rem;
    background: var(--header-bg) !important;
    color: #fff !important;
    border-bottom: 1px solid var(--header-border);
    font-weight: bold;
}

#fes th div {
    margin: 0 !important;
    padding: 0.25rem;
    background: transparent !important;
    color: #fff !important;
    font-weight: bold;
}

#fes thead th {
    background: var(--header-bg) !important;
    color: #fff !important;
}

#fes thead th div {
    font-size: 1.45rem !important;
}

/* =========================================================
   Table body
   ========================================================= */

#fes td {
    padding: 0.55rem 0.8rem;
    background: var(--panel-bg);
    color: #000;
    border-bottom: 1px solid var(--row-border);
    vertical-align: middle;
}

#fes td:first-child {
    width: 24%;
    white-space: nowrap;
    font-weight: bold;
}

/* =========================================================
   Inputs
   ========================================================= */

#fes input[type="text"],
#fes input[type="number"],
#fes select {
    min-height: 2.35rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid #999;
    border-radius: 2px;
    background: #fff;
    color: #000;
    font-family: inherit;
    font-size: 1rem !important;
}

#fes input[type="text"] {
    width: 100%;
}

#fes input[type="number"] {
    width: 6rem !important;
}

#fes select {
    min-width: 10rem;
}

#fes input:focus,
#fes select:focus {
    outline: none;
    border-color: var(--button-bg);
    box-shadow: 0 0 0 2px rgba(34, 102, 34, 0.18);
}

/* =========================================================
   Checkbox / labels
   ========================================================= */

#fes input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0 0.35rem 0 0.4rem;
    vertical-align: middle;
}

#fes label {
    color: #000;
    vertical-align: middle;
    white-space: nowrap;
}

/* =========================================================
   Buttons
   ========================================================= */

#fes button,
.button,
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #315b37;
    border-radius: 2px;
    background: var(--button-bg);
    color: #fff;
    font-family: inherit;
    font-size: 1rem !important;
    font-weight: bold;
    cursor: pointer;
    vertical-align: middle;
}

#fes button:hover,
.button:hover,
.btn:hover {
    background: var(--button-hover);
}

#fes button:active,
.button:active,
.btn:active {
    transform: translateY(1px);
}

#fes button:disabled,
.button:disabled,
.btn:disabled {
    background: var(--button-disabled);
    border-color: #888;
    color: #ddd;
    cursor: not-allowed;
}

/* =========================================================
   Existing Gauge values
   ========================================================= */

.val {
    color: #008800;
}

.sec {
    color: var(--security);
}

.core {
    color: var(--core);
}

/* =========================================================
   Stream visualisation
   ========================================================= */

#vis {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: grid;
    align-content: start;
    justify-content: start;
    background: #000;
}

#vis > div {
    margin: 1px;
    border-radius: 50%;
}

/* =========================================================
   Stream / result rows
   ========================================================= */

#fes tr:has(#vis) td {
    padding: 0.8rem;
}

/* =========================================================
   Raw stream modal
   ========================================================= */

#rawStreamModal {
    background: rgba(0, 0, 0, 0.85) !important;
}

#rawStreamModal > div {
    width: min(90vw, 1000px) !important;
    max-width: none !important;
    margin: 5vh auto !important;
    padding: 1.2rem !important;
    background: #e4e4e4 !important;
    border: 1px solid #888 !important;
    border-radius: 3px;
    color: #000;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.65);
}

#rawStreamModal h2 {
    color: #000;
}

#rawStreamText {
    width: 100% !important;
    background: #111 !important;
    color: #00ff00 !important;
    border: 1px solid #555 !important;
    font-family: Consolas, "Courier New", monospace;
}

/* =========================================================
   Help
   ========================================================= */

#helpNav,
#help {
    background: #0a0f0b;
    color: #fff;
}

#helpNav > div,
#help > div {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: min(87vw, 1100px) !important;
    margin: 0 auto;
    text-align: left;
    font-size: 1rem !important;
}

#helpNav h1,
#help h1,
#helpNav h2,
#help h2 {
    color: #fff;
}

#helpNav p,
#help p,
#helpNav li,
#help li {
    color: #bbb;
    line-height: 1.6;
    font-size: 1.7vw;
    font-weight: bold;
}

/* =========================================================
   Footer
   ========================================================= */

.bMenu {
    background: #000;
    border-top: 1px solid #222;
}

.bMenu table {
    width: min(87vw, 1100px) !important;
    margin: 2vw auto !important;
    font-size: 1rem !important;
}

.bMenu td {
    background: #000 !important;
    color: #aaa;
    padding: 1rem;
}

.bMenu img {
    max-width: 240px;
}

/* =========================================================
   Scroll control
   ========================================================= */

#scrollTop {
    cursor: pointer;
    opacity: 0.7;
}

#scrollTop:hover {
    opacity: 1;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 800px) {

    #navUp {
        font-size: 0.9rem;
    }

    #fraqC {
        min-height: 260px;
    }

    #fraqC img {
        left: 5vw;
        top: 35px;
        width: 130px;
    }

    #fraqC > div {
        left: 34vw;
        top: 35px;
        width: 60vw;
    }

    #fraqC h1 {
        font-size: 1.8rem;
    }

    #fraqC p {
        font-size: 0.95rem;
    }

    #fes {
        width: 96vw;
    }

    #fes table {
        font-size: 0.95rem !important;
    }

    #fes td {
        padding: 0.5rem;
    }

    #fes td:first-child {
        width: 30%;
    }

    #fes select {
        width: 50% !important;
        min-width: 0;
    }

    #helpNav > div,
    #help > div {
        width: 90vw !important;
    }
}