// 
// _header.scss
// 

#page-topbar {
    position: sticky;
    top: 0;
    right: 0;
    margin-left: $sidebar-width;
    z-index: 1002;
    background-color: $header-bg;
    box-shadow: $box-shadow;
}

.navbar-header {
    display: flex;
    -ms-flex-pack: justify;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    height: $header-height;
    padding: 0 calc(#{$grid-gutter-width} / 2) 0 0;

    .dropdown {
        .header-item.show {
            color: $primary;
        }
    }

    .navbar-brand-box{
        display: none;
    }
}

.verti-dash-content{
    background: $header-dark-bg;
    border-top: 1px solid rgba($white,.1);
    padding: 0 calc(#{$grid-gutter-width} / 2) 0 calc(#{$grid-gutter-width} / 2);
}

body {
    &:not([data-sidebar-size=sm]) {
        .navbar-header {
            .vertical-menu-btn {
                display: none;
            }
        }

        .app-search {
            margin-left: 22px;
        }
    }
}

.navbar-brand-box {
    padding: 0 1.5rem;
    width: $sidebar-width;
    position: fixed;
    z-index: 1;
    background-color: $navbar-brand-box-bg;
}

.logo {
    line-height: $header-height;

    .logo-sm {
        display: none;
    }
}

.logo-dark {
    display: $display-block;
}

.logo-light {
    display: $display-none;
}

.logo-txt {
    font-weight: 700;
    font-size: 20px;
    vertical-align: text-bottom;
    margin-left: 5px;
    line-height: 1;
    color: $dark !important;
}

/* Search */

.app-search {
    padding: calc(#{$header-height - 38px} / 2) 0;

    .form-control {
        height: 40px;
        padding-left: 40px;
        padding-right: 20px;
        border-color: $gray-300;
        background-color: $topbar-search-bg;
        box-shadow: none;
    }
    span {
        position: absolute;
        z-index: 10;
        font-size: 16px;
        line-height: 38px;
        left: 13px;
        top: 0;
        color: $gray-600;
    }
}

// Mega menu

.megamenu-list {
    li{
        position: relative;
        padding: 5px 0px;
        a{
            color: $dropdown-color;
        }
    }
}

@media (max-width: 991.98px) {
    .navbar-brand-box {
        width: auto;
    }

    #page-topbar {
        margin-left: 0;

        .navbar-header {
        
            .navbar-brand-box{
                display: inline-block;
                position: relative;
                background: $header-dark-bg;
            }

            .vertical-menu-btn {
                display: inline-block;
            }
        }
    }

    .logo {

        span.logo-lg {
            display: none;
        }

        span.logo-sm {
            display: inline-block;
        }
    }
}

.page-content {
    padding: calc(#{$header-height} - 33px) calc(#{$grid-gutter-width} / 2) $footer-height calc(#{$grid-gutter-width} / 2);
}

.header-item {
    height: $header-height;
    box-shadow: none !important;
    color: $header-item-color;
    border: 0;
    border-radius: 0px;

    &:hover {
        color: $header-item-color;
    }
}

.header-profile-user {
    height: 36px;
    width: 36px;
    border: 1px solid darken($gray-300, 2%);
    padding: 3px;
}
.user{
    .user-item-desc{
        line-height: 1.2;
    }
    
    .user-name{
        font-size: 14.4px;
        display: block;
        color: $gray-700;
    }
    
    .user-sub-title{
        color: $text-muted;
        font-size: 11px;
        font-weight: $font-weight-semibold;
    }
}

.noti-icon {
    position: relative;
    i {
        font-size: 20px;
        color: $header-item-color;
        margin-top: 6px;
    }

    .noti-dot {
        position: absolute;
        top: 26px;
        right: 8px;
        height: 15px;
        width: 15px;
        color: $white;
        line-height: 13px;
        font-weight: 500;
        font-size: 10px;
    }
}
.notification-item {
    .d-flex {
        padding: 0.75rem 1rem;

        &:hover {
            background-color: $dropdown-link-hover-bg;
        }
    }
}

// Dropdown with Icons
.dropdown-icon-item {
    display: block;
    border-radius: 3px;
    line-height: 34px;
    text-align: center;
    padding: 15px 0 9px;
    display: block;
    border: 1px solid transparent;
    color: $gray-600;

    img {
        height: 24px;
    }

    span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    &:hover {
        border-color: $gray-200;
    }
}

// Full Screen
.fullscreen-enable {
    [data-toggle="fullscreen"] {
        .uil-minus-path::before {
            content: '\eb8d';
        }
    }
}

body[data-topbar="dark"] {
    #page-topbar{ 
        background: $header-dark-bg;
    }

    .navbar-header {
        .dropdown.show {
            .header-item {
                background-color: rgba($white, 0.05);
            }
        }

    }

    .header-profile-user {
        border-color: rgba($white, 0.25);
    }

    .user-name{
        color: $header-dark-item-color;
    }
    
    .user-sub-title{
        color: rgba($white,0.5);
    }
    
    .noti-icon {
        i {
            color: $header-dark-item-color;
        }

        .noti-dot{
            box-shadow: 0 0 0 3px $header-dark-bg;
        }
    }

    .app-search {
    
        .form-control {
            background-color: rgba($white, 0.1);
            border-color:  rgba($white, 0.15);
            color: rgba($white, 0.7);
        }
        span,
        input.form-control::-webkit-input-placeholder {
            color: rgba($white,0.5);
        }
    }
}

body[data-sidebar="dark"] {
    .navbar-brand-box {
        background: $sidebar-dark-bg;

        .logo-dark {
            display: none;
        }
    
        .logo-light {
            display: block;

        }
    }


}

@media (max-width: 600px) {
    .navbar-header {
        .dropdown {
            position: static;

            .dropdown-menu {
                left: 10px !important;
                right: 10px !important;
            }
        }
    }
}

@media (max-width: 380px) {
    .navbar-brand-box {
        display: none;
    }
}


@media (max-width: 374.99px) { 
    .navbar-brand-box {
        padding: 0 1rem;
    }

    .language-switch {
        display: none !important;
    }
}

