/*
 * @file style.css
 * @author David Kvaček (davidkvacek@seznam.cz)
 * @brief Source code of the Firebase web app style.
 * @date 2024-11-07
 */

/* GENERAL */

* {
    box-sizing: border-box;
}

/* BODY */

body {
    background-color: #010a0f;
    font-family: "Oswald", sans-serif;
    margin: 0;
    padding: 0;
}

body .body {
    min-height: calc(100vh - 148px);
}

body.light-mode {
    background-color: #eeeeee;
}

/* HEADER */

header {
    align-items: center;
    background-color: #001e28;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    padding: 4px 32px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2;
}

header .logo {
    display: flex;
    font-family: "Kode Mono", monospace;
}

header .logo a {
    color: #ffffff;
    display: flex;
    text-decoration: none;
}

header .logo img {
    height: 48px;
    margin: 18px 8px 18px 0;
    width: auto;
}

header .logo h1 {
    margin-left: 8px;
}

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

/* NAVIGATION */

header nav {
    font-family: "Oswald", sans-serif;
    margin-left: auto;
    margin-right: 48px;
}

header nav ul {
    display: flex;
    list-style: none;
    padding-inline-start: 0;
}

header nav a {
    color: #c8cdcd;
    font-size: large;
    margin: 0 8px;
    padding: 8px;
    text-decoration: none;
}

header nav a:hover {
    color: #ffffff;
}

header nav a.active {
    border-bottom: 4px solid #ff0046;
    color: #ffffff;
}

header nav .nav-text {
    margin-left: 4px;
}

/* MATERIAL ICONS */

.material-icons {
    direction: ltr;
    display: inline-block;
    font-family: "Material Icons";
    font-feature-settings: "liga";
    font-size: 24px;
    font-style: normal;
    font-weight: normal;
    letter-spacing: normal;
    line-height: 1;
    text-rendering: optimizeLegibility;
    text-transform: none;
    vertical-align: sub;
    white-space: nowrap;
    word-wrap: normal;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

.outlined {
    font-family: "Material Icons Outlined";
}

/* HEADER BUTTON */

header .header-button {
    background-color: #0f2d37;
    border: none;
    border-radius: 8px;
    color: #dddddd;
    cursor: pointer;
    font-size: 16px;
    margin-left: 16px;
    padding: 8px;
}

header .header-button:hover {
    background-color: #00141e;
    color: #ffffff;
}

header .header-button-container {
    display: inline-block;
    position: relative;
}

header .header-logo-tooltip, header .header-button-tooltip {
    color: #dddddd;
    font-size: 10px;
    opacity: 0;
    position: absolute;
    visibility: hidden;
    z-index: 2;
}

header .header-link-tooltip {
    color: #dddddd;
    font-size: 10px;
    opacity: 0;
    position: absolute;
    visibility: hidden;
    z-index: 2;
}

header .logo:hover .header-logo-tooltip, header .header-button-container:hover .header-link-tooltip, header .header-button-container.highlight .header-link-tooltip {
    color: #ffffff;
}

header .header-button-container:hover .header-button-tooltip {
    color: #ffffff;
    opacity: 1;
    visibility: visible;
}

/* SEARCH BUTTON */

header .search-button-tooltip {
    left: 25%;
    top: 115%;
}

/* TOGGLE MODE BUTTON */

header .toggle-mode-button-tooltip {
    left: 50%;
    top: 115%;
}

/* SEARCH DIALOG */

body .search-dialog {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    height: 100%;
    justify-content: center;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: opacity 0.4s ease-in-out;
    width: 100%;
    z-index: 4;
}

body .search-dialog.show {
    opacity: 1;
}

body .search-dialog-content {
    background-color: #001e28;
    border-radius: 16px;
    color: #eeeeee;
    font-size: large;
    max-width: 72vw;
    overflow-x: auto;
    padding: 16px 32px;
    text-align: center;
    white-space: normal;
}

body .search-dialog-cancel-button {
    background-color: #ff0046;
    border: none;
    border-radius: 8px;
    color: #eeeeee;
    cursor: pointer;
    font-family: "Oswald", sans-serif;
    font-size: 16px;
    margin-bottom: 10px;
    margin-top: 16px;
    padding: 10px 14px;
}

body .search-dialog-cancel-button:hover {
    background-color: #c80000;
}

/* LOADING DIALOG */

body .loading-dialog {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    height: 100%;
    justify-content: center;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: opacity 0.4s ease-in-out;
    width: 100%;
    z-index: 4;
}

body .loading-dialog.loading {
    display: flex;
    opacity: 1;
}

body .loading-dialog-content {
    background-color: #001e28;
    border-radius: 16px;
    color: #eeeeee;
    font-size: large;
    max-width: 72vw;
    overflow-x: auto;
    padding: 32px 64px;
    text-align: center;
    white-space: normal;
}

body .loading-dialog-content p {
    margin-bottom: 0;
    margin-top: 8px;
}

.spinner, .spinner div, .spinner div:after {
    box-sizing: border-box;
}

.spinner {
    color: currentColor;
    display: inline-block;
    height: 32px;
    position: relative;
    width: 32px;
}

.spinner div {
    animation: spinner 1.2s linear infinite;
    transform-origin: 16px 16px;

}

.spinner div:after {
    background: currentColor;
    border-radius: 20%;
    content: " ";
    display: block;
    height: 7px;
    left: 15px;
    position: absolute;
    top: 1px;
    width: 3px;
}

.spinner div:nth-child(1) {
    animation-delay: -1.1s;
    transform: rotate(0deg);
}

.spinner div:nth-child(2) {
    animation-delay: -1s;
    transform: rotate(30deg);
}

.spinner div:nth-child(3) {
    animation-delay: -0.9s;
    transform: rotate(60deg);
}

.spinner div:nth-child(4) {
    animation-delay: -0.8s;
    transform: rotate(90deg);
}

.spinner div:nth-child(5) {
    animation-delay: -0.7s;
    transform: rotate(120deg);
}

.spinner div:nth-child(6) {
    animation-delay: -0.6s;
    transform: rotate(150deg);
}

.spinner div:nth-child(7) {
    animation-delay: -0.5s;
    transform: rotate(180deg);
}

.spinner div:nth-child(8) {
    animation-delay: -0.4s;
    transform: rotate(210deg);
}

.spinner div:nth-child(9) {
    animation-delay: -0.3s;
    transform: rotate(240deg);
}

.spinner div:nth-child(10) {
    animation-delay: -0.2s;
    transform: rotate(270deg);
}

.spinner div:nth-child(11) {
    animation-delay: -0.1s;
    transform: rotate(300deg);
}

.spinner div:nth-child(12) {
    animation-delay: 0s;
    transform: rotate(330deg);
}

@keyframes spinner {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* MAIN */

main {
    font-family: "Oswald", sans-serif;
    margin-top: 92px;
}

/* FOOTER */

footer {
    color: #999999;
    font-family: "Oswald", sans-serif;
    font-size: 12px;
    height: 32px;
    margin-top: 4px;
    text-align: center;
    white-space: wrap;
    width: 100%;
}

footer a {
    color: #999999;
    text-decoration: none;
}

/* MEDIA QUERY (1024px) */

@media screen and (max-width: 1024px) {

    /* NAVIGATION */

    header nav .nav-text {
        display: none;
    }

    /* SCHEDULE BUTTON */

    header .schedule-button-tooltip {
        left: 28%;
        top: 142%;
        visibility: visible;
    }

    /* TABLE BUTTON */

    header .table-button-tooltip {
        left: 25%;
        top: 142%;
        visibility: visible;
    }

    /* STAT BUTTON */

    header .stat-button-tooltip {
        left: 20%;
        top: 142%;
        visibility: visible;
    }

    /* HEADER BUTTON */

    header .header-button-container .header-button-tooltip, header .header-button-container .header-link-tooltip {
        opacity: 1;
        visibility: visible;
    }
}

/* MEDIA QUERY (768px) */

@media screen and (max-width: 768px) {

    /* HEDAER */

    header .logo h1 {
        display: none;
    }

    header .header-button-container .header-logo-tooltip {
        font-family: "Oswald", sans-serif;
        left: -6%;
        opacity: 1;
        top: 81%;
        visibility: visible;
    }
}

/* MEDIA QUERY (512px) */

@media screen and (max-width: 512px) {

    /* BODY */

    body {
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }

    /* NAVIGATION */

    header nav {
        margin-left: auto;
        margin-right: auto;
    }

    header nav a {
        margin: 0 4px;
        padding: 8px 2px;
    }

    /* SCHEDULE BUTTON */

    header .schedule-button-tooltip {
        left: 16%;
    }

    /* TABLE BUTTON */

    header .table-button-tooltip {
        left: 13%;
    }

    /* STAT BUTTON */

    header .stat-button-tooltip {
        left: 2%;
    }

    /* SEARCH DIALOG */

    body .search-dialog {
        padding: 16px 32px;
    }
}
