:root {
    --background: black;
    --option-bg: #35363ab3;
    --text: white;
    --bar: #35363a;
    --bar-text: white;
}
::-webkit-scrollbar {
    width: .5vw;
    background-color: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,50%);
    border-radius: .25vw;
}
body {
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 8vh;
    margin: 0;
    padding: 0;
    width: 100%;
    background: var(--background);
    color: var(--text);
    user-select: none;
}
ol {
    padding-left: 1.5em;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 20vh;
    background-color: var(--bar);
    color: var(--bar-text);
    padding: 0 1vw;
    font-size: 6vh;
}
.right {
    text-align: right;
}
main {
    height: 60vh;
    overflow-y: hidden;
    width: 100vw;
}
main > * {
    height: 60vh;
}
.row {
    display: flex;
    align-items: center;
    height: 20vh;
    padding: 0 1vw;
}
.list {
    height: 40vh;
    overflow-y: auto;
}
.list summary {
    position: sticky;
    top: 0;
    background: black;
    font-size: 6vh;
    padding-left: 1vw;
}
.list .grid {
    display: grid;
    font-size: 6vh;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    justify-items: center;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
}
.row.stop {
    display: flex;
    justify-content: space-between;
}
.row.moreel {
    justify-content: space-between;
    white-space: nowrap;
    max-width: 100%;
}
.scrolling {
    display: inline-block;
    overflow-x: auto;
    scrollbar-width: none;  /* Dla przeglądarek bazujących na Firefox */
    -ms-overflow-style: none;  /* Dla IE i Edge */
    white-space: nowrap;
    vertical-align: bottom;
    max-width: 85vw;
}
.scrolling::-webkit-scrollbar {
    display: none;  /* Dla przeglądarek bazujących na WebKit, np. Chrome */
}
#disp_line {
    border: 1px solid white;
    border-radius: 5px;
    padding: .25rem;
}
.route{
    display: grid;

}

footer {
    background: var(--bar);
    color: var(--bar-text);
    height: 20vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1vw;
}
/* TWO COLUMN LAYOUT */
.col-2 {
    display: flex;
    justify-content: space-between;
    width: 100%;
    overflow-y: hidden;
}
.col-2 > .col {
    width: 50%;
}
.col {
    width: 100%
}
.col.scrollable {
    overflow-y: auto;
}
.button {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 15vh;
    height: 15vh;
    border: 1px var(--bar-text) solid;
    border-radius: 5px;
    cursor: pointer;
}
.row .button {
    border: 1px var(--text) solid;
    color: var(--text);
}
.list .button {
    width: 100%;
    justify-content: left;
    padding-left: 1vw;
}
.button.line {
    padding: 0;
    justify-content: center;
}
.button.route {
    font-size: 6vh;
}
/* MESSAGES */
.messages {
    font-size: 6vh;
}
.messages-list {
    padding: 1vh 1vw;
}
.messages .view {
    font-size: .8em;
    padding: 1vh 1vw;
}
.message {
    border: 1px solid var(--text);
    border-radius: 2px;
    padding: 1vh 1vw;
    margin-bottom: 2vh;
    box-sizing: border-box;
}
.message .header {
    font-size: .7em;
}
.message.unread > .title {
    font-weight: bold;
}
/* BRIGADE SELECT */
main .trips {
    max-height: 60vh;
    overflow-y: scroll;
    font-size: .8em;
}
/* FORM AND KEYBOARD */
.form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    margin: 0;
}
.form #nrk {
    border-right: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}
label {
    width: 100%;
}
.form input[type = "text"], .form input[type = "password"] {
    width: 100%;
    height: 15vh;
    padding: 0;
    text-align: center;
    font-size: 10vh;
    letter-spacing: 10px;
    background: var(--background);
    border: 1px solid var(--text);
    border-radius: 5px;
    color: var(--text);
}
input[type = "text"]:focus, input[type = "text"]:focus-visible, input[type = "password"]:focus, input[type = "text"]:focus-visible {
    border: 3px solid var(--text);
    outline: none;
}
.keyboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
form[name = "login"] .keyboard .button, form[name = "setpin"] .keyboard .button {
    -webkit-tap-highlight-color: transparent;
}
.button[disabled]{
    visibility: hidden;
}
/* MENU */
.menu {
    display: grid;
    font-size: 6vh;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    justify-items: center;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
}
.menu .option {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 1vw;
    background-color: var(--option-bg);
    width: 100%;
    height: 100%;
}
.menu .option:hover {
    cursor: pointer;
}

.text {
    box-sizing: border-box;
    font-size: 4vh;
    padding: 1vh 1vw;
    overflow: auto;
}
.modal p, .modal h2, .modal h3, .text p, .text h2{
    margin: 0;
}
.text a, .text a:visited {
    color: var(--text);
}
/* MODAL */
.modal {
    font-size: .5em;
    position: fixed;
    z-index: 1;
    padding-top: 1vh;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal.review {
    overflow: hidden;
}
.modal.review .modal-content {
    width: 80vw;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.summary {
    padding-right: 1vw;
}
.anc {
    max-height: 60vh;
    overflow-y: auto;
}
.stops {
    max-height: 60vh;
}
#rm_stops {
    margin-bottom: 2vh;
}
#rm_stops h3 {
    margin-bottom: 1vh;
}
#stops_list {
    max-height: 40vh;
    overflow: auto;
}
/* */

.binput {
    height: 100%;
    width: 100%;
    background: transparent;
    color: white;
    font-size: 4vh;
    border: 1px white solid;
    border-radius: .2em;
    color-scheme: dark;
}

.binput option {
    background: black;
}

.trips p {
    margin: 0;
}
.trips details {
    margin: 1vh 0;
}
.trips details:first-child {
    margin-top: 0;
}
.trips details:last-child {
    margin-bottom: 0;
}
.trips summary {
    position: sticky;
    top: 0;
    background-color: black;
    padding: 0 1vw;
}
.trips summary::marker {
    content: '';
}
.trips .expand-info {
    text-align: center;
    font-size: .5em;
}
.trips .expand-info:after {
    content: '►';
    font-family: Arial, sans-serif;
}
details[open] .expand-info:after {
    content: '▼';
    font-family: Arial, sans-serif;
}
.trips .trip {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.trips .trip .counter {
    font-size: .8em;
}
.trips .trip .lineinfo {
    display: flex;
    align-items: center;
    width: 80%;
    gap: 1vw;
}
.trips .trip .line {
    border-radius: 5px;
    border: 1px solid gray;
    padding: 5px;
    width: 3vh;
    min-width: fit-content;
    text-align: center;
}
.trips .trip .destinfo .from {
    font-size: .8em;
}
.time .arrival {
    font-size: .8em;
    text-align: right;
}
.trips table {
    font-size: .7em;
    width: 87.5%;
    margin: auto;
}
.trips table td {
    padding: 0 .1em;
}
.trips .divider {
    margin: 0;
    flex-shrink: 0;
    display: flex;
    white-space: nowrap;
    text-align: center;
    border: 0;
}
.trips .divider::before, .trips .divider::after {
    font-size: .3rem;
    position: relative;
    width: 100%;
    border-top: thin solid white;
    top: 50%;
    content: "";
    transform: translateY(50%);
}
.trips .divider::before {
    width: 10%;
}
.trips .divider::after {
    width: 90%;
}
.trips .divider span {
    display: inline-block;
    font-size: .8em;
    padding: 0 .4em;
}
.modal-content {
    background-color: var(--background);
    margin: auto;
    padding: 1vh 1vw;
    border: 1px solid #888;
    width: 80vw;
}
.modal-content input[type="date"], .modal-content input[type="time"] {
    font-size: .8em;
    height: 2em;
    color: var(--text);
    background-color: var(--background);
    border: 1px solid var(--text);
    border-radius: 5px;
    color-scheme: dark;
}
.modal-content input[type="date"][readonly], .modal-content input[type="time"][readonly] {
    background-color: transparent;
    border: none;
}
.mod_close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.mod_close:hover, .mod_close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.button#discard {
    background-color: red;
}
.button#confirm {
    background-color: green;
}
.deptime {
    background-color: green;
    padding: 5px;
}
#routeModal {
    display: none;
}
.selected {
    color: var(--background) !important;
    background: var(--text) !important;
}
input {
    font-family: inherit;
}

.rotate-screen {
    display: none;
}

#snackbar {
    visibility: hidden;
    width: 100%;
    background-color: #333;
    color: #f00;
    text-align: center;
    padding: 16px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    font-size: 4vh;
}

#snackbar.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {top: -30px; opacity: 0;}
    to {top: 0; opacity: 1;}
}

@keyframes fadeout {
    from {top: 0; opacity: 1;}
    to {top: -30px; opacity: 0;}
}

@media screen and (max-aspect-ratio: 5/3) {
    .rotate-screen {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #000;
        font-size: 18px;
    }
    .icons i {
        font-size: 5vh;
    }
}