@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    src: url('./assets/fonts/inter_variable.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 100 900;
    src: url('./assets/fonts/inter_italic_variable.ttf') format('truetype');
}

:root {
    font-family: 'Inter', sans-serif;

    --color-primary: #fad522;
    --color-primary-hover: #dfb700;
    --color-background: #fff9ec;
    --color-nav-background: #ffe79e;
    --color-error: #ff2b2b;
    --color-border: #ddd;
}

body {
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: var(--color-background);
}

#content {
    flex-grow: 1;
    max-width: 100vw;
}

#header {
    margin: 16px;
    display: flex;
    justify-content: flex-start;

    .logo {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-grow: 1;

        img {
            height: 40px;
            width: auto;
            margin-right: 10px;
        }

        h1 {
            margin: 0;
            text-align: center;
            font-weight: 900;
            font-style: italic;
        }
    }
}

nav {
    display: flex;
    flex-direction: column;
    background-color: var(--color-nav-background);
    height: 100vh;
    z-index: 30;

    a {
        display: flex;
        align-items: center;
        flex-direction: column;
        margin: 10px;
        text-decoration: none;
        color: #000;

        :hover {
            .navIcon {
                background-color: var(--color-primary-hover);
            }
        }

        p {
            font-size: 14px;
            margin: 0;
        }

        .navIcon {
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: var(--color-primary);
            border-radius: 10px;
            margin-bottom: 5px;

            svg {
                display: block;
                margin: 2px 16px;
                fill: #000;
                height: 20px;
            }
        }
    }
}

main {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 80vh;
    box-sizing: border-box;

    h2, h3 {
        margin-top: 8px;
        margin-bottom: 8px;
    }
}

.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    font-size: 24px;
    cursor: pointer;
    overflow: hidden;

    :hover {
        filter: brightness(90%);
    }

    svg {
        /*transform: translate(-50%, -50%);*/
        fill: #000;
        width: 24px;
        height: 24px;
    }
}

dialog {
    ::backdrop {
        background: rgba(0, 0, 0, 0.5);
    }

    h2 {
        margin-top: 0;
    }
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    padding: 12px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    opacity: 0;
    color: white;

    svg {
        fill: white;
    }

    p {
        margin: 0;
    }
}

.toast-enter {
    animation: toastFadeIn 0.5s forwards;
}

.toast-exit {
    animation: toastFadeOut 0.5s forwards;
}

@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

.mobileOnly {
    visibility: hidden;
}

/* Mobile */
@media (max-width: 840px) {
    main {
        max-width: 100%;
    }

    nav {
        position: fixed;
        bottom: 0;
        display: flex;
        flex-direction: row;
        height: 60px;
        width: 100vw;
        padding-bottom: 15px;

        a {
            flex-grow: 1;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
    }

    .fab {
        bottom: calc(20px + 60px + 15px);
        right: 20px;
    }

    .toast {
        bottom: calc(20px + 60px);
    }

    #content {
        margin-bottom: 60px;
    }

    .mobileOnly {
        visibility: visible;
    }
}