//
// Default navbar
// --------------------------------------------------

.navbar-default {
  margin: 0;
  border-radius: 0;
  border: 0 none;
  background-color: @navbar-bg;
  font-family: @headings-font-family;

  .navbar-collapse {
    border-color: lighten(@brand-dark, 5%);
    .box-shadow(none);
  }

  .navbar-toggle {
    border-color: transparent;
  }
}

.navbar-sticky {
  .transition(all .15s ease-in-out);

  &.is-sticky {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1000;
    width: 100%;
    .box-shadow(0 1px 6px rgba(0,0,0,.18));
  }

  .navbar-collapse {
    max-height: 320px;
  }
}



//
// Brand
// --------------------------------------------------

.navbar-brand {
  text-shadow: none;
  padding-top: 0;
  padding-bottom: 0;
  height: @navbar-height;
  line-height: @navbar-height;
  font-weight: bold;
  color: @accent-color !important;
  text-transform: uppercase;
  width: 240px;
  text-align: center;
  border-right: 1px solid lighten(@brand-dark, 5%);

  > img {
    display: inline-block;
    max-height: @navbar-height;
  }
}



//
// Main navigation links
// --------------------------------------------------

.navbar-nav {
  
  // Uncollapsed state
  @media (min-width: @grid-float-breakpoint) {
    &.navbar-right {
      margin-left: 20px;
    }

    > li {

      > a {
        text-transform: uppercase;
        padding: 0 15px;
        margin-top: @navbar-padding-vertical;
        margin-bottom: @navbar-padding-vertical;
        font-weight: bold;
        font-size: 12px;
      }

      &.active > a {
        position: relative;

        &::after {
          display: block;
          content: '';
          position: absolute;
          background: @navbar-default-link-active-color;
          height: 2px;
          left: 0;
          right: 0;
          bottom: -@navbar-padding-vertical;
        }
      }
    }
  }

  @media (max-width: @grid-float-breakpoint) {
    margin: 0 -15px;

    li {

      > a {
        border-bottom: 1px solid lighten(@brand-dark, 5%);
      }
    }
  }
}

.navbar-btn-round {
  border-radius: 20px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  background: @navbar-default-link-active-color;
  border-color: @navbar-default-link-active-color;
  margin-left: 15px;
  color: @brand-dark;

  &:hover {
    background: @brand-danger;
    border-color: @brand-danger;
  }

  @media (max-width: @grid-float-breakpoint) {
    margin-left: 0;
    margin-top: 10px;
    margin-bottom: 10px;
    .btn-block();
  }
}



//
// Search
// --------------------------------------------------

.search-navbar {
  // position: relative;
  margin: 0;
  padding: 0;
  height: @navbar-height;

  &.pull-right {
    margin-left: 30px;
    margin-right: 15px;
  }

  &__toggle {
    line-height: @line-height-computed;
    height: @line-height-computed;
    width: @line-height-computed;
    border: 0 none;
    background: none;
    padding: 0;
    margin-top: @navbar-padding-vertical;
    margin-bottom: @navbar-padding-vertical;
    color: @navbar-default-link-color;
    font-size: 20px;

    &:focus {
      outline: 0 none;
    }

    &:hover {
      color: @navbar-default-link-hover-color;
    }
  }

  &__input {
    position: absolute;
    z-index: 1002;
    top: 0;
    right: 0;
    left: 0;
    background: #fff;
    padding: 17px;
    opacity: 0;
    visibility: hidden;
    .transition(all .15s ease-in-out);

    &.is-visible {
      opacity: 1;
      visibility: visible;
      .box-shadow(0 1px 6px rgba(0,0,0,.18));
    }

    input {
      background: #fff;
      border-color: #fff;
      border-radius: 0;

      &:focus {
        background: #fff;
        border-color: #fff;
        border-bottom-color: #eee;
      }
    }
  }

  @media (max-width: @grid-float-breakpoint) {
    height: auto;
    
    &.pull-right {
      float: none !important;
      margin-left: -15px;
      margin-right: -15px;
    }

    &__toggle {
      display: none;
    }

    &__input {
      position: static;
      visibility: visible;
      opacity: 1;
      background-color: transparent;

      input {
        background: lighten(@brand-dark, 5%);
        border-color: transparent;
      }
    }

  }
}

.search-navbar-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 999;

  .navbar & {
    z-index: 999;
  }
}
