/* Tab 组件样式 */
.pisell-tab {
  align-self: stretch;
  overflow: hidden;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  display: inline-flex;

  .pisell-tab-item {
    height: 40px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 88px;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    display: flex;
    cursor: pointer;
    transition: all 0.3s ease;

    .pisell-tab-item-label {
      font-size: 14px;
      font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      line-height: 20px;
      word-wrap: break-word;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 4px;

      .pisell-tab-item-count {
        margin-left: 4px;
        font-weight: inherit;
        opacity: 0.7;
        font-size: 12px;
      }

      .pisell-tab-item-external-icon {
        font-size: 12px;
        opacity: 0.7;
        margin-left: 2px;
      }
    }

    /* 选中状态 */
    &.pisell-tab-item-active {
      background: #8157D5;

      .pisell-tab-item-label {
        color: white;
        font-weight: 600 !important;
      }
    }

    /* 未选中状态 */
    &.pisell-tab-item-inactive {
      background: white;

      .pisell-tab-item-label {
        color: #101828;
        font-weight: 600 !important;
      }

      &:hover {
        background: #f5f5f5;

        .pisell-tab-item-label {
          color: #8157D5;
        }
      }
    }

    /* 禁用状态 */
    &.pisell-tab-item-disabled {
      cursor: not-allowed;
      opacity: 0.5;

      &:hover {
        background: white;

        .pisell-tab-item-label {
          color: #101828;
        }
      }
    }

    /* 链接类型 tab 项 */
    &.pisell-tab-item-link {
      position: relative;

      /* 普通链接（锚点）样式 */
      &:not(.pisell-tab-item-external) {
        &.pisell-tab-item-inactive {
          .pisell-tab-item-label {
            color: #1890ff;
          }

          &:hover {
            .pisell-tab-item-label {
              color: #40a9ff;
            }
          }
        }
      }

      /* 外部链接样式 */
      &.pisell-tab-item-external {
        &.pisell-tab-item-inactive {
          .pisell-tab-item-label {
            color: #52c41a;

            .pisell-tab-item-external-icon {
              opacity: 0.8;
            }
          }

          &:hover {
            .pisell-tab-item-label {
              color: #73d13d;

              .pisell-tab-item-external-icon {
                opacity: 1;
              }
            }
          }
        }

        &.pisell-tab-item-active {
          .pisell-tab-item-external-icon {
            color: white;
            opacity: 0.9;
          }
        }
      }
    }
  }

}
