/*
Template Name: Crovex - Admin & Dashboard Template
Author: Mannatthemes
Version: 1.0.0
File: Horizontal-nav
*/

[data-layout="horizontal"] {
    display: inherit;
    .page-wrapper{
        margin: 0 auto;
        width: 1380px;
        margin-top: calc(#{$topbar-height} + #{$navbar-custom-menu-height});
    }
    .navbar-custom{
        margin-left: 160px;
    }
    .topbar {
        background-color: $bg-navbar; 
        .topbar-left{
            width: 160px;
        }
    }
}

.divider {
    display: block;
    text-align: center;
    overflow: hidden;
    margin: 1rem 0;
    .divider-text {
      position: relative;
      display: inline-block;
      font-size: 12px;
      padding: 2px 6px;
      color: $dark;
      border: 1px dashed $border;
      border-radius: 30px;
      font-family: $font-secondary;
      &:after {
        left: 100%;
      }
      &:before {
        right: 100%;
      }  
    }
    .divider-text:after, 
    .divider-text:before {
      content: '';
      position: absolute;
      top: 50%;
      width: 9999px;
      border-top: 1px dashed $border;
    }
  }
  

.topbar{      
    .topbar-inner{
        width: 1380px;
        margin: 0 auto;
        padding: 0 12px;
    }
}
.navbar-custom-menu {
  background-color: $navbar-custom-menu;
  min-height: $navbar-custom-menu-height;
    .container-fluid {
        width: 1380px; 
    }
    .has-submenu.active {
        a {
            color: $white;
            i{
                color: $topnav-menu-icon-color;
            }
        }
        .submenu {
            li.active>a {
                color: $topnav-menu-item-active-color;
                padding-left: 35px;
                i{
                    display: none;
                }
                &::before{
                    content: "\6d";
                    font-family: "dripicons-v2";
                    position: absolute;
                    left: 14px;
                    top: 8px;
                    font-size: 14px;
                }
            }
        }
    }
}

.navbar-toggle {
  border: 0;
  position: relative;
  padding: 0;
  margin: 0;
  cursor: pointer;
  &:hover {
      background-color: transparent;
      span {
          background-color: $secondary;
      }
  }
  .lines {
      width: 25px;
      display: block;
      position: relative;
      padding-top: 28px;
      margin: 0 10px;
      height: 70px;
      -webkit-transition: all .5s ease;
      transition: all .5s ease;
  }
  span {
      height: 2px;
      width: 100%;
      background-color: $secondary;
      display: block;
      margin-bottom: 5px;
      -webkit-transition: -webkit-transform .5s ease;
      transition: -webkit-transform .5s ease;
      transition: transform .5s ease;
  }
  &.open {
    span {
        position: absolute;
        &:first-child {
            top: 34px;
            -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
            background-color: $secondary;
        }
        &:nth-child(2) {
            visibility: hidden;
        }
        &:last-child {
            width: 100%;
            top: 34px;
            -webkit-transform: rotate(-45deg);
            transform: rotate(-45deg);
        }
    }
  }
}



.navigation-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-block;
  >li {
    display: inline-block;
    position: relative;
    &:first-child a {
      padding-left: 0px;
    }
    a {
        display: block;
        font-size: 14px;
        transition: all .1s ease;
        line-height: 18px;
        padding-left: 25px;
        padding-right: 25px;
        
        &:hover {
            color: $gray-100;
            background-color: transparent;
        }
        &:focus {
            color: $gray-100;
            background-color: transparent;
        }
        &:active {
            color: $gray-100;
        }
        i {
            display: inline-block;
            font-size: 16px;
            margin-right: 8px;
            transition: all .1s ease;
            vertical-align: middle;
            color: $navbar-icon-color;
        }
                
      }
  }
}

@media (max-width: 1024px) {  
    body[data-layout="horizontal"]{
        display: flex;
        .page-wrapper{
            width: 100%;
        }
    }
    .topbar{
        .topbar-inner{
            width: 100%;
        }
    }  
    
    .navbar-custom-menu{
        .container-fluid{
            padding: 0 20px;
            width: 100%;
        }
    }
    .navigation-menu > li a{
        padding: 0 16px;
    }
    
    .page-content {
        min-height: 100vh;
    } 
}

@media (min-width: 992px) {
    
    .topbar {
        .navigation-menu{
            >li{
                >a {
                    padding-top: 20px;
                    padding-bottom: 20px;
                    color: $topnav-menu-item-color;                     
                    span{
                        vertical-align: middle;
                    }                              
                }
                &.last-elements {
                    .submenu {
                        left: auto;
                        right: 0;
                        >li.has-submenu {
                            .submenu {
                                left: auto; //right: auto; if you want submenu right
                                right: 100%; // left: 100%; if you want submenu right
                                margin-left: 0;
                                margin-right: 10px;
                                
                            }
                        }
                    } 
                }
                &:hover a {
                    color: $topnav-menu-item-hover-color;                             
                }
                .submenu {
                    position: absolute;
                    top: 100%;
                    left: 0;
                    z-index: 1000;
                    padding: 10px 0;
                    list-style: none;
                    min-width: 200px;
                    text-align: left;
                    visibility: hidden;
                    opacity: 0;
                    margin-top: 20px;
                    -webkit-transition: all .1s ease;
                    transition: all .1s ease;
                    background-color: $submenu-bg;
                    border: 1px solid $submenu-border-color;
                    border-radius: 4px;
                    box-shadow: 0 17px 34px 0 rgba(0, 0, 0, 0.05), 0 8px 14px 0 rgba(0, 0, 0, 0.02);
                    &.megamenu {
                        white-space: nowrap;
                        width: auto;
                        >li {
                            overflow: hidden;
                            width: 200px;
                            display: inline-block;
                            vertical-align: top;
                        }
                    }
                    >li{
                        &.has-submenu>a:after {
                            content: "\56";
                            font-family: "dripicons-v2";
                            position: absolute;
                            right: 20px;
                            top: 11px;
                            font-size: 13px;
                        }
                        .submenu {
                            left: 100%;
                            top: 0;
                            margin-top: 10px;
                            
                        }
                    }
                    
                    li {
                        position: relative;
                        ul {
                            list-style: none;
                            padding-left: 0;
                            margin: 0;
                        }
                        a {
                            display: block;
                            padding: 8px 12px;
                            clear: both;
                            white-space: nowrap;
                            font-size: 13px;
                            color: $menu-sub-item-color;
                            margin-bottom: 0;
                            transition: all .1s ease;
                            &:hover {
                                color: $menu-sub-item-hover-color;
                                background-color: $topnav-menu-item-hover-bg;
                            }
                            i{
                                font-size: 24px;
                                margin: 0;
                                vertical-align: middle;
                                color: $menu-dot-color;
                            }
                        }
                        span {
                            display: block;
                            padding: 8px 25px;
                            clear: both;
                            line-height: 1.42857143;
                            white-space: nowrap;
                            font-size: 10px;
                            text-transform: uppercase;
                            letter-spacing: 2px;
                            font-weight: 500;
                            color: $dark;
                        }
                    }
                }                
            }
        }
        .navbar-toggle {
            display: none;
        }

        #navigation {
        display: block;
        }
    }     
}

@media (max-width: 991px) {
    body[data-layout="horizontal"]{
        .page-wrapper{
            width: 100%;
            margin-top: $topbar-height;
        }
    }
    
    .topbar {
        .navigation-menu {
            float: none;
            max-height: 400px;
            text-align: left;
            width: 100%;
            >li {
                display: block;
                >a {
                    color: $mobile-menu-item-color;
                    padding: 15px;
                    font-size: 13px;
                    
                    &:after {
                        position: absolute;
                        right: 15px;
                    }
                    &:hover{
                        color: $primary;
                    }
                }
                .submenu {
                    display: none;
                    list-style: none;
                    padding-left: 20px;
                    margin: 0;
                    li {
                        a {
                            display: block;
                            position: relative;
                            padding: 7px 20px;
                            font-size: 13px;
                            color: $mobile-menu-item-color;
                            &:hover {
                                color: $primary;
                            }
                        }
                        &.has-submenu>a:after {
                            content: "\54";
                            font-family: "dripicons-v2";
                            position: absolute;
                            right: 30px;
                        }
                    }
                    &.open {
                        display: block;
                    }
                    .submenu {
                        display: none;
                        list-style: none;
                        &.open {
                            display: block;
                        }
                    }
                    &.megamenu>li>ul {
                        list-style: none;
                        padding-left: 0;
                        >li>span {
                            display: block;
                            position: relative;
                            padding: 15px;
                            text-transform: uppercase;
                            font-size: 11px;
                            letter-spacing: 2px;
                            color: $dark;
                        }
                    }
                }
                &.has-submenu.open>a {
                    color: $primary;
                }
            }
        }
        .navbar-header {
            float: left;
        }
        .container-fluid {
            width: 100%;
            padding: 0;
        }
    }


    #navigation {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        display: none;
        height: auto;
        max-height: 500px;
        padding-bottom: 0;
        overflow: auto;
        background-color: $card-bg;
        z-index: 1000;
    }
    #navigation.open {
        display: block;
        overflow-y: auto;
    }
    .navbar-custom-menu{
        min-height: 0;
    }
    
}



@media (min-width: 768px) {
    .topbar {
        .navigation-menu{
            >li{
                &.has-submenu:hover{
                    >.submenu {
                        visibility: visible;
                        opacity: 1;
                        margin-top: 0;
                        >li{
                            &.has-submenu:hover{
                                >.submenu {
                                    visibility: visible;
                                    opacity: 1;
                                    margin-top: -1px;
                                    margin-right: 0;
                                }   
                            }
                        }
                    }
                }
                
            }
        }
    }  
    .navbar-toggle {
        display: block;
    }    
}

@media (max-width: 768px){
    
    .topbar{
        .topbar-left{
            margin-right: 0;
            .logo{
                .logo-sm {
                    height: 32px;
                }
            }
        }       
    }
    .page-content {
        width: 100%;
        margin-top: 0;
        min-height: 100vh;
        padding: 0 0 60px 0;
    } 
    .page-title-box{
        margin-top: 5px;
    }
    .navbar-custom-menu .has-submenu.active a{
        color: $primary;
    }
}

@media (max-width: 767px) {
  .page-title-box {
    .breadcrumb,
    .state-information {
        display: none;
    }
  }  
}



@media (max-width: 620px) {
  .logo-large {
      display: none;
  }
  .logo-small {
      display: inline-block !important;
  }
  .topbar .has-submenu.active a {
      color: $primary;
  }
}




