/* simplified css style based on https://www.w3schools.com/w3css/default.asp */
/* validated with VSCode extension CSSTree validator */

/* css variables */
:root {
    /* color palette */
    /* use of variables: var(--color_tooltip_1); */
    /* background color */
    --b_color_html: #111111;
    --b_color_header: #0f1016;
    --b_color_header_hover: #DA5929;
    --b_color_button: #8BC24A;
    --b_color_button_disabled: #555;
    --b_color_button_hover: #333;
    /* front color */
    --f_color_body: #eaec41;
    --f_color_button: #fff;
    --f_color_link: #FF8C00;
}

/*
* {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}
*/
@font-face {
    font-family: "Roboto";
    /* fonts are inside the css folder */
    src: url("https://bestia.dev/css/Roboto-Medium.woff2") format("woff2");
}

html {
    background-color: var(--b_color_html);
    color: var(--f_color_body);
    font-family: 'Roboto';
    font-size: 20px;
    overflow-x: hidden;
    /*margin auto means centered horizontally*/
    margin: 0;
    padding: 0;
    user-select: none;
    border: 0;
}

body {
    color: var(--f_color_body);
    margin: 0;
    padding: 0;
    left: 0;
    overscroll-behavior-y: none;
    line-height: 1.8;
    overflow-wrap: break-word;
    background-image: url('https://bestia.dev/images/rust_background.jpg');
}

/* no special color for links, but special class for links */

a:link,
a:visited,
a:hover,
a:active {
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}

a:hover {
    background-color: var(--b_color_button_hover);
}

button {
    background-color: var(--b_color_button);
    color: var(--f_color_button);
    border: none;
    padding: 5px 12px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    border-radius: 8px;
}

button:disabled {
    background-color: var(--b_color_button_disabled);
    opacity: 0.5;
}

h1,
h2,
h3,
p {
    text-align: center;
    margin: 10px auto;
    max-width: 800px;
}

h1 {
    font-size: 36px;
    /* navbar Segments starts with h1, it needs 10px because of the fixed header */
    padding-top: 35px;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 24px;
}

img {
    border-style: none;
    vertical-align: middle;
}

/* fixed header, nest styles inside header to isolate from others */
/* https://www.youtube.com/watch?v=8eFeIFKAKHw */
header {
    background-color: var(--b_color_header);
    position: fixed;
    z-index: 10000;
    top: 0;
    padding: 0 0;
    width: 100%;
    height: 35px;
    font-family: 'Roboto';
    font-weight: 700;
    margin-left: auto;

    & nav {
        justify-self: center;
        max-width: 800px;
        height: 35px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    & nav #nav-links-container {
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    & nav a {
        height: 100%;
        padding: 0 20px;
        display: flex;
        align-items: center;
        text-decoration: none;
        color: var(--f_color_body);
    }

    & nav a:hover {
        background-color: var(--b_color_header_hover);
    }

    & nav svg {
        fill: var(--f_color_body);
    }

    & nav #sidebar-active {
        display: none;
    }

    & nav #open-sidebar-button,
    & nav #close-sidebar-button {
        display: none;
    }

    /* When the screen is less than 600 pixels wide, hide all links, show only the brand and hamburger. */
    @media(max-width: 600px) {
        & nav {
            justify-self: right;
        }

        & nav #nav-links-container {
            flex-direction: column;
            align-items: flex-start;

            position: fixed;
            top: 0;
            right: -100%;
            z-index: 10;
            width: 300px;

            background-color: rgba(0, 0, 0, 0.5);
            box-shadow: -5px 0 5px rgba(0, 0, 0, 0.25);
            transition: 0.75s ease-out;
            backdrop-filter: blur(10px);
        }

        & nav a {
            box-sizing: border-box;
            height: auto;
            width: 80%;
            padding: 5px 10px;
            justify-content: flex-start;
            border-radius: 10px;
            border: 2px solid transparent;
        }

        & nav #open-sidebar-button,
        & nav #close-sidebar-button {
            padding: 20px;
            display: block;
        }

        & nav #close-sidebar-button {
            position: sticky;
            left: 90%;
        }

        & nav #sidebar-active:checked~#nav-links-container {
            right: 0;
        }

        & nav #sidebar-active:checked~#overlay {
            height: 100%;
            width: 100%;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 9;
        }
    }
}

/* region: classes */
.link {
    color: var(--f_color_link);
}

.footer {
    background-color: var(--b_color_header);
}

.small {
    font-size: smaller;
}

.img_height_1em_width_auto {
    height: 1em;
    width: auto;
}

.color_red {
    color: red;
}

.max-width_800px {
    max-width: 800px;
}

.height_9em {
    height: 9em;
}

.center_img {
    display: block;
    margin: auto;
}

.width_100pc {
    width: 100%;
}

/* endregion: classes */