@use "../abstract/" as abstract;

#topmenu {
    display: none;
    font-weight: bold;
    text-align: center;

    @include abstract.for-desktop {
        display: flex;
        width: 100%;
        font-weight: bold;
        text-align: center;

        a {
            color: inherit;
        }
    }

    a {
        color: inherit;
    }

    > .topmenu-sep {
        display: inline-block;
        flex: 1 1 auto;
    }

    .nav > li,
    .mod-menu__sub > li {
        padding: 0;
        border-style: none;
        height: 100%;
    }

    .nav {
        flex: 0 0 auto;
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-between;
        align-items: center;

        @include abstract.for-desktop {
            padding: 0 10px;
            margin: 0;
            width: 980px;
        }

        > li {
            display: inline-block;
            text-align: left;

            @include abstract.for-desktop {
                text-align: left;
            }

            > a {
                font-size: large;
                display: block;
                height: 100%;

                @include abstract.for-desktop {
                    font-size: large;
                    padding: 10px;
                    z-index: 3001;
                }
            }

            & > a,
            &:hover > a {
                background-color: inherit;
            }

            > .mod-menu__sub {
                position: absolute;
                display: none;

                @include abstract.for-desktop {
                    margin: 0 20px 10px 0;
                    border: none;
                    padding: 0;
                }

                > li {
                    @include abstract.for-desktop {
                        padding: 0 5px;
                    }

                    > a {
                        display: block;

                        @include abstract.for-desktop {
                            padding: 10px 5px 10px 4px;
                            border-left: 6px solid transparent;
                        }
                    }

                    &:hover > a {
                        text-decoration: none;
                    }
                }
            }

            &:hover > .mod-menu__sub {
                display: block;

                @include abstract.for-desktop {
                    box-shadow: 3px 5px 5px 2px rgb(0 0 0 / 50%);
                }
            }
        }
    }

    @include abstract.for-desktop {
        li > a,
        li:hover > a,
        li:focus > a,
        li:active > a {
            background-color: inherit;
            color: inherit;
        }

        .mod-menu__sub > li:hover > a:hover,
        .mod-menu__sub > li:focus > a:hover,
        .mod-menu__sub > li:hover > a:focus {
            text-decoration: none;
        }
    }

    // Special colors for topics
    > ul.nav .mod-menu__sub a.lehre {
        border-left-color: abstract.$color-lehre;
    }

    > ul.nav .mod-menu__sub a.breitensport {
        border-left-color: abstract.$color-breitensport;
    }

    > ul.nav .mod-menu__sub a.jugend {
        border-left-color: abstract.$color-jugend;
    }

    > ul.nav .mod-menu__sub a.jmd {
        border-left-color: abstract.$color-jmd;
    }

    > ul.nav .mod-menu__sub a.fachverbaende {
        border-left-color: abstract.$color-fachverbaende;
    }

    > ul.nav .mod-menu__sub a.sport {
        border-left-color: abstract.$color-sport;
    }
}

#topmenu-div {
    @include abstract.for-desktop {
        position: sticky;
        top: 0;
        width: 100%;
        // height: 40px;
        z-index: 1;
    }
}

a.facebook {
    img {
        display: none;
        height: 25px;

        @include abstract.for-desktop {
            display: inline;
        }
    }

    > span.image-title {
        @include abstract.for-desktop {
            display: none;
        }
    }
}
