@import "mixins";
@import "variables";

.navbar-collapse {
    @media all and (min-width: 992px) {
        position: relative;
        padding-top: 14px;
    }

    @media all and (max-width: 992px) {
        border-top: 1px solid transparent !important;
        background: #fff;
        float: left;
        width: 100%;
        padding: 0;
        background: $navbar-black;
        z-index: 99;

        @include prefix(box-shadow, 0 2px 9px -4px rgba(0, 0, 0, 0.3), webkit moz ms);

        margin: 0 !important;
        position: absolute;
        top: $navbar-min-height-xs;
    }

    &.collapse {
        @media all and (max-width: 992px) {
            display: none !important;

            &.in {
                display: block !important;
            }
        }
    }
}

.navbar {
    min-height: $navbar-min-height;
    font-size: $font-size-large;
    border: none;
    background: none;
    z-index: 999;
    background: #fff;
    border-radius: 0;
    margin-bottom: 0;
    background: $navbar-bg;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    @media all and (max-width: 992px) {
        min-height: $navbar-min-height-xs;
    }

    .container {
        position: relative;
        max-width: 1130px !important;

        @media all and (max-width: 992px) {
            width: 100%;
            padding: 0;
        }
    }

    .navbar-left {
        @media all and (min-width: 992px) {
            padding: 40px 0 0;
            margin: -15px 0 0 -15px;
            display: inline-block;
            float: none !important;
        }

        @media all and (max-width: 992px) {
            margin: 0;
            padding: 15px 0 0;
        }

        > .navbar__item {
            @media all and (min-width: 992px) {
                padding: 0 28px 10px 0;
            }
        }

        .navbar__item {
            @media all and (max-width: 992px) {
                padding: 0;
            }

            &:first-child {
                @media all and (min-width: 992px) {
                    padding-left: 0;
                }
            }

            &.active {
                > .navbar__link {
                    color: $header-link-color-default;

                    @media all and (max-width: 992px) {
                        color: #272727;
                    }

                    &:hover {
                        color: rgba($header-link-color-default, 0.5);

                        @media all and (max-width: 992px) {
                            color: rgba(#272727, 0.5);
                        }
                    }

                    span {
                        border-bottom: 2px solid $header-link-color-default;
                        padding-bottom: 4px;
                        display: inline-block;
                    }
                }
            }


            .navbar__link {
                background: none;
                color: $header-link-color-default;

                span {
                    border-bottom: 2px solid transparent;
                    padding-bottom: 4px;
                    display: inline-block;
                }

                @media all and (min-width: 992px) {
                    border-bottom: 2px solid transparent;
                    padding: 0;
                }

                @media all and (max-width: 992px) {
                    color: #272727;
                }

                &:hover {
                    color: rgba($header-link-color-default, 0.5);
                    background: none;

                    @media all and (max-width: 992px) {
                        color: rgba(#272727, 0.5);
                    }
                }
            }

            .navbar__link.hover + .dropdown-menu {
                display: block;
            }

            &.dropdown {
                position: static;
                > .navbar__link {
                    @media all and (min-width: 992px) {
                        &:after {
                            content: '';
                            display: inline-block;
                            position: relative;
                            border-style: solid;
                            border-width: 1px 1px 0 0;
                            height: 6px;
                            width: 6px;
                            margin-left: 6px;
                            top: -3px;
                            @include prefix(transform, rotate(135deg), moz webkit o ms)
                        }
                    }
                }

                > .dropdown-menu {
                    max-width: 200px;
                    left: inherit;
                    padding: 13px 0;
                    margin-top: -8px;

                    @media all and (max-width: 992px) {
                        position: static;
                        border: none;
                        width: 100%;
                        max-width: 100%;
                        padding: 0;
                        @include prefix(box-shadow, none, webkit moz o ms);
                        background: none;
                        display: block;
                    }

                    @media all and (min-width: 992px) {
                        border-radius: 6px;
                        margin-left: -15px;
                        @include prefix(box-shadow, 0 2px 4px rgba(0,0,0,0.2), webkit moz o ms);

                        &:before,
                        &:after {
                            border-style: solid;
                            content: "";
                            position: absolute;
                            left: 30px;
                        }

                        &:before {
                            border-color: #ccc transparent;
                            border-width: 0 8px 9px;
                            top: -9px;
                        }

                        &:after {
                            border-color: #fff transparent;
                            border-width: 0 8px 8px;
                            top: -7px;
                        }
                    }

                    .navbar__item {
                        @media all and (max-width: 992px) {
                            padding: 0;
                        }

                        &.active {
                            span {
                                @media all and (min-width: 992px) {
                                    display: inline-block;
                                    border-bottom: 2px solid #272727;
                                }
                            }
                        }
                    }

                    .navbar__link {
                        white-space: normal;
                        word-break: break-word;
                        color: #272727;

                        @media all and (min-width: 992px) {
                            padding: 0 15px;
                            margin: 6px 0;

                            &:hover {
                                color: rgba(#272727, 0.5);
                            }
                        }

                        @media all and (max-width: 992px) {
                            padding: 5px 15px 5px 35px;
                        }
                    }
                }

                &:hover {
                    > .dropdown-menu {
                        display: block;
                    }
                }
            }
        }
    }

    .visible-md.visible-lg {
        @media all and (min-width: 992px) {
            margin-top: -10px;
        }
    }

    .navbar-right {
        margin-top: 5px;

        @media all and (max-width: 992px) {
            padding: 15px 0 0;
            margin: 15px 0 15px;
            border-top: 1px solid #ddd;
        }

        .navbar__item {
            font-size: $font-size-base;

            &:first-child {
                .navbar__link {
                    color: #fff;

                    @media all and (min-width: 992px) {
                        padding-bottom: 10px;
                    }

                    @media all and (max-width: 992px) {
                        color: #272727;
                        font-weight: 400;
                    }

                    &:hover {
                        color: rgba(#fff, 0.5);

                        @media all and (max-width: 992px) {
                            color: rgba(#272727, 0.5);
                        }
                    }
                }
            }

            &.active {
                @media all and (min-width: 992px) {
                    padding: 0 15px;
                }

                .navbar__link {
                    background: none;

                    @media all and (min-width: 992px) {
                        padding: 10px 0;
                    }
                }
            }

            .navbar__link {
                font-weight: bold;
                font-size: 16px;
                color: #fff;

                @media all and (max-width: 992px) {
                    color: $nav-item-color-dark;
                    font-size: $font-size-large;
                }

                &.btn__blue {
                    border: none;

                    @media all and (min-width: 992px) {
                        background: rgba(#fff, 0.2);
                        border-radius: 20px;
                        color: #fff;
                        padding: 0 22px;
                        height: 40px;
                        line-height: 40px;
                    }


                    @media all and (max-width: 992px) {
                        background: none;
                        color: #272727;
                        font-weight: 400;
                        border-radius: 0;
                    }

                    &:hover {
                        border: none;

                        @media all and (min-width: 992px) {
                            background-color: $link-color-hovered;
                        }

                        @media all and (max-width: 992px) {
                            color: rgba(#272727, 0.5);
                        }
                    }

                    &:active,
                    &:focus,
                    &:active:focus {
                        outline: none;
                    }
                }
            }

            &:not(.navbar__item__filled) {
                @media all and (min-width: 992px) {
                    margin-top: -4px;
                    margin-right: 10px;
                }
            }
        }
    }

    .navbar-nav {
        @media all and (max-width: 992px) {
            float: none !important;
        }

        .navbar__item {
            @media all and (max-width: 992px) {
                display: block;
                float: left;
                width: 100%;
            }

            .navbar__link {
                width: 100%;
                display: inline-block;
                @include transition(all 0.2s ease-in);

                @media all and (max-width: 992px) {
                    border: none;
                    &:hover {
                        border: none;

                        &:hover,
                        &:active,
                        &:active:focus,
                        &:focus {
                            background: rgba(#000, 0.05);
                            outline: none;
                        }
                    }
                }
            }
        }
    }
}

.burger-button {
    height: 2px;
    width: 100%;
    background: $burger-button-color;
    position: relative;

    &:after,
    &:before {
        content: "";
        display: block;
        height: 2px;
        position: absolute;
        width: 100%;
        background: $burger-button-color;
    }

    &:before {
        top: -7px;
    }

    &:after {
        bottom: -7px;
    }

    &__wrapper {
        width: 40px;
        height: 36px;
        margin-top: 35px;
        padding: 0 10px;
        cursor: pointer;
        position: absolute;
        right: 15px;
        top: 0;
        z-index: 999;
    }
}

.logo {
    padding-top: 11px;
    padding-bottom: 11px;
    position: relative;
    z-index: 9;

    @media all and (min-width: 992px) {
        margin-right: 55px !important;
    }

    @media all and (max-width: 992px) {
        margin-bottom: 0;
        float: left;
        width: 100%;
        padding-left: 15px;
    }

    @media all and (max-width: 768px) {
        padding-left: 0;
        margin-left: 0 !important;
    }

    .logo__text {
        color: #000;
        text-transform: uppercase;
        font-size: 18px;
        line-height: 50px;
        letter-spacing: 0.5px;
        padding: 0 15px;
        vertical-align: middle;

        img {
            display: inline-block;
            max-width: 100%;
            max-height: 100%;
            @media all and (max-width: 767px) {
                max-width: 225px;
            }
        }

        &:hover {
            color: #000;
            text-decoration: none;
        }
    }

    .logo__text--blue {
        color: #005cff;
    }
}

.invoice__logo {
    max-height: 150px;
}


.body__inner .navbar .navbar-left .navbar__item.dropdown {
    .dropdown-menu {
        @media all and (max-width: 992px) {
            background: none;
        }
    }

    .navbar__link {
        @media all and (max-width: 992px) {
            color: #fff;
        }
    }
}