.nav {
  $breakpoint: "sm";
  &:not(.colorpicker) {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;

    li {
      flex: 0 0 auto;
      flex-basis: auto;
      margin: 0;
      padding: 0;

      &:first-child {
        a {
          padding-left: 0;
        }
      }

      &:last-child {
        a {
          padding-right: 0;
        }
      }
    }

    a {
      display: block;
      padding: 5px 10px;
      position: relative;
      color: inherit;
      font-size: 14px;
      @include media-breakpoint-up($breakpoint) {
        font-size: 16px;
      }

      &.active {
        font-weight: 600;
      }
    }
  }

  &--with-separator {
    li {
      &:last-child {
        a:after {
          display: none;
        }
      }
    }
    a {
      &:after {
        content: "";
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        height: 50%;
        transform: translateY(50%);
        border-left: 1px solid;
      }

      &:not(.active) {
        color: $gray;
      }

      &:hover {
        color: $dark;
      }
    }
  }
}

.tab-content {
  $self: &;
  & > .tab-pane {
    // display: block;
    height: 0;
    margin: 0;
    overflow: hidden;
  }
  & > .active {
    display: block;
    height: auto;
    overflow: visible;
  }
  &--slick {
    > .tab-pane {
      display: block;
    }
  }
}

// ACCORDION ON MOBILE
.tabs {
  &--accordion {
    .nav-tabs {
      display: none;
      @include media-breakpoint-up(sm) {
        display: flex;
      }
    }

    .tab-pane {
      //display: block;
      height: auto;
      opacity: 1;
      display: block;

      @include media-breakpoint-up(sm) {
        height: 0;
        opacity: 0;
      }

      &.active {
        @include media-breakpoint-up(sm) {
          height: auto;
          opacity: 1;
        }
      }

      .collapse {
        @include media-breakpoint-up(sm) {
          display: block;
        }
      }

      .card-header {
        @include media-breakpoint-up(sm) {
          display: none;
        }
      }
    }
  }
}

//DROPDOWN ON MOBILE
.tab-dropdown {
  position: relative;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border: 1px solid #999;
  border-bottom: 0;
  border-radius: 5px;
  z-index: 3;

  @include media-breakpoint-up(sm) {
    border: none;
  }

  .indicator {
    &:before {
      content: "";
      position: absolute;
      top: 18px;
      right: 10px;
      z-index: 2;
      transform: translate(-50%, -50%) rotate(90deg);
      border-top: 4px solid rgba(0, 0, 0, 0);
      border-left: 8px solid;
      border-bottom: 4px solid rgba(0, 0, 0, 0);
      border-right: 0px solid rgba(0, 0, 0, 0);
      width: 0;
      transition: all 0.5s ease-in-out;
    }

    @include media-breakpoint-up(sm) {
      display: none;
    }
  }

  &__heading {
    margin: 0 auto;
    width: 100%;
    background: #fff;
    color: #000;
    cursor: pointer;

    p {
      padding: 5px 10px;
      font-size: 1.25em;
      line-height: 1.4em;
      margin: 0;
    }

    @include media-breakpoint-up(sm) {
      display: none;
    }
  }

  .nav {
    &:not(.colorpicker) {
      li {
        &:first-child {
          a {
            padding-left: 30px;

            @include media-breakpoint-up(sm) {
              padding-left: 0;
            }
          }
        }
      }
    }

    display: block;
    border: 1px solid #999;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    border-top: 0;

    @include media-breakpoint-up(sm) {
      display: flex;
      border: none;
    }

    li {
      padding: 0;

      a {
        padding: 6px 30px;

        &:not(.active) {
          color: #000;
          padding: 6px 30px;

          @include media-breakpoint-up(sm) {
            padding: 5px 10px;
          }
        }

        &:after {
          border-left: none;
        }

        &.active {
          font-weight: inherit;
          height: auto;
          border-top: none;
        }

        @include media-breakpoint-up(sm) {
          padding: 5px 10px;

          &:after {
            border-left: 1px solid #000;
          }

          &.active {
            font-weight: 600;
          }
        }
      }
    }
  }

  &__list {
    display: block;
    position: absolute;
    margin: 0 auto;
    width: 100%;
    overflow: auto;
    overflow-y: auto;
    height: 0;
    -webkit-transition: all 0.2s ease-in;
    -moz-transition: all 0.2s ease-in;
    -o-transition: all 0.2s ease-in;
    transition: all 0.2s ease-in;
    background: #fff;
    color: #000;
    cursor: pointer;
    list-style-type: none;

    li {
      font-size: 1.25em;
      line-height: 1.4em;
      text-decoration: none;

      a {
        &.active {
          background-color: #f1f1f1;

          @include media-breakpoint-up(sm) {
            background: none;
          }
        }
      }

      &:hover {
        background: #f1f1f1;

        @include media-breakpoint-up(sm) {
          background: none;
        }
      }

      @include media-breakpoint-up(sm) {
        font-size: 1em;
      }
    }

    @include media-breakpoint-up(sm) {
      height: auto;
    }
  }

  .active {
    height: 200px;
    border-top: 1px solid #999;

    ~ .indicator:before {
      transform: translate(-50%, -50%) rotate(-90deg);
    }

    @include media-breakpoint-up(sm) {
      height: auto;
      border-top: none;
    }
  }
}
