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

.page-wrapper{
    margin-left: auto;
    margin-right: $leftbar-width;
}
.left-sidenav{
    border-left: 1px solid $border;
    border-right: 0;
}
.left-sidenav-menu {    
    li {
        > a {
            .menu-icon{
                margin-right: 0;
                margin-left: 6px;
            }
           
            i {
                margin-right: 0;
                margin-left: 0;
                &.ti-control-record{
                    margin-left: 0;
                }
            }
        }

        ul {
            padding: 0 25px 0 0;

            li {
                > a {
                    border-right: none;
                    padding: 6px 0px;
                }
            }
        }
        
    }
    
    .menu-arrow {
        float: left; 
        margin-left: 0;
        margin-right: auto;       
        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;

    .topbar-nav {
        padding-right: 0;
        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: 0;
        .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;                 
                &::before{
                    left: auto;
                    right: 14px;
                    transform: rotate(180deg);
                }
            }
        }
    }
}
  
.navigation-menu {
    >li {      
      a {
            i {
                margin-right: 0;
                margin-left: 8px;
            }                  
        }
    }
}

.navigation-menu>li a .hori-menu-icon{
    margin-right: 0;
    margin-left: 5px;
}


// leftbar-tab


  
  // Enlarge menu
  .enlarge-menu {
    
    .topbar {
        .navbar-custom{
            margin-left: auto;
        }        
        .topbar-left{
            margin-left: auto;
            margin-right: 0;
        }
    }
  }
  
  
  
  @media (max-width: 1024px) {
    
    .navbar-custom {
      .responsive-logo{
        padding-left: 0;
        padding-right: 10px;
      }
    }
    
    .enlarge-menu {
        .topbar {
            .topbar-left{
                margin-left: auto;
                margin-right: 0;
            }
        }
    }
    
    .page-wrapper {
        margin: 0;
    }
  }
  
  @media (min-width: 992px) {
    
    .main-menu-inner{
        .menu-body{
            .nav-link.with-sub::after {
                margin-left: auto;
                margin-right: 4px;
            }           
        }
    }
    .topbar .navigation-menu>li>a span .hori-menu-icon{
        margin-right: 0;
        margin-left: 5px;
    }
    .topbar .navigation-menu>li .submenu li a i{
        margin-right: 0;
        margin-left: 8px;
    }
  }
  


  

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



