@import "../vars.less";

.hive-tabs {
  background: #FFFFFF;
  box-shadow: @shadow-level-1;
  border-radius: @tabs-border-radius-default;
  overflow: hidden;

  &.hive-tabs-srcoll-container {}

  &.hive-tabs-srcoll-container--prev {}

  .hive-tabs-nav-container {
    position: relative;
    height: 72px;
    transition: all .35s;
  }

  .hive-tabs-nav {
    display: block;
    width: 100%;
    position: relative;
    background: #FBFBFB;
    overflow: hidden;
    white-space: nowrap;
    height: 72px;
    line-height: 72px;

    .hive-tabs-nav-scroll {
      display: inline-block;
      font-size: 0px;
      transition: all .35s;
      position: relative;
      z-index: 2;
    }

    .hive-tabs-scroll__next {
      right: 0px;
      color: rgba(0, 0, 0, 0.6);
      border-left: 1px rgba(218, 218, 218, 0.50) solid;
    }

    .hive-tabs-scroll__prev {
      left: 0px;
      color: rgba(0, 0, 0, 0.6);
      border-right: 1px rgba(218, 218, 218, 0.50) solid;
    }

    .hive-tabs-scroll__next,
    .hive-tabs-scroll__prev {
      position: absolute;
      top: 0%;
      bottom: 0%;
      font-size: 16px;
      z-index: 3;
      background: #FBFBFB;
      display: table;
      height: 100%;
      width: 41px;
      cursor: pointer;

      .hive-tabs-scroll-btn {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
      }

      .hive-icon--right,
      .hive-icon--left {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
      }

      &::after {
        content: ' ';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 1px;
        background-color: rgba(218, 218, 218, 0.50);
        z-index: 2;
      }
    }

    &::after {
      content: ' ';
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      height: 1px;
      background-color: rgba(218, 218, 218, 0.50);
      z-index: 1;
    }

    .hive-tabs-tab {
      position: relative;
      cursor: pointer;
      display: inline-block;
      color: rgba(0, 0, 0, 0.6);
      text-align: center;
      padding: 0px 40px;
      font-size: @font-size-base;
      border-right: 1px rgba(218, 218, 218, 0.50) solid;
      // transition: font-size .3s;
      user-select: none;

      &:hover {
        color: rgba(0, 0, 0, 0.8);
      }

      .hive-icon--clear {
        color: @text-color-lighter-2;
        position: absolute;
        right: 13px;
        top: 50%;
        transform: translateY(-50%);
      }

      &.hive-tabs-tab--info {
        &::before {
          content: ' ';
          width: 8px;
          height: 8px;
          border-radius: 50%;
          background-color: @primary-color;
          position: absolute;
          left: 16px;
          top: 50%;
          transform: translateY(-50%);
        }
      }
    }

    .hive-tabs-tab--active {
      background-color: #FFFFFF;
      color: rgba(0, 0, 0, 0.8);
      z-index: 3;

      &.hive-tabs-tab--close {
        padding: 0px 40px;
      }

      &::after {
        content: ' ';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        width: 100%;
        height: 2px;
        background-color: #FFFFFF;
        z-index: 1;
      }
    }
  }

  .hive-tabs-content {
    .hive-tabs-tabpane {
      padding: 20px;
      display: none;
    }

    .hive-tabs-tabpane--active {
      display: block;
    }
  }
}

.hive-tabs.hive-tabs--primary,
.hive-tabs.hive-tabs--normal {

  .hive-tabs-tab,
  .hive-tabs-tab--active {
    font-size: @font-size-base;
  }

  .hive-tabs-nav::after {
    display: none;
  }

  .hive-tabs-nav {
    height: 48px;
    line-height: 48px;

    .hive-tabs-scroll__next,
    .hive-tabs-scroll__prev {
      width: 72px;
      background: #FFFFFF;
      border: none;
      font-size: 16px;
      color: @text-color-lighter-2;

      &::after {
        display: none;
      }
    }

    .hive-tabs-scroll__next {
      &::before {
        content: ' ';
        width: 60px;
        height: 100%;
        position: absolute;
        right: 100%;
        top: 0;
        background: linear-gradient(to left, #ffffff, rgba(0, 0, 0, 0));
      }
    }

    .hive-tabs-scroll__prev {
      &::before {
        content: ' ';
        width: 60px;
        height: 100%;
        position: absolute;
        left: 100%;
        top: 0;
        background: linear-gradient(to right, #ffffff, rgba(0, 0, 0, 0));
      }
    }
  }

  .hive-tabs-tab {
    &::after {
      content: ' ';
      position: absolute;
      left: 50%;
      right: 0;
      bottom: 0;
      height: 2px;
      background-color: @primary-color;
      width: 0%;
      // transition: all .35s;
    }

    &:hover {
      &::after {
        width: 100%;
        left: 0%;
      }
    }

    .hive-icon--clear {
      color: #FFFFFF;
    }

    &.hive-tabs-tab--info {
      &::before {
        width: 6px;
        height: 6px;
        left: 11px;
      }
    }
  }

  .hive-tabs-tab--active {
    &::after {
      width: 100%;
      left: 0%;
    }

    &.hive-tabs-tab--close {
      padding: 0px 40px;
    }
  }
}

.hive-tabs.hive-tabs--primary {
  background: @primary-color;
  color: #FFFFFF;

  .hive-tabs-nav,
  .hive-tabs-tab,
  .hive-tabs-tab--active {
    background: @primary-color;
    border: 0px;
    color: rgba(255, 255, 255, 0.6);
  }

  .hive-tabs-tab,
  .hive-tabs-tab--active {
    &:hover {
      color: #FFFFFF;
    }
  }

  .hive-tabs-nav {

    .hive-tabs-scroll__next,
    .hive-tabs-scroll__prev {
      background: @primary-color;
      color: #ffffff;
    }

    .hive-tabs-scroll__next {
      &::before {
        background: linear-gradient(to left, @primary-color, rgba(0, 0, 0, 0));
      }
    }

    .hive-tabs-scroll__prev {
      &::before {
        background: linear-gradient(to right, @primary-color, rgba(0, 0, 0, 0));
      }
    }
  }

  .hive-tabs-tab {
    &::after {
      background-color: #FFFFFF;
    }

    &.hive-tabs-tab--info {
      &::before {
        background-color: #FFFFFF;
      }
    }
  }

  .hive-tabs-tab--active {
    color: #FFFFFF;
  }
}

.hive-tabs.hive-tabs--normal {
  background: #FFFFFF;
  color: @text-color-lighter-2;

  .hive-tabs-nav,
  .hive-tabs-tab,
  .hive-tabs-tab--active {
    background: #FFFFFF;
    border: 0px;
    color: @text-color-lighter-2;
  }

  .hive-tabs-tab,
  .hive-tabs-tab--active {
    &:hover {
      color: @primary-color;

      .hive-icon {
        color: @primary-color;
      }
    }
  }

  .hive-tabs-tab {
    &.hive-tabs-tab--info {
      &::before {
        background-color: @primary-color;
      }
    }

    .hive-icon {
      color: @text-color-lighter-2;
    }
  }

  .hive-tabs-tab--active {
    color: @primary-color;

    .hive-icon {
      color: @primary-color;
    }
  }
}

.hive-tabs-content {
  background-color: #FFFFFF;
  color: @text-color;
}

.hive-tabs-top {
  display: flex;

  .hive-tabs-title {
    flex: 1;
  }

  .hive-tabs-bar {}
}
