:root {
    --bgcolor1: #1e1e1e;
    --bgcolor2: #2b2b2b;
    --input-bgcolor: #111;
    --input-highlightcolor: white;
    --input-highlighttextcolor: black;
    --text-color: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
    .logo {
        background-image: url("../images/logodark.webp");
    }
}

@media (prefers-color-scheme: light) {
    .logo {
        background-image: url("../images/logolight.webp");
    }

    :root {
        --bgcolor1: #1e1e1e;
        --bgcolor2: #ddd;
        --input-bgcolor: white;
        --input-highlightcolor: #1e1e1e;
        --input-highlighttextcolor: #e0e0e0;
        --text-color: black;
    }
}

.navbar {
    background-color: var(--input-bgcolor);
    border-bottom: 1px solid black;
    display: flex;
    flex: 0 0 50px; /* fixed height */
    align-items: center; /* vertical centering */
    height: 50px;
}

.nav-items a, .nav-items span, .nav-items a:visited {
    color: var(--text-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.logo {
    width: 400px;
    height: 50px;
    padding-right: 400px;
}

html {
    font-family: system-ui, sans-serif;
    font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.container {
    width: 100%;
    max-width: 100%;
    padding:0;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.clickable {
    transition: filter linear 0.2s;
    transition-delay: 0.1s;
    cursor: pointer;
}

    .clickable:hover {
        filter: drop-shadow(0px 0px 5px var(--input-highlightcolor));
        transition-delay: 0s;
    }

.noselect, .navbar {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

.nav-items {
    display: flex;
    list-style: none;
    width: 100%;
}

    .nav-items li {
        margin-right: 24px;
        white-space: nowrap;
    }

    .nav-items a, .nav-items a:visited {
        text-decoration: none;
        font-size: 16px;
        cursor: pointer;
    }

.right {
    margin-left: auto;
}

button {
    padding: 5px 10px;
    border: 1px solid #999;
    background-color: var(--input-bgcolor);
    border-radius: 1px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color linear 0.1s;
}

    button:hover, option:hover {
        background-color: #444;
        transition: background-color linear 0.5s;
    }

    button:active, option:active {
        background-color: var(--input-highlightcolor);
        color: var(--input-highlighttextcolor);
    }

input:not([type="checkbox"]), select, textarea {
    width: 100%;
    background-color: var(--input-bgcolor);
    color: var(--text-color);
    height: 26px; /* set same height */
    box-sizing: border-box;
    padding: 4px;
    margin-top: 2px;
    border: 1px solid var(--text-color);
}

textarea {
    height: 78px;
}

    input:not([type="checkbox"]):focus, select:focus, textarea:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    }

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1px solid var(--input-highlightcolor);
    border-radius: 0; /* square corners */
    appearance: none; /* remove default styling */
    cursor: pointer;
    position: relative;
    top: 1px;
    background-color: var(--text-color);
}

    input[type="checkbox"]:checked::before {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 10px;
        height: 10px;
        background: var(--input-bgcolor); /* black square when checked */
    }


select {
    appearance: none; /* standard */
    -webkit-appearance: none; /* Safari */
    -moz-appearance: none; /* Firefox */

    background-color: var(--input-bgcolor);
    border: 1px solid var(--text-color);
    border-radius: 0px;
}

    select:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    }

table {
    border-collapse: collapse;
    font-size: 0.9em;
    font-family: system-ui, sans-serif;
    min-width: 400px;
    max-width: 100vw;
    max-height: 500px;
    overflow-y: auto;
}

tbody {
    display: block;
    height: 500px;
    overflow: auto;
}

    thead tr, tbody tr {
        background-color: var(--input-bgcolor);
        color: var(--text-color);
        text-align: left;
        display: table;
        width: 100%;
        table-layout: fixed;
        border: 1px solid #aaa;
    }

th, td {
    padding: 12px 15px;
    cursor: pointer;
    user-select: none;
}

tbody tr {
    transition: background-color linear 0.2s;
    cursor: pointer;
    user-select: none;
}

    tbody tr:hover {
        background-color: var(--input-highlightcolor);
        color: var(--input-highlighttextcolor);
        transition: background-color linear 0.2s;
    }

.hidden {
    display: none !important;
}