@import '../../app.less';

.tabs {
  height: 44px;
  line-height: 44px;
  overflow: hidden;
}

.tabs.small {
  height: 32px;
  line-height: 32px;
}

.tabs.border {
  border-bottom: 1px solid #eee;
}

.tabs.line {
  text-align: center;
  background: #fff;

  .tab {
    display: inline-block;
    position: relative;
    text-align: center;
    color: @base_color;
    width: 120px;
    margin: 0 30px;
    cursor: pointer;
  }

  .tab::after {
    content: '';
    width: 0;
    height: 4px;
    background: @theme_color;
    transform: translateX(-50%);
    transition: all 0.25s;
    position: absolute;
    bottom: 0;
    left: 50%;
  }

  .tab:hover,
  .tab.active {
    color: @theme_color;
  }

  .tab:hover::after,
  .tab.active::after {
    width: 100%;
  }
}

.tabs.line.small {
  .tab {
    margin: 0;
  }

  .tab::after {
    height: 3px;
  }
}

.tabs.card {
  text-align: center;
  background: @theme_bg_color;

  .tabs-warpper {
    display: flex;

    a {
      display: inline-block;
      flex: 1;
    }
  }

  .tab {
    width: 100%;
    display: inline-block;
    position: relative;
    text-align: center;
    color: @base_color;
    cursor: pointer;
  }

  .tab::after {
    content: '';
    width: 0;
    height: 4px;
    background: @theme_color;
    transform: translateX(-50%);
    position: absolute;
    top: 0;
    left: 50%;
  }

  .tab:hover,
  .tab.active {
    color: @theme_color;
    background: #fff;
  }

  .tab:hover::after,
  .tab.active::after {
    width: 100%;
  }
}

.tabs.tag {
  line-height: 24px;

  .tabs-warpper {

    a {
      display: inline-block;
    }
  }

  .tab {
    padding: 0 20px;
    display: inline-block;
    position: relative;
    text-align: center;
    color: #fff;
    cursor: pointer;
    background: #B9C1C9;
    border-radius: 12px;
  }

  .tab:hover,
  .tab.active {
    background: @theme_color;
  }
}

.tabs.tag.white {

  .tab {
    background: #fff;
    color: #8897A8;
    border: 1px solid #8897A8;
  }

  .tab:hover,
  .tab.active {
    background: @theme_color;
    border: 1px solid @theme_color;
    color: #fff;
  }
}

.tabs.tag.small {
  height: 40px;
  overflow: hidden;

  .tabs-warpper {
    padding: 8px 0;
  }

  .tab {
    line-height: 22px;
    font-size: 12px;
    padding: 0 5px;
  }
}

.tabs.text {
  padding-left: 44px;
  background: #fff;

  .tab {
    display: inline-block;
    position: relative;
    text-align: center;
    color: @base_color;
    margin: 0 13px;
    cursor: pointer;
  }

  .tab::after {
    content: '';
    width: 1px;
    height: 20px;
    background: @line_color;
    position: absolute;
    top: 12px;
    right: -13px;
  }

  .tab:hover,
  .tab.active {
    color: @theme_color;
  }

  a:nth-last-child(1) {
    .tab::after {
      display: none;
    }
  }
}

.tabs.division {
  text-align: center;

  .tabs-warpper {
    display: flex;
  }

  a {
    display: inline-block;
    flex: 1;
    width: 100%;
    padding: 0 5px;
  }

  .tab {
    width: 100%;
    display: inline-block;
    position: relative;
    text-align: center;
    color: @base_color;
    cursor: pointer;
    background: #E5E8EE;
    border-radius: 4px 4px 0px 0px;
    overflow: hidden;
  }

  .tab::after {
    content: '';
    width: 0;
    height: 4px;
    background: @theme_color;
    transform: translateX(-50%);
    position: absolute;
    top: 0;
    left: 50%;
  }

  .tab:hover,
  .tab.active {
    color: @theme_color;
    background: #fff;
  }

  .tab:hover::after,
  .tab.active::after {
    width: 100%;
  }
}

.tabs.division.theme {
  .tab {
    color: #A7A7B7;
    background: #ECEDEE;
  }

  .tab::after {
    display: none;
  }

  .tab:hover,
  .tab.active {
    color: #fff;
    background: @theme_color;
  }
}

.tabs.division.gray {
  .tab {
    color: #A7A7B7;
    background: #ECEDEE;
  }

  .tab::after {
    display: none;
  }

  .tab:hover,
  .tab.active {
    color: #fff;
    background: #989FC1;
  }
}