/* Dispatch Helper - Copyright (c) 2023 Discookie. Released under the BSD 3-clause license.
 * https://github.com/Discookie/dispatch-helper
 */

html, .timetable {
    scrollbar-color: #333333 #000000;
    scrollbar-width: thin;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0px;
    width: 100%;
    /* height: 100vh; */
    background-image: linear-gradient(to bottom, #171717, #111111);
    color: #cccccc;
    overflow-x: hidden;
    height: calc(100vh - 65px);
}

nav {
    position: fixed;
    top: 0px;

    background-color: #000000;
    width: 100%;
    border-top: 1px solid grey;
    border-bottom: 1px solid grey;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav h1 {
    align-self: center;
    text-align: center;
    line-height: 0em;
    font-size: 28px;
}

nav ul, nav h2 {
    flex: 1;
    display: flex;
    justify-content: left;
}

nav h2 {
    text-align: right;
    justify-content: right;
    padding: 0px 30px;
    color: #666666;
    font-size: 20px;
    line-height: 0em;
}

nav li {
    display: inline-block;
}

nav ul, nav li {
    text-align: center;
    margin: 0px 0px;
}

nav li {
    color: #ff6633;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.4s ease-in-out;
    padding: 14px 20px;
}

nav li.active {
    color: #ff9c26;
    background-color: #331a0a
}

nav li:hover {
    background-color: #46230b;
}

main {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
}

#load-level, #station-select, #settings, #about {
    display: flex;
    align-self: center;
    flex-direction: column;

    background-color: #000000;
    padding: 10px 20px;
    border: 1px solid grey;
    margin: 10px;
}

#load-level h2, #station-select h2, #settings h2, #about h2 {
    font-size: 24pt;
    margin: 0px;
    padding: 0px;

    color: #ff6633;
}

button.close {
    color: #cccccc
}

#load-level > div, #about > div {
    display: flex;
    min-width: 400px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 5px;
}

#station-select > div {
    display: flex;
    min-width: 600px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 5px;
}

#settings > div, #settings > span {
    display: flex;
    min-width: 350px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 5px;
}

#station-select select {
    min-width: 320px;
}

#time {
    display: flex;
    min-width: 300px;
    flex-direction: row;
    align-self: center;
    justify-content: space-between;
    margin: 5px;
}

#time > span {
    font-size: 32pt;
    font-weight: bold;
}

#about small {
    color: #873a07;
}

#timetables {
    display: flex;
    flex-direction: row;
}

#timetables h2 {
    margin-top: 0px;
}

#timetables h2 small a, #timetables h2 small a:visited {
    padding: 0px 10px;
    color: #ff6633;
}

#timetables > div {
    margin: 0px 20px;
    width: 100%;
}

#timetables > div > div {
    margin: 10px 0px;
}

textarea {
    resize: none;
    height: 2.15em;
    width: 90%;
    max-width: 245px;
    margin: 10px 2% 10px 0%;
    padding: 5px 10px;

    border: 1px solid grey;
    background-color: #333333;
    color: #cccccc;
}

input[type="file"] {
    display: none;
}

input[type="text"] {
    width: 98%;
    max-width: 150px;
    margin: 0px 10px 10px 0px;
    padding: 5px;

    border: 1px solid grey;
    background-color: #333333;
    color: #cccccc;
}

label[for="file-upload"] {
    width: 224px;
    background-color: #331a0a;
    color: #cccccc;
}

button {
    color: #ff6633;
    background-color: #331a0a;
}

select {
    color: #ff6633;
    background-color: #333333;
}

button, select, label[for="file-upload"] {
    display: inline-block;
    margin: 10px 2% 10px 0%;
    padding: 5px 10px;

    border: 1px solid grey;
    text-decoration: none;
    font-size: 10pt;
    font-weight: bold;
    transition: background-color 0.4s ease-in-out;
}

button.green, select.green {
    color: #0ecf0e;
    background-color: #225c22;
}

button.red, select.red {
    color: #cf0e0e;
    background-color: #5c2222;
}

button:disabled, select:disabled {
    color: #666666;
    background-color: #333333;
}

button:hover, label[for="file-upload"]:hover {
    background-color: #46230b;
}

.hidden {
    display: none !important;
}

.separator::after {
    content: "  | ";
    white-space: pre;
}

input[type="number"] {
    width: 50px;
    margin: 10px 1% 10px 1%;
    padding: 5px 5px;

    color: #ff6633;
    background-color: #331a0a;
    border: 1px solid grey;
    text-decoration: none;
    font-size: 10pt;
}

.timetable {
    display: block;
    border: 1px solid darkgrey;
    height: calc(100vh - 235px);
    overflow-y: scroll;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

tr.header, tr.header th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background-color: #000000;
}

th, td {
    border-bottom: 1px solid darkgrey;
    border-right: 1px solid #404040;
    padding: 5px 10px;
}

td > * {
    display: inline-block;
    width: 100%;
    height: 100%;
}

td.approaching {
    background-color: #0f460f;
}

td.now {
    background-color: #5f470f;
}

td:nth-child(1), td:nth-child(2), td:nth-child(3), td:nth-child(5), td:nth-child(6) {
    text-align: center;
}

td:nth-child(1), td:nth-child(2) > span:nth-of-type(1) {
    font-size: 12pt;
    font-weight: bold;
}

td:nth-child(4) > span:nth-child(2), td:nth-child(7) > span:nth-child(2) {
    font-size: 10pt;
}

td:nth-child(4) > span:nth-child(2)::before {
    content: "from "
}

td:nth-child(7) > span:nth-child(2)::before {
    content: "to "
}

td:nth-child(2) > span:nth-of-type(2), td:nth-child(3) > :last-child:not(:first-child), td:nth-child(6) > :last-child:not(:first-child) {
    font-size: 8pt;
}

td:nth-child(2) > small {
    font-size: 6pt;
}

td:nth-child(3) > :not(:last-child), td:nth-child(6) > :not(:last-child) {
    display: inline;
    width: initial;
    margin: 0px 1% 0px 1%;
}

td:nth-child(4) > span:not(:last-child), td:nth-child(7) > span:not(:last-child) {
    border-bottom: 1px solid #404040;
    width: 70%;
}
