$prefix: "adui-tabs";

.#{$prefix} {
  &-base {
    position: relative;
    // 在 Card.Header title prop 中使用时，会加入粗体，为了适应这种需求因此加上 font-weight 规则
    font-weight: normal;
  }
  &-base_disabled {
    .#{$prefix}-indicator {
      background-color: var(--gray-400);
    }
  }
  &-tab {
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    transition: color var(--motion-duration-base) var(--ease-in-out);

    &:hover {
      color: var(--primary-color);
    }

    &:last-of-type {
      margin-right: 0 !important;
    }
  }
  &-active {
    font-weight: 600;
    color: var(--primary-color);
  }
  &-disabled {
    color: var(--gray-700);
    cursor: not-allowed;

    &:hover {
      color: var(--gray-700);
    }
  }
  &-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary-color);
  }
  &-banner {
    display: flex;

    .#{$prefix}-tab {
      flex: 1;
      text-align: center;
      margin-right: 0 !important;
    }
  }

  // sizes
  &-mini {
    font-size: var(--font-size-mini);
    line-height: 18px;

    .#{$prefix}-tab {
      padding-bottom: 10px;

      &:not(:last-of-type) {
        margin-right: 16px;
      }
    }
  }
  &-small {
    font-size: var(--font-size-small);
    line-height: 20px;

    .#{$prefix}-tab {
      padding-bottom: 12px;

      &:not(:last-of-type) {
        margin-right: 20px;
      }
    }
  }
  &-medium {
    font-size: var(--font-size-medium);
    line-height: 24px;

    .#{$prefix}-tab {
      padding-bottom: 14px;

      &:not(:last-of-type) {
        margin-right: 20px;
      }
    }
  }
  &-large {
    font-size: var(--font-size-large);
    line-height: 24px;

    .#{$prefix}-tab {
      padding-bottom: 18px;

      &:not(:last-of-type) {
        margin-right: 28px;
      }
    }
  }
}
