/* Nav (Tabs, Pills) - Bootstrap Compatible */

.nav {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  li {
    position: relative;
    flex: 0 0 100%;
    @media(min-width: @media-breakpoint-sm) {
      flex: 0 0 auto;
    }
    > a {
      position: relative;
      display: block;
      padding: 15px;
      color: inherit;
      text-decoration: none;
    }
    &.disabled > a {
      color: fade(#777, 25%);
      &:hover,
      &:focus {
        text-decoration: none;
        cursor: not-allowed;
      }
    }
  }
  > li {
    > a > img {
      max-width: none;
    }
    li > a {
      padding-top: @default-gutter-size/2;
      padding-bottom: @default-gutter-size/2;
    }
    > ul {
      list-style: none;
      padding: 0;
      > li > a {
        padding-left: @default-gutter-size * 2;
      }
      > li > ul > li > a {
        padding-left: @default-gutter-size * 3;
      }
      > li > ul > li > ul > li > a {
        padding-left: @default-gutter-size * 4;
      }
    }
  }

  &.nav-justified {
    > li {
      flex: 1 0 auto;
      > a {
        margin-right: 0;
        text-align: center;
        @media (min-width: @media-breakpoint-sm) {
          margin-bottom: 0;
        }
      }
    }
  }

  &.nav-stacked {
    display: flex;
    flex-direction: column;
    li {
      display: block;
      + li > a {
        margin-left: 0;
      }
    }
  }
}

.nav-pills {
  display: inline-flex;
  li a {
    margin: 1px 0;
    background: #f3f3f3;
    padding-top: @default-gutter-size/2;
    padding-bottom: @default-gutter-size/2;
    border-radius: @default-border-radius;
    &:hover {
      background: darken(#f3f3f3, 5%);
    }
  }
  li.active > a {
    background: @primary-color;
    color: #fff;
  }
  li + li > a {
    margin-left: 2px;
  }
}

.nav-tabs {
  background: @default-color;
  border-bottom: 1px solid @default-border-color;
  padding-top: @default-gutter-size/4;
  > li {
    > a {
      margin-right: 2px;
      line-height: 1.42857143;
      border-radius: @default-border-radius @default-border-radius 0 0;
      padding: @default-gutter-size/2 @default-gutter-size;
    }
    &.active a {
      background: #fff;
      margin-bottom: -1px;
      border: 1px solid @default-border-color;
      border-bottom-color: #fff;
    }
  }
}

.tab-content {
  margin: @default-gutter-size 0;
  .tab-pane {
    > .title {
     margin-top: 0;
    }
  }
}
