@import "../../../sass/webpack_deps";

.tabs {
  .articles & {
    margin-left: auto;
    margin-right: auto;
    max-width: 85rem;
  }
}

.tabs__content {
  display: none;
  opacity: 0;
  transition: opacity 300ms ease-in;

  &.is-active {
    display: block;
    opacity: 1;
  }
}

.tabs__links {
  @include clearfix;
  align-items: flex-end;
  border-bottom: .1rem solid $color-gray;
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: space-around;
  list-style: none;
  text-align: center;
  white-space: nowrap;

  .no-flexbox & {
    display: inline-block;
  }

  .articles & {
    margin-bottom: 8rem;

    @media (min-width: $min-720) {
      margin-bottom: 10rem;
    }
  }
}

.tabs__item {
  line-height: 1;

  .no-flexbox & {
    float: left;
  }

  .articles & {
    &:not(:first-child) {
      margin-left: ($gutter + .2);

      @media (min-width: $min-720) {
        margin-left: 4.8rem;
      }
    }
  }
}

.tabs__link {
  color: $titlegray;
  display: block;
  font-size: 1.2rem;
  font-weight: $font-weight-semibold;
  position: relative;
  text-align: center;
  transition: color $animation-speed;

  &.is-active {
    color: $lpblue;

    &::after {
      background-color: $lpblue;
      bottom: -.1rem;
      content: "";
      display: block;
      height: .3rem;
      left: 0;
      position: absolute;
      width: 100%;
    }
  }
}

.tabs:not(.tabs--small) .tabs__link {
  letter-spacing: .06rem;
  padding-bottom: 2.6rem;
  text-transform: uppercase;
}

.tabs--small .tabs__link {
  padding-bottom: 1.7rem;
  padding-top: 2rem;

  &.is-active {
    &::after {
      height: .1rem;
    }
  }
}

.tabs--full .tabs__links {
  display: flex;

  .no-flexbox & {
    display: block;
  }
}

.tabs--full .tabs__link {
  padding-left: 1rem;
  padding-right: 1rem;
}
