@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;
        background: #fff;
        float: left;
        width: 100%;
        padding: 0;

        @include prefix(box-shadow, 0 2px 9px -1px 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;

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

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

    .container {
        position: relative;

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

    .navbar-left {
        display: inline-block;

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

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

        > .navbar__item {
            padding: 10px 40px 10px 0;

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

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

            &.active {
                > .navbar__link,
                > .navbar__link:hover {
                    background: none;
                    color: $nav-item-color-hover;

                    span {
                        border-bottom: 2px solid $nav-item-border-color;
                        padding-bottom: 4px;
                        display: inline-block;
                    }
                }
            }

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

            .navbar__link {
                padding: 0;
                color: $nav-item-color-dark;

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

                &:hover {
                    background: none;
                    color: $theme_button_color_2;
                }
            }

            .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: 9px 0;
                    margin-top: -10px;

                    @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);
                        display: block;
                        background: none;
                    }

                    @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;
                        }

                        .navbar__link {
                            border-bottom: none;
                        }
                    }

                    .navbar__link {
                        white-space: normal;
                        word-break: break-word;
                        @media all and (min-width: 992px) {
                            padding: 0 15px;
                            margin: 6px 0;
                        }

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

                @media all and (min-width: 992px) {
                    &:hover {
                        > .dropdown-menu {
                            display: block;
                        }
                    }
                }
            }
        }
    }

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

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

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

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

            &:first-child {
                .navbar__link {
                    font-size: 16px;

                    @media all and (min-width: 992px) {
                        padding-bottom: 10px;
                        color: $nav-item-color-gray;
                    }

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

                    &:hover {
                        color: #000;

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

            &.active .navbar__link {
                background: none;
                color: $nav-item-color-dark;
            }

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

            .navbar__link {
                &.btn__blue {
                    @media all and (max-width: 992px) {
                        color: $nav-item-color-dark;
                        background: none;

                        &:hover {
                            color: $theme_button_color_2;
                        }
                    }

                    @media all and (min-width: 992px) {
                        padding: 0 22px;
                        height: 40px;
                        line-height: 40px;
                        background: $btn-blue-bg;
                        border: 1px solid darken($btn-blue-bg, 5);
                        color: $btn-blue-color;
                        border-radius: 6px;

                        &:hover {
                            @media all and (min-width: 992px) {
                                background: rgba($btn-blue-bg, 0.7);
                            }

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

                        &:active,
                        &:focus,
                        &:active:focus {
                            @include prefix(box-shadow, none, moz ms webkit);
                        }
                    }
                }

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

            &: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;
            width: 100%;
        }

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

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

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

                    &:hover {
                        border-bottom: 2px solid transparent;
                    }

                    &: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;
        margin-bottom: -25px;
        padding-bottom: 25px;
    }

    @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;
}
