// Utility classes

// Fighting/interop with bootstrap
.Dropdown {
    &:active,
    &:focus,
    &:hover {
        color: $white;
        text-decoration: none;
    }

    &:hover,
    :global(.open) & {
        color: $slate-gray;

        & svg:global(.fa-fw) {
            color: $secondary-blue;
        }
    }

    :global(.btn.btn-default) {
        background-color: $osf-dark-blue-navbar;
        border: 0;

        svg {
            font-size: 20px;
        }

        &:hover,
        &:focus {
            outline: 0;
        }
    }
}

:global(.with-custom-branding) .Service.Dropdown {
    display: none;
}

.DropdownMenu {
    background-color: $midnight-blue;
    border-radius: 2px;
    border: 0;
    top: 10px;

    // Override bootstrap/osf-style
    & > li > a:hover {
        color: $secondary-blue;
        background-color: $midnight-blue;
        background-image: none;
    }
}

:global(.media-mobile) .HideOnMobile,
:global(.media-tablet) .HideOnTablet,
:global(.media-desktop) .OnlyOnMobile,
:global(.media-tablet) .OnlyOnMobile {
    display: none;
}

// /Utility classes

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

.Logo {
    width: 35px;
    height: 35px;
    margin-right: 5px;
    background-size: 100%;
    background-image: var(--navbar-logo-img-url);
    background-repeat: no-repeat;
}

.HomeLink {
    color: $white;
    font-size: 18px;
    font-weight: 400;
    text-decoration: none;
    margin: 0 16px 0 10px;

    &.HomeLink:hover {
        color: $white;
        text-decoration: none;
    }
}

.Service {
    color: $white;
    font-size: 20px;

    & > strong {
        text-transform: uppercase;
        margin-right: -5px;
    }
}

.ServiceDropdownMenu {
    font-size: 20px;

    ul {
        list-style: none;
        padding-inline-start: 0;
    }

    li>a {
        display: block;
        padding: 3px 20px;
        line-height: 1.8;
        white-space: nowrap;
        clear: both;
        font-weight: 400;
        color: #fff;
    }

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

.ServiceDropdownEntry {
    font-size: 20px;
    text-transform: uppercase;
}

.SecondaryNavLinkButton {
    margin-left: 25px;
}

.AuthDropdown {
    margin-left: 15px;
}

.logout-link {
    color: $color-text-white;
    font-size: 16px;
    padding: 3px 20px;
}

.logout-link:hover {
    color: #15a5eb;
    background-color: #263947;
    background-image: none;
}

.Gravatar {
    .Dropdown:hover &,
    // Bootstrap interop
    :global(.open) & {
        opacity: 0.8;
    }
}

.AuthDropdownMenu {
    font-size: 16px;
    right: 0;
    left: auto;

    ul {
        list-style: none;
        padding-inline-start: 0;
    }

    // Logout and sign in buttons
    & > li > :global(.btn.btn-link) {
        color: $white;
        display: block;
        padding: 3px 20px;
        font-size: inherit;

        &:hover {
            color: $secondary-blue;
            text-decoration: none;
            outline: 0;
        }
    }

    li>a {
        display: block;
        padding: 3px 20px;
        line-height: 1.8;
        white-space: nowrap;
        clear: both;
        font-weight: 400;
        color: #fff;
    }

    li>a:hover,
    li>button:hover {
        text-decoration: none;
    }

    :global(.fa.fa-user-plus) {
        position: relative;
        left: 2px;
        margin-right: 3px;
    }
}

.login-link {
    color: $color-text-white;
    margin-left: 15px;
}
