/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * Copyright (c) 2017-2025 Opengress Team
 */

:root {
    --soft-text-color: #464C5C;
}

/* fallback to prevent so much flashing on first page load */
header, footer {
    background: #333742;
}

html {
    color: #000;
    background: #666;
}

#loginform {
    margin: auto;
    text-align: center;
    width: var(--login-width);

}

#loginfieldset {
    background: #fff;
}

#loginform hr {
    color: var(--text-color);
    margin: 21px 0 16px;
    width: var(--login-width);
}

#loginform img {
    display: block;
    margin-bottom: 10px;
    width: var(--login-width);
}

#loginform input[type="text"], #loginform input[type="password"], #loginform input[type="email"] {
    width: var(--login-width);
    height: 42px;
}

#loginform input[type="submit"] {
    width: var(--login-width);
    height: 48px;
    padding: 15px 30px;
}

#loginform .inputbad, #loginform .inputgood {
    width: var(--login-width);
}

#largeprofile {
    border-radius: 50%;
    background: #fff;
    display: block;
    margin: 0 auto;
}

article {
    clear: both;
    background: #fff;
}

article > img {
    display: inline-block;
    float: left;
    border-radius: 50%;
    background: #fff;
    margin: 7px 20px;
}

article .name {
    font-weight: 700;
    font-size: 1em;
    margin: 0;
}

article form {
    float: right;
}

main {
    min-height: 300px;
    min-height: calc(100vh - 260px);
}

@media only screen and (min-width: 768px) {
    main {
        margin: 10px 70px;
    }
}

main :link, main :visited {
    color: var(--link-color);
    text-decoration: none;
}

main :link:hover, main :visited:hover {
    color: #009dd7;
    text-decoration: underline;
}

main > fieldset {

    border: 0;
    margin: 0 auto 30px auto;
    max-width: 370px;
    padding: 30px;
    position: relative;
}

main a.diversion:link, main a.diversion:visited {
    color: var(--text-color);
    font-size: 13px;
    position: relative;
    top: 3px;
}

.diversion {
    font-size: 14px;
}

.inputbad, .inputgood {
    display: none;
    font-size: 10px;
    margin-top: -17px;
    position: absolute;
    text-align: right;
    width: 365px;
}

:link {
    text-decoration: none;
}

[pattern]:not(:placeholder-shown):invalid {
    border: 1px solid red;
    color: red;
}

[pattern]:not(:placeholder-shown):invalid + .inputbad {
    color: red;
    display: block;
}

[pattern]:not(:placeholder-shown):valid {
    border: 1px solid var(--color-valid);
    color: var(--color-valid);
}

[pattern]:not(:placeholder-shown):valid + .inputbad + .inputgood {
    color: var(--color-valid);
    display: block;
}

footer {
    background: var(--wrap-color);
    min-height: 170px;
    position: relative;
    text-align: center;
}

footer > div:first-child {
    display: flex;
    justify-content: space-evenly;
}


footer > div:first-child > a {
    box-sizing: border-box;
    color: #9fb4bf;
    display: inline-block;
    height: 70px;
    /*line-height: 70px;*/
    margin-top: 50px;
    min-width: 80px;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 600px) {
    footer > div:first-child {
        flex-direction: column;
        align-items: center;
    }

    footer > div:first-child > a {
        height: 20px;
        margin: 20px;

    }
}

footer > div:not(:first-child) {
    color: #9fb4bf;
    font-size: 13px;
}

footer > div:not(:first-child) > a {
    color: #fd7037;
}

.info {
    background: #cde8f5;
    /*color: #4480ae;*/
    color: var(--soft-text-color);
}

.warning {
    background: #fdf5d4;
    /*color: #f1c40f;*/
    color: var(--soft-text-color);
}

/* contrast on this is useless and rubbish */
.error {
    background: #ff5555;
    color: #000;
}

.success, .updated {
    background: #52be7f;
    color: #207945;
}

.info, .warning, .error, .success, .updated {
    border-radius: 4px;
    padding: 22px;
    font-size: 14px;
    margin: 14px 0;
    font-weight: bold;
}

header {
    background: var(--wrap-color);
    height: 70px;
    padding: 0;
    position: relative;
}

header > a.active {
    color: #a9bdc7;
}

header > a:not(:first-child) {
    box-sizing: border-box;
    color: #9fb4bf;
    display: inline-block;
    height: 70px;
    line-height: 70px;
    min-width: 40px;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    top: -40%;
}

@media only screen and (min-width: 768px) {
    header > a:not(:first-child) {
        min-width: 80px;
    }
}

header > a:not(:first-child):hover, footer > a:hover, footer > div > a:hover, main a.diversion:link:hover, main a.diversion:visited:hover {
    color: #009dd7;
}

#usermenu, #lights {
    float: right;
    position: static;
    overflow: hidden;
}

#usermenu img {
    border-radius: 50%;
    background: #fff;
    width: 50px;
    height: 50px;
    display: inline-block;
    margin-top: 10px;
}

#statpanel {
    position: absolute;
    top: 70px;
    right: 30px;
    width: 123px;
    background: #eef2f4;
    font-size: 12px;
    box-shadow: 0 0 5px #888888;
    border-radius: 4px;
}

#statpanel a {
    display: list-item;
    list-style-type: none;
    margin: 0;
    padding: 10px;
    color: #798f9a; /* style guide has poor contrast */
}

#statpanel a:hover, #statpanel a:nth-child(even):hover {
    color: #009dd7;
    background: #333742;
}

#statpanel a:first-child:hover {
    background: #45ad70;
    /* color: ; */
}

#statpanel a:first-child {
    background: #3a6;
    color: #fff;
    font-weight: bold;
}

#statpanel a:nth-child(even) {
    background: #fff;
}

header img {
    height: 70px;
    margin: 0 5px;
}

@media only screen and (min-width: 768px) {
    header img {
        margin: 0 30px;
    }
}

html, body {
    background: var(--main-background);
    color: var(--text-color);
    font-family: "Open Sans", Roboto, Sans, sans-serif;
    margin: 0;
}

input[type="password"] + .diversion {
    display: block;
    width: 150px;
    margin: -20px auto 0 auto;
}

input[type="submit"], button {
    background: var(--color-valid);
    border: 0;
    border-radius: 4px;
    box-sizing: border-box;
    color: #000;
    cursor: pointer;
    /*display:block;*/
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: 20px;
    /* padding:15px 30px; */
    text-transform: uppercase;
    height: 40px;
    /*width:365px;*/
}

button#reset, input#reset, button.danger, input.danger {
    background: #ff5555;
}

button#reset:hover, input#reset:hover, button.danger:hover, input.danger:hover {
    background: red;
}

input:not([type="submit"]) + input[type="submit"], input + button {
    display: block;
}

input[type="submit"]:hover {
    background: #00aa00;
}

/*
I usually put inputs INSIDE labels. For this project I didn't - why not?
 */
input[type="text"], input[type="password"], input[type="email"], input:not([type]),
input[type="date"], input[type="datetime-local"], input[type="number"], input[type="file"],
textarea, input[list], select {
    background: #fff;
    border: 1px solid var(--text-color);
    border-radius: 4px;
    box-sizing: border-box;
    color: #333742;
    margin-bottom: 19px;
    padding: 0 10px;
    height: 35px;
    width: 365px;
    display: block;
}

input[type="file"] {
    background: inherit;
    color: inherit;
}

textarea {
    min-height: 360px;
}

label {
    box-sizing: border-box;
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
}

.navhighlight {
    background: #eef2f4;
    border-bottom: 3px solid red;
}

.switchholder_horizontal input[type='checkbox'] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switchholder_horizontal input[type='checkbox']:checked ~ .toggle {
    background: #45ad70;
    left: 19px;
    transition: .5s;
}

.switchholder_horizontal input[type='checkbox']:checked ~ .toggle_horizontal {
    background: #45ad70;
    left: -27px;
    transition: .5s;
}

.switchholder_horizontal input[type='checkbox']:checked ~ .switch, input[type='checkbox']:checked ~ .switch_horizontal {
    background: #80cda2;
    transition: .5s;
}

.switchholder_horizontal input[type='checkbox']:disabled ~ .toggle_horizontal {
    background: #666666;
}

.switchholder_horizontal input[type='checkbox']:disabled ~ .switch, input[type='checkbox']:disabled ~ .switch_horizontal {
    background: #aaaaaa;
}

button:disabled, input[type="submit"]:disabled {
    background: #aaaaaa;
    color: #666666;
}

.switchholder_horizontal input[type='checkbox']:focus ~ .switch, input[type='checkbox']:focus ~ .switch_horizontal {
    outline: 2px solid #009dd7;
}

.switchholder, .passholder, .switchholder_horizontal {
    display: inline-block;
    position: relative;
    min-width: 70px;
    margin: 15px;
    /*height: 0;*/
}

label.switchholder_horizontal {
    display: flex;
    align-items: center;
    gap: 10px;
}

.passholder {
    /* top: -6px;*/
}

.passholder input, .passholder + input {
    height: 20px;
    width: 100px;
    display: inline-block;
}

.passholder + input[type="submit"] {
    margin: 15px;
    width: 300px;
}

.switchlabel, .switchlabel_horizontal {
    min-width: 70px;
    display: inline-block;
    position: absolute;
    top: -13px;
}

.switchlabel_horizontal {
    position: static;
    margin: 0;
    flex-shrink: 0;
}

.switch, .switch_horizontal {
    display: block;
    width: 36px;
    height: 14px;
    background: #dee4e7;
    border-radius: 7px;
    position: relative;
    transition: .5s;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4) inset;
}

.switch {
    top: 4px;
}

.toggle, .toggle_horizontal {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ff7474;
    position: absolute;
    top: 1px;
    left: -3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: .5s;
}

.toggle_horizontal {
    position: relative;
    top: 0;
    left: -49px;
}

body {
    display: flex;
    align-content: stretch;
    flex-flow: row wrap;
}

body > * {
    flex: 1 100%;
}

thead {
    font-weight: bold;
}

:hover > .cheaptooltip {
    display: inline-block;
}


.cheaptooltip {
    display: none;
    background: #C8C8C8;
    color: #000;
    /*margin-left: 28px;*/
    /*padding: 10px;*/
    position: absolute;
    z-index: 1000;
    max-width: 200px;
    max-height: 700px;
}

.cheaptooltip > * {
    display: block;
    white-space: pre-wrap;
    max-width: 200px;
    max-height: 100px;
}

main > video {
    width: 90%;
    display: block;
    margin: 0 auto;
}

div.buttons > button {
    margin-top: 0;
    margin-right: 10px;
}

