/*
 *  Application Header
 *
 */
header {
  &.navbar-gitlab {
    z-index: 100;
    margin-bottom: 0;
    min-height: 40px;
    border: none;
    width: 100%;

    .navbar-inner {
      filter: none;

      .nav > li > a {
        font-size: 14px;
        line-height: 32px;
        padding: 6px 10px;

        &:hover, &:focus, &:active {
          background: none;
        }
      }

      /** NAV block with links and profile **/
      .nav {
        float: right;
        margin-right: 0;
      }

      .navbar-toggle {
        color: $style_color;
        margin: 0 -15px 0 0;
        padding: 10px;
        border-radius: 0;

        button i { font-size: 22px; }

        &.collapsed { background-color: transparent !important;}

        &:hover {
          background-color: #EEE;
        }
      }
    }

    .turbolink-spinner {
      font-size: 20px;
      margin-right: 10px;
    }

    @media (max-width: $screen-xs-max) {
      border-width: 0;
      font-size: 18px;

      .title {
        @include str-truncated(70%);
      }

      .navbar-collapse {
        margin-top: 47px;
        padding-right: 0;
        padding-left: 0;
      }

      .navbar-nav {
        margin: 5px 0;

        .visible-xs, .visable-sm {
          display: table-cell !important;
        }
      }

      li {
        display: table-cell;
        width: 1%;

        a {
          text-align: center;
          font-size: 18px !important;
        }
      }
    }
  }

  .container {
    width: 100% !important;
    padding-left: 0px;
  }

  /**
   *
   * Logo holder
   *
   */
  .app_logo {
    float: left;
    margin-right: 9px;

    a {
      float: left;
      padding: 0px;
      margin: 0 6px;

      h1 {
        margin: 0;
        background: image-url('logo-black.png') no-repeat center center;
        background-size: 32px;
        float: left;
        height: 46px;
        width: 40px;
        @include header-font;
        text-indent: -9999px;
      }
    }
    &:hover {
      background-color: #EEE;
    }
  }

  /**
   *
   * Project / Area name
   *
   */
  .title {
    position: relative;
    float: left;
    margin: 0;
    margin-left: 5px;
    @include header-font;
    @include str-truncated(37%);
  }

  .profile-pic {
    position: relative;
    top: -1px;
    padding-right: 0px !important;
    img {
      width: 26px;
      height: 26px;
      @include border-radius($avatar_radius);
    }
  }

  /**
   *
   * Search box
   *
   */
  .search {
    margin-right: 10px;
    margin-left: 10px;
    margin-top: 8px;

    form {
      margin: 0;
      padding: 0;
    }

    .search-input {
      background-image: image-url("icon-search.png");
      background-repeat: no-repeat;
      background-position: 10px;
      height: inherit;
      padding: 4px 6px;
      padding-left: 25px;
      font-size: 13px;
      @include border-radius(3px);
      border: 1px solid #c6c6c6;
      box-shadow: none;
      @include transition(all 0.15s ease-in 0s);
    }
  }


  /*
   * Dark header
   *
   */
  &.header-dark {
    &.navbar-gitlab {
      .navbar-inner {
        background: #708090;
        border-bottom: 1px solid #AAA;

        .navbar-toggle { color: #fff; }

        .nav > li > a {
          color: #AAA;

          &:hover, &:focus, &:active {
            background: none;
            color: #FFF;
          }
        }
      }
    }

    .turbolink-spinner {
      color: #FFF;
    }

    .search {
      .search-input {
        background-color: #D2D5DA;
        background-color: rgba(255, 255, 255, 0.5);
        border: 1px solid #AAA;

        &:focus {
          background-color: white;
        }
      }
    }
    .search-input::-webkit-input-placeholder {
      color: #666;
    }
    .app_logo {
      a {
        h1 {
          background: image-url('logo-white.png') no-repeat center center;
          background-size: 32px;
          color: #fff;
        }
      }
    }
    .title {
      a {
        color: #FFF;
        &:hover {
          text-decoration: underline;
        }
      }
      color: #fff;
    }
  }
}

.search .search-input {
  width: 300px;
  &:focus {
    width: 330px;
  }
}

@media (max-width: 1200px)  {
  .search .search-input {
    width: 200px;
    &:focus {
      width: 230px;
    }
  }
}

@media (max-width: $screen-xs-max) {
  #nprogress .spinner {
    right: 35px !important;
  }
}