.pisell-number-selector-new {
  width: 150px;
  display: inline-flex;
  align-items: center;
  background: #fff!important;
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  padding: 0;
  user-select: none;
  gap: 0;
  overflow: hidden;
  align-self: flex-start;

  /**
   * @description
   * 方案 B：固定左右按钮宽度，不参与 flex shrink；让中间数字区可伸缩以适配容器宽度
   * 这可以避免 `width: 40px` 命中但最终 used width 被压到 23px 的情况
   */
  .pisell-number-selector-btn {
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  .pisell-number-selector-number {
    flex: 1 1 auto;
    min-width: 0; // 允许在 flex 容器里缩小
  }

  &-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    color: #666;

    &:hover:not(:disabled) {
      background: #e6f7ff;
      color: #1890ff;
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      
      &:hover {
        background: transparent !important;
        color: #666 !important;
      }
    }
  }

  &-minus {
    border-radius: 24px 0 0 24px;
  }

  &-plus {
    border-radius: 0 24px 24px 0;
  }

  &-number {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-weight: 600;
    color: #000;
    min-width: 48px;
    height: 48px;
    font-size: 16px;
    text-align: center;
    border: none;
    outline: none;
    font-family: inherit;

    // 支持 virtual-keyboard-input
    .virtual-keyboard-input-wrap {
      border: none;
      background: transparent;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      
      .virtual-keyboard-input {
        background: transparent;
        border: none;
        padding: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .virtual-keyboard-input-delete {
        display: none; // 隐藏删除按钮
      }
    }

    &-clickable {
      cursor: pointer;
      transition: all 0.2s ease;

      &:hover {
        color: #333;
      }

      &:disabled {
        opacity: 0.6;
        cursor: not-allowed;

        &:hover {
          color: #000 !important;
        }
      }
    }
  }

  // 不同尺寸
  &-small {
    padding: 2px;
    border-radius: 18px;

    .pisell-number-selector-btn {
      width: 24px;
      height: 24px;
      background: #F9FAFB;
    }

    .pisell-number-selector-number {
      padding: 0 8px;
      font-size: 12px;
      min-width: 28px;
      height: 24px;
    }
  }

  &-middle {
    padding: 0;
    border-radius: 24px;

    .pisell-number-selector-btn {
      width: 48px;
      height: 48px;
    }

    .pisell-number-selector-number {
      padding: 0;
      font-size: 16px;
      min-width: 48px;
      height: 48px;
    }
  }

  &-large {
    padding: 6px;
    border-radius: 28px;

    .pisell-number-selector-btn {
      width: 40px;
      height: 40px;
    }

    .pisell-number-selector-number {
      // 容器宽度不足时让中间区域可缩，不靠压缩按钮宽度
      padding: 0;
      font-size: 18px;
      min-width: 0;
      height: 40px;
    }
  }

  // 禁用状态
  &-disabled {
    opacity: 0.6;
    cursor: not-allowed;

    .pisell-number-selector-number {
      &-clickable {
        cursor: not-allowed;

        &:hover {
          color: #000 !important;
        }
      }
    }
  }
}

// Popover 相关样式
.pisell-number-selector-popover {
  .ant-popover-inner {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .virtual-keyboard-input-delete-icon {
    font-size: 16px;
    color: #000;
  }
}

// 分离式样式
.pisell-number-selector-separation {
  background: transparent !important;
  border: none;
  
  .pisell-number-selector-btn {
    background: #7F56D9;
    border: 1px solid #7F56D9;
    border-radius: 50%; // 圆形按钮
    color: #fff;
    
    &:hover:not(:disabled) {
      background: #6A46C8; // 稍暗的紫色作为悬停状态
      border-color: #6A46C8;
      color: #fff;
    }
    
    &:disabled {
      background: #D1D5DB;
      border-color: #D1D5DB;
      color: #9CA3AF;
      
      &:hover {
        background: #D1D5DB !important;
        border-color: #D1D5DB !important;
        color: #9CA3AF !important;
      }
    }
  }
  
  .pisell-number-selector-minus,
  .pisell-number-selector-plus {
    border-radius: 50%; // 保持圆形
  }
  
  .pisell-number-selector-number {
    background: transparent;
    border: none;
    color: #000;
  }
}