// Navbar.
.navbar {
    flex-wrap: nowrap;

    .nav-link {
        line-height: 1;
    }

    .popover-region {
        margin-right: 0;
    }
    .popover-region-container {
        right: -6px;
        top: 40px;
    }
    .popover-region-header-container {
        height: 30px;
    }
    .popover-region-header-container,
    .popover-region-header-text {
        line-height: 30px;
    }
    .popover-region-toggle {
        width: auto;
        .icon {
            margin-right: 0;
        }
    }
}

@include media-breakpoint-up(xs) {
    .navbar {
        .nav-link {
            padding-left: 0.5rem;
            padding-right: 0.5rem;
        }
    }
}

.navbar-nav {
    .dropdown-menu {
        position: absolute;
    }
    .context-header-settings-menu .dropdown-menu {
        top: 112%;
    }
    .usermenu .dropdown-menu {
        left: auto;
        right: 0;
    }
}

.nav .caret {
    margin-left: 0;
}

.navbar-dark {
    .navbar-nav {
        .logininfo {
            color: $navbar-dark-color;
            padding: $nav-link-padding-y $nav-link-padding-x;
        }
    }
    a .icon {
        color: inherit !important; // stylelint-disable-line declaration-no-important
    }
}

.popover-region-toggle {
    &::after {
        bottom: -3px;
        right: 7px;
    }
    &::before {
        bottom: -2px;
        right: 6px;
    }
}

.navbar-plugin-output.fav .popover-region-toggle {
    &::after {
        right: 9px;
    }
    &::before {
        right: 8px;
    }
}

.dropdown-menu .fa {
    font-size: 16px;
}

.navbar .context-header-settings-menu {
    .dropdown-toggle > .icon {
        font-size: 1.33333em;
        height: 1.33333em;
        line-height: 1.33333em;
    }
}

@media (min-width: 576px) {
    .navbar {
        .context-header-settings-menu,
        .region-main-settings-menu {
            height: auto;
        }
    }
}

.usermenu {
    .login {
        line-height: $line-height-base;
        a {
            color: inherit;
            &:hover,
            &:focus {
                color: inherit;
            }
        }
    }

    .dropdown-toggle {
        padding-bottom: 0;
        padding-top: 0;

        img.userpicture {
            margin-right: 0;
        }
    }

    .dropdown-menu {
        top: unquote("calc(100% + 0.25rem)");  // stylelint-disable-line csstree/validator
    }
}

// fixed-bottom or not there.
.navbar-bottom,
.no-navbar {
    #page {
        margin-top: 0;
    }
}

@include media-breakpoint-down(xs) {
    .nav.usernav .usermenu .dropdown-toggle {
        padding-left: 0;
        padding-right: 0;
    }
}
