@import url('../../../../assets/css/variables.css');

li a {
    text-align: center;
    color: var(--text-on-dark);
}

.chevron-down {
    min-width: var(--font-md);
    min-height: var(--font-md);
    color: var(--text-on-dark);
    cursor: pointer;
    transition: all .25s linear;
}

nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: var(--background-dark);

    & {
        .menu-button {
            display: none;
        }

        .navbar-list {
            width: 100%;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            text-align: center;
            list-style: none;

            & {

                .pages-group {
                    min-width: 0;
                    justify-content: center;
                    align-items: center;
                    border-left: 1px solid var(--surface-dark);
                    position: relative;
                    transition: all .5s ease-in-out;

                    & {
                        &:last-child {
                            border-right: 1px solid var(--surface-dark);
                        }

                        a {
                            width: 100%;
                            height: 3.2rem;
                            display: flex;
                            justify-content: start;
                            align-items: center;
                            padding: 0 .5rem 0 .5rem;
                            text-decoration: none;
                        }

                        .pages {
                            height: 0;
                            display: flex;
                            justify-content: start;
                            align-items: center;
                            flex-direction: column;
                            overflow: hidden;
                            position: absolute;
                            background-color: var(--background-dark);
                            transition: all .3s ease-in-out;

                            & {
                                li {
                                    width: 100%;
                                    display: flex;
                                    justify-content: start;
                                    align-items: start;
                                    padding: .1rem .7rem .1rem .7rem;
                                    border-bottom: 1px solid var(--background-dark);
                                    cursor: pointer;
                                    transition: all .3s ease-out;
                                }

                                a {
                                    min-height: 3rem;
                                    height: auto;
                                    display: flex;
                                    justify-content: start;
                                    align-items: center;
                                    text-align: start;
                                    text-decoration: none;
                                }

                                li:hover {
                                    background-color: var(--background-dark-hover);
                                }
                            }
                        }
                    }

                    &:hover {
                        background-color: var(--background-dark-hover);
                    }
                }
            }
        }
    }
}

@media only screen and (max-width: 1200px) {
    nav {
        width: 20rem;
        min-height: 100vh;
        flex-direction: column;
        justify-content: start;
        position: fixed;
        left: -20rem;
        transition: all ease-in-out .5s;

        & {
            .menu-button {
                display: flex;
                justify-content: center;
                align-items: center;
                position: absolute;
                top: 3rem;
                right: -3rem;
                z-index: 1;
                padding: 5px;
                border-radius: 10px;
                transform: translate(50%, -50%);
                background-color: var(--background-dark);
                transition: inherit;
                
                & {
                    #menu-toggle {
                        display: none;
                    }
                    
                    .menu-toggle {
                        width: 2.5rem;
                        height: 2.5rem;
                        display: flex;
                        flex-direction: column;
                        justify-content: space-around;
                        align-items: center;
                        position: relative;
                        cursor: pointer;
                    }

                    .menu-toggle-line {
                        width: 2rem;
                        height: 5px;
                        display: flex;
                        position: absolute;
                        border-radius: 5px;
                        background-color: var(--background-light);
                        transition: all ease-in-out .3s;
                    }
                }
            }

            .navbar-list {
                flex-direction: column;
                justify-content: start;
                align-items: start;

                & {
                    .pages-group {
                        width: 100%;
                        /* min-width: 100%; */
                        /* max-width: 100%; */
                        justify-content: center;
                        align-items: center;
                        position: relative;
                        transition: all .5s ease-in-out;

                        & {
                            .pages {
                                width: 100%;
                                /* max-width: 100%; */
                                position: relative;

                                & {
                                    li {
                                        padding: 0;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

@media only screen and (max-width: 768px) {
    nav {
        width: 100%;
        left: -100%;
    }
}