@import "variables";

.top-bar {
    position: fixed;
    padding: 0 24px;
    background-color: #2a2929;
    width: 100%;
    top: 0;
    height: $top-bar-height;
    transition: background-color 0.7s;
    z-index: 10;
    display: flex;
    align-items: center;

    .top-bar-content {
        display: flex;
        flex: 1;
        align-items: center;
        max-width: $container-max-width;
        margin: auto;
    }

    @media all and (max-width: $sm-breakpoint){
        padding: 12px;
    }

    &.landing-page {
        background-color: transparent;
        .right {
            a:link, a:visited {
                color: $gray-700;
            }
            a:hover {
                color: $gray-500;
                text-decoration: none;
            }
        }

        &.floating {
            background-color: #2a2929;

            .right {
                a:link, a:visited {
                    color: $gray-400;
                }
                a:hover {
                    color: $gray-100;
                    text-decoration: none;
                }
            }
        }
    }

    .flex-spacer {
        flex: 1;
    }

    .left {
        display: flex;
        align-items: center;
    }

    .logo {
        img {
            max-width: 32px;
            margin-right: 12px;
        }
        display: flex;
        align-items: end;
        color: $brand-color;
        font-size: 18px;
        font-size: 24px;
        letter-spacing: 0px;
        font-weight: 600;

        .logotype {
            font-family: $brand-font-face;
            display: inline-block;
            margin-right: 12px;
            @media all and (max-width: $sm-breakpoint){
                display: none;
            }
        }
    }


    .alpha-label {
        display: inline-block;
        background-color: #ffd400;
        padding: 3px 6px;
        border-radius: 3px;
        font-size: 14px;
        font-weight: bold;
        text-transform: uppercase;
        color: #736108;
    }

    .right {
        @media all and (max-width: $sm-breakpoint){
            text-align: right;
        }
        a {
            margin-left: 12px;
        }
        a:link, a:visited {
            color: $gray-400;
        }
        a:hover {
            color: $gray-100;
            text-decoration: none;
        }
    }

    .search-input {
        display: flex;
    }
    #searchInput {
        width: 100%;
        border-radius: 3px;
        border: 1px solid $gray-900;
        padding: 6px 9px;
        background-color: transparentize($gray-300, 0.2);
        color: $gray-900;
        transition: background-color 0.2s;
        margin: 0;

        &:focus {
            background-color: $gray-300;
        }
        @media all and (max-width: $sm-breakpoint){
            background-color: $gray-300;
        }
    }
    button.search-icon {
        background-color: transparent;
        padding: 0;
        margin: 0;
        border: none;
        display: none;
        img {
            width: 24px;
            height: 24px;
        }
        @media all and (max-width: $sm-breakpoint){
            display: block;
        }
    }
}
