* {
    margin: 0;
    list-style: none;
}

body {
    height: 100vh;
}

.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    background-color: var(--primary-color);
        
    a {
        border-radius: 50px;
        display: flex;
        place-items: center;
        flex-direction: column;
        text-decoration: none;

        .nav-label {
            color: var(--white);
        }

        &:hover {
            color: var(--white);
            text-decoration: underline;
            }

        &:focus-visible {
            outline: 3px solid var(--secondary-action);
            outline-offset: .3em;
        }
    }
}

.header-bar {
    background-color: var(--primary-color);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr;
    place-items: center;
    padding: 1.5em;

    h1 {
        grid-column: 2;
        grid-row: 1;
        font-size: var(--first-line);
        color: var(--white);
    }

    a {
        grid-column: 1;
        justify-self: start;

        &:hover svg, &:hover svg > * {
            fill: var(--secondary-action);
            stroke: var(--secondary-action);
        }
    }
}

main {
    display: grid;
    place-items: center;
    padding-bottom: 4em;

    img {
        padding-top: 2.5em;
        padding-bottom: 1.5em;
        width: 65vw;
        height: 45vh;
    }

    .theme-modes {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        place-items: center;
        justify-content: space-between;
        gap: 1.5em;
        padding: 0;

        button {
            all: unset;
            display: flex;
            cursor: pointer;
            border-radius: 50px;
            border: 3px solid var(--primary-color);

            svg, svg > * {
                width: 30px;
                height: 30px;
                padding: .5em;
                fill: var(--primary-color);
            }

            &:hover {
                scale: 1.2;
                transition: .7s ease-in;
            }

            &:focus-visible {
                outline: 3px solid var(--secondary-action) ;
                outline-offset: -.15em;
            }
        }  
    }
}

h2 {
    padding-top: .6em;
    line-height: 1.1em;
    font-size: 1.3em;
    color: var(--primary-color);
}

p {
    text-align: center;
    line-height: 1.3em;
    font-size: 1em;
    color: var(--primary-color);
}

.save-button {
    margin-top: 1em;
    width: 40vw;
    font-size: 1em;
    color: var(--white);
}

@keyframes --applied-animation {
    0% {
        scale: 0;
        opacity: 0;
        translate: y -5em;
    }

    50% {
        scale: 1.2;
        opacity: 1;
        translate: y -5em;
    }

    100% {
        scale: 1;
        opacity: 1;
        translate: y -5em;
    }
}

/* Light/Default mode thema kleuren */
body.light-mode {
    background-color: var(--white);
}

body.light-mode .nav-bar,
body.light-mode .header-bar {
    background-color: var(--primary-color);
}

body.light-mode .theme-modes {
    button {
        border: 3px solid var(--primary-color);

        svg, svg > * {
            fill: var(--primary-color);
        }    
    }
}

body.light-mode h2, 
body.light-mode p {
    color: var(--primary-color);
}

body.light-mode .save-button {
    color: var(--white);
}

/* Wanneer de gebruiker zijn donkere modus aanstaat van zijn apparaat */
@media (prefers-color-scheme: dark) {

    body {
        background-color: #4E6977;
    }

    .nav-bar {
        background-color: #10212A;
    }

    .header-bar {
        background-color: #10212A;
    }

    .theme-modes {
        .match-system-button,
        .dark-mode-button,
        .light-mode-button {
            border: 3px solid var(--white);

            svg, svg > * {
                fill: var(--white);
            }    
        }
    }

    h2,
    p {
        color: #E9ECEE;
    }

    .save-button {
        color: #10212A;
    }
}

@media (prefers-color-scheme: light) {
    p {
        color: var(--primary-color);
    }
}

/* Dark mode thema kleuren */
body.dark-mode {
    background-color: #4E6977;
}

body.dark-mode .nav-bar {
    background-color: #10212A;
}

body.dark-mode .header-bar {
    background-color: #10212A; 
}

body.dark-mode .theme-modes {
    button {
        border: 3px solid #E9ECEE;

        svg, svg > * {
            fill: #E9ECEE;
        }    
    }
}

body.dark-mode h2, 
body.dark-mode p {
    color: #E9ECEE;
}

body.dark-mode .save-button {
    color: #10212A;
}