/*
Template Name: Dealzon - Admin & Dashboard Template
Author: Mannatthemes
Email: mannat.themes@gmail.com
File: RTL Stucture
*/


.left-sidenav-menu {
    padding-left: auto;
    padding-right: 0;
    
    li {
        > a {
           
            i {
                margin-right: 0;
                margin-left: 5px;
                &.ti-control-record{
                    margin-right: auto;
                    margin-left: 0;
                }
            }
        }

        ul {
            padding: 0 25px 0 0;

            li {
                > a {
                    border-right: none;
                   
                }
            }
        }
        
    }
    
    .menu-arrow {
        float: left;
        i:before{
            content: "\F141";
            font: "Material Design Icons";
        }
    }
    li.mm-active .menu-arrow.left-has-menu {
        i:before{
            content: "\F141";
            font: "Material Design Icons";
        }
    }
}


//
// Topbar
//


.topbar {
    .topbar-left {
        float: right;
        .logo {
            line-height: $topbar-height;
            .logo-lg {
                margin-left: 0;
                margin-right: 2px;
            }  
        }
    }
}
  
.navbar-custom {
    margin-left:auto;
    margin-right: $leftbar-width;

    .topbar-nav {
        li {
            float: right;         
        }
    }
}
  
  
  /* Notification */
  
.notification-list {
    margin-left: 0;   
    .noti-icon-badge {  
        right: auto;
        left: 8px;
    }
}
.topbar-nav{
    li:last-child{
        &.dropdown{
            .dropdown-menu{
                a.dropdown-item{
                    i{
                        float: right;
                    }
                }                
            }
        }
    }
}
  // Search
  
.app-search .form-control, 
.app-search .form-control:focus {
    padding-left: 40px;
    padding-right: 20px;
}
  
.app-search {
    margin-left: auto;
    margin-right: 20px;
}
  
.app-search a {
    right: auto;
    left: 0
}

// Horizontal

[data-layout="horizontal"] {
    .navbar-custom{
        margin-left: 0;
        margin-right: 160px;
        .topbar-nav{
            li:nth-last-of-type(2){
                &.dropdown{
                    .dropdown-menu{
                        a.dropdown-item{
                            i{
                                float: right;
                            }
                        }                
                    }
                }
            }
        }
    }
    .topbar {
        .topbar-left{
            width: 160px;
        }
    }
}

.navbar-custom-menu {     
    .has-submenu.active {          
        .submenu {
            li.active>a {
                padding-left: 0;
                padding-right: 35px;                  
                &::before{
                    left: auto;
                    right: 14px;
                    transform: rotate(180deg);
                }
            }
        }
    }
}
  
.navigation-menu {
    >li {      
      a {
            i {
                margin-right: 0;
                margin-left: 8px;
            }                  
        }
    }
}



// leftbar-tab

.leftbar-tab-menu {
    .main-icon-menu{
        .nav-link.active:before {
            content: '';
            position: absolute;
            left: auto;
            right: 45px;           
            border-top: 10px solid transparent;
            border-bottom: 10px solid transparent;
            border-left: 10px solid rgba($card-bg, .5);
            border-right: 0px solid transparent;            
        }
      }
  }
  
  .main-menu-inner {
    left: auto;
    right: 70px;
    .topbar-left {
        padding-left: 0;    
        padding-right: 20px;    
    }
    .menu-body{
        .nav-item {
            ul {
                li {
                    
                    a:before{
                        content: "";
                        position: absolute;
                        left: auto;
                        right: 24px;
                    } 
                }
                
            }           
        }
        .nav-link {
            i {
                margin-right: auto;   
                margin-left: 10px;        
            }
           
            .menu-arrow {
                i {
                    float: left;
                }
            }            
            
        } 
        
    }
  }
  
  
  // Enlarge menu
  .enlarge-menu {
    
    .topbar {
        .navbar-custom{
            margin-left: auto;
            margin-right: $main-icon-menu-width;
        }        
        .topbar-left{
            margin-left: auto;
            margin-right: 0;
        }
    }
    &.enlarge-menu-all {
       
        .topbar {
            .topbar-left{
                margin-left: auto;
                margin-right: 0;
            }
            .navbar-custom{
                margin-left: auto;
                margin-right: 0;
            } 
        }
    }
  }
  
  
  
  @media (max-width: 1024px) {
    
    .navbar-custom {
      margin-left: $leftbar-width-collapsed;
      .responsive-logo{
        padding-left: 0;
        padding-right: 10px;
      }
    }
    
    .enlarge-menu {
        .topbar {
            .topbar-left{
                margin-left: auto;
                margin-right: 0;
            }
        }
    }
    .enlarge-menu-all{
        .topbar {            
            .navbar-custom{
               margin-left: auto;
                margin-right: 0;
            } 
        }
    }
  }
  
  @media (min-width: 992px) {
    
    .main-menu-inner{
        .menu-body{
            .nav-link.with-sub::after {
                margin-left: auto;
                margin-right: 4px;
            }           
        }
    }
  }
  



@media (max-width: 1024px){
    .topbar .navbar-custom {
        margin-right: 70px;
        margin-left: 0;
    }
}

@media (min-width: 992px) {
    
    .topbar {
        .navigation-menu{
            >li{                
                &.last-elements {
                    .submenu {
                        right: auto;
                        left: 0;
                        >li.has-submenu {
                            .submenu {
                                right: auto; //right: auto; if you want submenu right
                                left: 100%; // left: 100%; if you want submenu right
                                margin-right: 0;
                                margin-left: 10px;
                                
                            }
                        }
                    } 
                }
                .submenu {
                    left: auto;
                    right: 0;
                    text-align: right;                    
                    >li{
                        &.has-submenu>a:after {
                            right: auto;
                            left: 20px;
                            transform: rotate(180deg);
                        }
                        .submenu {
                            right: 100%;
                            left: auto;                           
                        }
                    }
                    
                    li {
                        ul {
                            padding-right: 0;
                        }                        
                    }
                }                
            }
        }
    }     
}


@media (max-width: 991px) {
   
    .topbar {
        .navigation-menu {
            text-align: right;
            >li {
                >a {
                    &:after {
                        position: absolute;
                        right: auto;
                        left: 15px;
                    }
                }
                .submenu {
                    padding-right: 20px;
                    padding-left: 0;
                    li {                        
                        &.has-submenu>a:after {
                            right: auto;
                            left: 30px;
                        }
                    }
                    
                    &.megamenu>li>ul {
                        padding-right: 0;                        
                    }
                }
            }
        }
        .navbar-header {
            float: right;
        }
    }    
}


@media (min-width: 768px) {
   
    .topbar {
        .navigation-menu{
            >li{
                &.has-submenu:hover{
                    >.submenu {
                        >li{
                            &.has-submenu:hover{
                                >.submenu {
                                    margin-left: 0;
                                    margin-right: auto;
                                }   
                            }
                        }
                    }
                }                
            }
        }
    } 
}

@media (max-width: 768px){
    [data-layout="horizontal"] {        
        .topbar {
            .topbar-left{
                width: 70px;
            }
        }
    }
    
    .topbar{
        .topbar-left{
            margin-left: 0;
            margin-right: auto;           
        }       
    }
}



