//
// Navbars
// --------------------------------------------------
.navbar {
  @media (min-width: @screen-sm) {
    min-height: 63px;
  }

  .navbar-nav {
    list-style: none;
    font-family: @font-family-sans-serif-1;
    letter-spacing: .5px;
    @media (min-width: @screen-sm) {
      min-height: 63px;
    }

    &:before {
      content: "";
      height: 2px;
      width: 100%;
      background: @brand-primary;
      display: block;
      .box-shadow(0 0 5px @brand-primary);
    }

    > ul {
      padding: 0;
      margin: 0;
      display: block;
    }
  }
  
  @media (min-width: @screen-sm) {
    .navbar-nav > ul {
      background: url(../img/top-pattern.png) #161616;
    }

    .navbar-nav > ul > li {
      border-right: 1px solid #232323;
      text-transform: uppercase;
      position: relative;
      padding: 0 15px;

      &:before {
        content: "";
        height: 100%;
        width: 1px;
        display: block;
        background: #0e1114;
        position: absolute;
        right: 0;
      }

      &:first-child {
        border-left: 0;
      }

      > a {
        padding: 20px 0;
        position: relative;
        color: #fff;
        display: inline-block;
        
        &:before {
          content: "";
          height: 2px;
          width: 0;
          position: absolute;
          top: 0;
          left: 50%;        
          .box-shadow(~"0 5px 20px #099fe0");
          border-radius:0 0 50% 50%;
          .transition(all .3s); 
        }
      }

      > i {
        color: #fff;
        display: inline-block;
      }
      
      &.current-menu-parent,
      &.current-menu-item,
      &:hover {
        > a,
        > i {
          color: @link-hover-color;

          &:before {
            width: 100%;
            left: 0;
          }
        }
      }
    }

    .sub-menu {
      padding: 0;
      position: absolute;
      width: 200px;
      z-index: 0;
      .transition(z-index .2s);

      li {
        margin-top: 2px;
        background: url(../img/top-pattern.png) #161616;
        display: block; 
        width: 200px;
        text-transform: capitalize;
        text-align: center;
        position: relative;
        .opacity(0);
        .transition(all 0.3s);

        a { 
          padding: 10px 0;
          display: inline-block;
        }

        i:before {
          content: "\f0da";
        }

        &.current-menu-item,
        &:hover {
          > i,
          > a {
            color: @link-hover-color;
            text-shadow: 0 0 30px @brand-primary;
          }
        }
      }

      li:nth-child(odd) {
        margin-left: -100px;
      }

      li:nth-child(even) {
        margin-left: 100px;
      }
    }

    li:hover > .sub-menu {
      z-index: @zindex5;

      li {
        margin-left: 0;
        .opacity(1);
      }

      .submenu-delay(9);
    }

    .navbar-nav > ul > li > .sub-menu {
      margin: 0 0 0 -100px;
      top: 60px;
      left: 50%;
    }

    .navbar-nav > ul > li > .sub-menu {
      .sub-menu {
        left: 200px;
        top: -5px;
        padding: 0 10px;

        li {
          margin-left: 100px;
          clip: rect(0,0,0,0);
          .opacity(0);
        }
      }

      li:hover > .sub-menu {
        > li {
          margin-left: 0;
          clip: rect(0,1000px,1000px,0);
          .opacity(1);
        }
      }
    }
  }

  @media (max-width: @screen-xs-max) {
    .navbar-nav {
      clip: auto !important;
      position: static !important;
      width: 100%;
      background: url(../img/top-pattern.png) #161616;
    }

    .navbar-nav > ul {
      position: fixed; 
      background: #111;
      top: 40px;
      width: 100%;
      z-index: @zindex5;
      height: 0;
      overflow: hidden;

      .admin-bar & {
        top: 86px;
      }
    }
    
    li {
      display: block;
      position: relative;
    }    
  
    .navbar-nav {
      a {
        color: #fff;
        display: block;
        padding: @grid-gutter-width/2 @grid-gutter-width;
        border-bottom: 1px solid #222;
        border-bottom: 1px solid rgba(255,255,255,.1);
        max-height: 40px;
        font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
        font-size: 13px;
      }

      .current-menu-item > a,
      a:hover {
        color: #fff;
        text-shadow: 0 0 5px #fff;
      }

      i:before {
        position: absolute;
        right: 0;
        top: 0;
        text-align: center;
        line-height: 39px;
        cursor: pointer;
        .square(39px);
      }
    }

    .sub-menu {
      padding: 0;
      max-height: 0;
      overflow: hidden;
      .transition( max-height .5s -.2s);
      a {
        padding-left: 30px;
      }
    }

    .sub-menu .sub-menu {
      a {
        padding-left: 40px;
      }
    }

    .active + .sub-menu {
      max-height: 500px;
      .transition( max-height 1s);
    }
  }
}

// Fix long menu
// -------------------------
@media( min-width: @screen-sm ) {
  .longMenu {
    width: 9999px;
    position: relative;

    > li:first-child {
      padding-left: 60px !important;
    }
  }

  .main-navigation {
    .control {
      display: block;
      position: absolute;
      top: 2px;
      z-index: @zindex5;
      .size(50px,60px);
      .opacity(.5);

      i {
        background: url(../img/top-pattern.png) #161616;
        color: #fff;
        display: block;
        line-height: 60px;
        text-align: center;
        width: 49px; 
        font-size: 13px;
      }
    }

    .next {
      right: 0;
      border-left: 1px solid #232323;

      i {
        border-left: 1px solid #0E1114;
      }
    }

    .back {
      left: 0;
      border-right: 1px solid #232323;

      i {
        border-right: 1px solid #0E1114;
      }
    }
  }
}

// Tabbable tabs
// -------------------------

// Clear any floats
.tabbable {
  .clearfix();
}

.nav-tabs-by-select {
  width: 100%;
  border: 2px solid @link-hover-color;
  border-bottom: none;
  padding: 10px;
  -webkit-appearance: none;
  border-radius: 0; 
}

.nav-tabs {
  li {
    margin: 0 0 0 -1px;
    font-family: @font-family-sans-serif-1;
    text-transform: uppercase; 

    &:first-child {
      margin: 0;
    } 

    a {
      background-color: #efefef;
      #gradient > .vertical(#fefefe,#efefef);
      color: #333;
      padding: 9px 20px 10px;
      border: 1px solid #ddd;
      border-bottom: none;
    }
  }

  .active {
    position: relative;
    z-index: 1;

    a {
      color: #fff;
      border-color: @brand-primary;
      background-color: @brand-primary;
      #gradient > .vertical(lighten(@brand-primary,10%),@brand-primary);
    }
  }
}

.tab-content {
  border: 2px solid @brand-primary; 
  padding: @grid-gutter-width (@grid-gutter-width - 2);
}

// Show/hide tabbable areas
.tab-content > .tab-pane {
  display: none;
}
.tab-content {
  > .active {
    display: block;
  }

  ul {
    margin-bottom: 0;
  }
}