/* Global rules */
@font-face {
    font-family: QC;
    src: url(fonts/Moonhouse-yE5M.ttf);
}

:root {
    --d-crimson: #180404;
    --l-crimson: hsl(348deg 15% 100%);
    --l-blue: #1fcbff;
    --d-blue: hsl(194deg 100% 30%);
    --l-yellow: #fbff0a;
    --d-yellow: hsl(50deg 100% 35%);
    --l-green: #acf73b;
    --d-green: hsl(84deg 100% 30%);
    --l-violet: rgb(255, 0, 255);
}

/* Default color scheme (dark) */
body {
    --background-color: var(--d-crimson);
    --h-background-color: crimson;
    --h-text-color: black;
    --b-text-background-color: rgb(207, 35, 55);
    --b-text-color: rgb(221, 221, 221);
    --text-light-color: #ff9696;
    --a-underline-color: rgb(0, 0, 172);
    margin: 0;
    background: var(--background-color);
    color: var(--b-text-color);
    font-family: monospace;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.light-theme {
}

/* Light color scheme */
@media (prefers-color-scheme: light) {
    body {
    }

    body.dark-theme {
    }
}

h1 {
    font-family: QC;
    margin-block-start: 0;
    margin-block-end: 0;
}

#header a {
    text-decoration: none;
    color: black;
    &::after {
        content: "";
        display: block;
        height: 2px;
        background: var(--a-underline-color);
        transition:
            width 0.3s ease 0s,
            left 0.3s ease 0s;
        width: 0;
        margin-top: -2px;
    }
}

#header a:hover::after {
    width: 100%;
}

#nav {
    font-family: QC;
}

#header {
    container: header-container / inline-size;
    background: var(--h-background-color);
    color: var(--h-text-color);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

header-component {
    position: sticky;
    top: 0;
    margin-top: 1em;
    z-index: 1;
}

#content {
    container: content-container / inline-size;
    margin: auto auto 1em auto;
    flex-grow: 1;
}

toast-box {
    position: fixed;
    bottom: 0;
    right: 30px;
    display: flex;
    width: 440px;
    align-items: flex-end;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}
.toast {
    min-height: 80px;
    background: #fff;
    color: black;
    border-radius: 5px;
    font-weight: 500;
    margin: 0 0 10px 0;
    padding: 0 0 5px 0;
    border: 1px solid black;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    position: relative;
    transform: translateX(100%);
    animation: toast-move-in 0.5s linear forwards;
    span {
        margin: 5px;
    }
}
@keyframes toast-move-in {
    100% {
        transform: translateX(0);
    }
}
.toast::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    border-radius: 0 0 5px 5px;
    width: 100%;
    height: 5px;
    background: green;
    animation: toast-timer-bar 5s linear forwards;
}
@keyframes toast-timer-bar {
    100% {
        width: 0;
    }
}
.toast.error::after {
    background: red;
}
.toast.invalid::after {
    background: orange;
}

dialog {
    &::backdrop {
        backdrop-filter: brightness(70%);
        background-color: unset;
    }
}

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

@media screen and (min-width: 601px) {
    h1 {
        font-size: 4rem;
    }
    #header {
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 0.25rem;
        padding-left: 6rem;
        margin-bottom: 2rem;
    }
    #company-name {
        text-indent: -2rem;
        max-width: 425px;
        align-self: anchor-center;
        width: min-content;
        > a::after {
            all: unset;
        }
    }
    #contact {
        display: flex;
        gap: 14px;
        margin: auto 10px auto 0px;
        min-width: fit-content;
        font-size: large;
    }
    #contact-info > span {
        margin-bottom: 5px;
        display: block;
        width: fit-content;
    }
    #nav-container {
        container-type: inline-size;
        flex-grow: 1;
        min-width: 18em;
    }
    nav {
        font-size: 2rem;
        font-family: QC;
        margin-inline-start: 50px;
        display: grid;
        gap: 0px 5px;
        grid-template-columns: repeat(4, min-content);
        grid-template-rows: repeat(4, 1fr);
        width: fit-content;
        span + span {
            grid-row: 2;
            grid-column: 2;
            + span {
                grid-row: 3;
                grid-column: 3;
                + span {
                    grid-row: 4;
                    grid-column: 4;
                }
            }
        }
        @container (width < 600px) {
            display: flex;
            flex-direction: column;
            span {
                width: fit-content;
            }
        }
    }
    #content {
        min-width: 600px;
        width: 80%;
        display: flex;
        justify-content: center;
    }
    #get-tech-support-modal {
        min-width: 610px;
        max-width: 900px;
        width: 70%;
    }
    #tech-support-form-div {
        display: flex;
        flex-direction: column;
        > input,
        div,
        textarea {
            margin-bottom: 10px;
        }
        button,
        input,
        textarea {
            padding: 5px;
            font-size: large;
            font-family: monospace;
            border: 1px solid black;
            border-radius: 5px;
            &:focus {
                border-color: var(--l-blue);
            }
        }
        > .form-row {
            display: flex;
            justify-content: space-evenly;
            > div {
                display: flex;
                margin: unset;
                align-items: baseline;
                gap: 5px;
            }
        }
        > .form-buttons {
            align-self: center;
        }
        > textarea {
            resize: none;
        }
        label:has(+ input[required]),
        label:has(+ textarea[required]) {
            &::before {
                content: "*";
                color: red;
                margin-right: 4px;
            }
        }
    }
}
