
//
// Navbar
// --------------------------------------------------

.navbar-brand {
  padding: 0 15px;

  span {
    width: 105px;
    height: 34px;
    margin: (@navbar-height - 34)/2 0;
    display: block;
    text-indent: -9999px;
    overflow: hidden;
    background-repeat: no-repeat;

    .img-retina(@logo-path, @logo-path2x, 105px, 34px);
  }

  > img {
    max-height: 34px;
    display: inline-block;
    margin: (@navbar-height - 34)/2 0;
  }
}

.navbar {

  .dropdown {
    .clearfix();

    > a {
      float: left;
    }
  }

  &.navbar-transparent {
    background: transparent;
    .box-shadow(none);
    background: -moz-linear-gradient(top, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 100%);
    background: -webkit-linear-gradient(top, rgba(0,0,0,.7) 0%,rgba(0,0,0,0) 100%);
    background: linear-gradient(to bottom, rgba(0,0,0,.7) 0%,rgba(0,0,0,0) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#00000000',GradientType=0 );
  }
}

.navbar-nav__drop {
  float: right;
  color: @link-color;
  padding: 10px 20px;
  position: relative;
  z-index: 20;
  cursor: pointer;

  @media (min-width: @grid-float-breakpoint) {
    line-height: @line-height-computed;
    margin-left: -@navbar-padding-horizontal;
    padding: 0 15px 0 5px;
  }

  @media (min-width: @grid-float-breakpoint) and (max-width: 840px) {
    margin-left: -10px;
  }
}

.nav-main {
  margin-top: 0;
  margin-bottom: 0;

  > li {
    border-top: 1px solid fade(@inv-border-color, 10%);
  }
}

@media (min-width: @grid-float-breakpoint) {

  .nav-main {
    padding: (@navbar-height - @line-height-computed)/2 0;

    > li {
      border-top: 0 none;

      > a {
        // text-transform: uppercase;
        line-height: @line-height-computed;
        padding-top: 0;
        padding-bottom: 0;
      }
    }
  }

  .nav-account {
    margin-right: -30px;

    > li {

      > a {
        line-height: 34px;
        padding-top: (@navbar-height - 34px)/2;
        padding-bottom: (@navbar-height - 34px)/2;

        .fa {
          width: 34px;
          height: 34px;
          line-height: 34px;
          text-align: center;
          border-radius: 50%;
          background: fade(#fff, 50%);
        }

        &:hover {

          .fa {
            background: @link-color;
            color: #fff;
          }
        }
      }
    }

    .dropdown-menu {
      margin-top: 0 !important;
      right: 10px;
    }
  }

  .dropdown-more {
    .dropdown-menu {
      left: auto;
      right: 0;
    }
  }
}

// Default navbar
.navbar-default {
  margin-bottom: 0;
  border: 0 none;
  .box-shadow(0 1px 2px rgba(0,0,0,.16));
  z-index: 50;

  .navbar-nav > .open > a,
  .navbar-nav > .active > a {
    background-color: darken(@navbar-default-link-active-bg, 5%);
  }

  .navbar-toggle {
    border-color: transparent;

    .icon-bar {
      background-color: @navbar-default-link-active-color;
    }

    &:hover,
    &:focus {
      border-color: fade(@navbar-default-link-active-color, 70%);
      background-color: fade(@navbar-default-link-active-color, 30%);
    }
  }
}

.navbar-brand,
.navbar-nav > li > a {
  text-shadow: none;

  @media (min-width: @grid-float-breakpoint) and (max-width: 840px) {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.navbar-nav > li {

  > .dropdown-menu {
    z-index: 50;

    @media (min-width: @grid-float-breakpoint) {
      margin-top: 15px;

      &::before {
        display: block;
        content: '';
        position: absolute;
        left: auto;
        right: 15px;
        bottom: 100%;
        border-left:   7px solid transparent;
        border-right:  7px solid transparent;
        border-bottom: 8px solid #fff;
        border-bottom-color: #fff;
      }
    }
  }
}

// Undo rounded corners in static and fixed navbars
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
  border-radius: 0;
  
}

// Fix active state of dropdown items in collapsed mode
@media (max-width: @grid-float-breakpoint-max) {
  .navbar .navbar-nav .open .dropdown-menu > .active > a {
    &,
    &:hover,
    &:focus {
      color: #fff;
      #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
    }
  }
}
