body {
    font-family: "Open Sans","system-ui","Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans;
}

header {
    background-color: #000;
    color: #fff;
}

header img {
    height: 50px;
}

header img.github {
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
    height: 25px;
    width: 25px;
}

header a {
    color: #fff;
    text-decoration: none;
}

header .wrapper {
    height: 100%;
    padding-top: .25em;
}

.machine {
    margin-top: 1em;
}

.machine h2 {
    background-color: #00AE42;
    color: #fff;
    font-weight: bold;
    margin-bottom: 0;
    padding-left: 1em;
    position: relative;
}

.machine h2 .timelapse img {
    position: absolute;
    top: 9px;
    right: 5px;
}

.machine h2 .gcode img {
    position: absolute;
    top: 9px;
    right: 50px;
    height: 20px;
}

.machine .progress {
    margin-bottom: 1em;
}

.machine .progress-bar {
    background-color: #00AE42;
    font-weight: bold;
}

.machine .ams {
    font-size: small;
}

.machine .ams .title {
    background-color: #00AE42;
    color: #fff;
    font-weight: bold;
    padding: .25em;
    position: relative;
    display: inline-block;
    height: 30px;
    width: 100%;
    border-radius: 3px;
}

.machine .ams .title .humidity {
    background-color: #fff;
    position: absolute;
    right: 3px;
    top: 2px;
    height: 25px;
    width: 25px;
    border: 1px solid white;
    border-radius: 1px;
}

.machine .ams .title .temp {
    color: #00AE42;
    background-color: #fff;
    position: absolute;
    right: 30px;
    top: 2px;
    height: 25px;
    width: 55px;
    text-align: center;
    border: 1px solid white;
    border-radius: 1px;
}

.machine .ams .tray.active {
    border: 1px solid red;
    border-radius: 5px;
}

.machine .ams .color_box {
    display: inline-block;
    height: 40px;
    width: 40px;
    border: 1px solid black;
    position: relative;
    border-radius: 4px;
}
.machine .ams .color {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    border-top: 1px solid black;
}

.machine .ams .empty .color {
    display: none;
}

.machine .ams .empty {
    background-image: url(/img/empty.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #fff;
}

.machine .icons {
    font-size: small;
    margin-bottom: 1em;
}

.machine .icons img {
    height: 25px;
    width: 25px;
}

.machine .icons .wrapper {
    border: 2px solid #eaecef;
    border-radius: 3px;
    width: 100%;
    height: 100%;
}

.status .firmware-update {
    border: 1px solid red;
    margin: 1em;
    border-radius: 5px;
    padding: .5em;
}

.status .firmware-update img {
    vertical-align: top;
}

.thumbs img {
    height: 200px;
    width: 350px;
    margin: 1em;
}

.thumbs .col {
    position: relative;
}

.thumbs .col .info {
    display: none;
    position: absolute;
    background-color: #000;
    text: #fff;
    bottom: 15px;
    left: 45px;
    width: 79%;
    padding: 1em;
}

.thumbs .col .info a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.thumbs .image:hover .info {
    display: block;
}

table.gcode {
    margin: 2em;
    border: 1px solid #000;
    border-radius: 5px;
}

table.gcode thead th {
    background-color: #00AE42;
    color: #fff;
    font-weight: bold;
    font-size: x-large;
}

table.gcode .text-right {
    text-align: right;
}

table.gcode tbody td {
    border-right: 1px solid #000;
}

table.gcode tbody tr {
    border-bottom: 1px solid #000;
}

table.gcode a {
    text-decoration: none;
    color: #000;
}

table.gcode a:hover {
    text-decoration: underline;
}

/* System Dark */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #fff;
    }
    header {
        background-color: #00AE42;
        color: #fff;
    }
    .machine .ams .color_box {
        border-color: #fff;
    }
    .machine .ams .color {
        border-top-color: #fff; 
    }
    body.dark table.gcode  {
        border-color: #fff;
    }
    body.dark table.gcode a {
        color: #fff;
    }
    body.dark table.gcode tbody td {
        border-color: #fff;
    }
    body.dark table.gcode tbody tr {
        border-color: #fff;
    }
}

/* Forcing Dark */

body.dark {
    background-color: #121212;
    color: #fff;
}
body.dark header {
    background-color: #00AE42;
    color: #fff;
}
body.dark .machine .ams .color_box {
    border-color: #fff;
}
body.dark .machine .ams .color {
    border-top-color: #fff; 
}
body.dark table.gcode  {
    border-color: #fff;
}
body.dark table.gcode a {
    color: #fff;
}
body.dark table.gcode tbody td {
    border-color: #fff;
}
body.dark table.gcode tbody tr {
    border-color: #fff;
}

/* Theme Min */
body.min .status .icons {
    display: none;
}

body.min .ams .title {
    display: none;
}

body.min .ams .key, body.min .ams .name, body.min .ams br {
    display: none;
}

body.min .ams .color_box {
    height: 20px;
    width: 20px;
}

body.min .ams .ams_0, body.min .ams .ams_1, body.min .ams .ams_2, body.min .ams .ams_3 {
    width: 45%;
    float: left;
}
