header {
    .navbar {
        background-image: linear-gradient(to right, $mainBrandColor, $secondBrandColor);
        box-shadow: 0 0 2px 2px $headerLightShadowColor, 0 2px 4px 2px $headerDarkShadowColor;
        padding-top: .2em;
        padding-bottom: .2em;

        .logo {
            width: 2em;
            top: 3px;
            left: 1.3em;
            position: fixed;
            fill: $textBrandColor;

            circle {
                fill: $mainBrandColor;
                stroke: $textBrandColor;
            }

            @media (min-width: $bp-md) {
                width: 3em;
                left: 0.8em;
            }
        }

        .brand-name {
            color: $textBrandColor;
            font-size: 1em;
            font-weight: 400;
            vertical-align: bottom;
            line-height: 1.1em;
            margin-left: 3.7em;
        }

        a {
            font-weight: 500;
        }

        a.active {
            border-bottom: solid 3px $textBrandColor;
            border-radius: 2px;
        }

        a.nav-link {
            color: $textBrandColor;
            font-size: .9em;

            &:hover {
                color: $textBrandHighlightColor;
            }
        }

        .dropdown-menu {
            padding: 0;
            background-color: $backgroundColor;
            border-color: $dropdownBorderColor;

            a {
                font-weight: $linkWeight;
            }

            i {
                color: $textColor;
            }
        }

        .dropdown-item.active {
            font-weight: 500;
            background-color: transparent;
            background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='black' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: .4rem .6rem;
            background-size: .75rem .75rem;
            border: 0;

            &:hover {
                background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='white' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");
            }
        }

        .dropdown-item {
            color: $textColor;

            &:hover {
                color: $textBrandColor;
                background-color: $mainBrandColor;
            }
        }
    }

    .navbar-dark .navbar-nav .nav-link {
        color: $textBrandColor;

        &:hover {
            color: $textBrandHighlightColor;
        }

        &:active {
            color: $textBrandHighlightColor;
        }
    }

    .navbar-dark .navbar-nav .nav-link.active {
        color: $textBrandColor;
        cursor: default;

        &:hover {
            color: $textBrandColor;
        }

        &:active {
            color: $textBrandColor;
        }
    }
}

#navbar-links {
    position: static;
}

#search_form {
    position: static;
    display: flex;
}

#search_close {
    display: none;
}

#search_show {
    display: none;
}

#search_textbox {
    margin: 4px 0 5px 0;
    width: 100%;
}

@media (min-width: $bp-md) {
    #navbar-links {
        position: absolute;
        right: -700px;
        transition: right 0.5s;
    }

    #navbar-links.active {
        right: 1rem;
        transition: right 0.5s;
    }

    #search_form {
        position: absolute;
        right: -700px;
        transition: right 0.5s;
    }

    #search_form.active {
        right: 1rem;
        transition: right 0.5s;
    }

    #search_close {
        display: block;
        background-color: rgba(0, 0, 0, 0);
        color: $textBrandColor;
        border-width: 0;
        cursor: pointer;

        &:hover {
            color:  $textBrandHighlightColor;
        }
    }

    #search_show {
        display: block;
    }

    #search_textbox {
        width: calc(1rem * 22);
    }
}
