.draggable-tag-list {
  padding: 24px;
  background: #fff;
  border-radius: 8px;

  .tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: #fafafa;
    border-radius: 6px;
    min-height: 120px;
    border: 2px dashed #d9d9d9;
    transition: border-color 0.3s;

    &:hover {
      border-color: #40a9ff;
    }
  }

  .sortable-tag {
    display: inline-block;
    // 使用 will-change 优化动画性能
    will-change: opacity, transform;

    // 拖拽中的标签 - 原位置透明度降低
    &.active {
      opacity: 0.3;
      transition: opacity 0.2s ease;

      .custom-tag {
        border-color: #1890ff;
        background: #e6f7ff;
      }
    }

    // 经过的目标标签 - 高亮显示
    &.over {
      .custom-tag {
        border-color: #52c41a;
        background: #f6ffed;
        box-shadow: 0 0 0 4px rgba(82, 196, 26, 0.2);
        transform: scale(1.08);
        // 使用 transform 而不是复杂动画
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      }
    }

    // 禁用状态
    &.disabled {
      .custom-tag {
        background: #f5f5f5;
        border-color: #d9d9d9;
        color: rgba(0, 0, 0, 0.45);
        cursor: not-allowed;

        .drag-handle {
          display: none;
        }
      }
    }

    .custom-tag {
      display: inline-flex;
      align-items: center;
      padding: 8px 12px;
      font-size: 14px;
      user-select: none;
      border-radius: 6px;
      // 优化过渡效果
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
      background: #fff;
      border: 2px solid #d9d9d9;
      // 使用 GPU 加速
      transform: translateZ(0);

      &:hover:not(.disabled) {
        border-color: #40a9ff;
        box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
      }

      .tag-content {
        display: flex;
        align-items: center;
        gap: 8px;

        .drag-handle {
          display: flex;
          align-items: center;
          cursor: grab;
          color: #8c8c8c;
          transition: color 0.2s;
          font-size: 16px;

          &:hover {
            color: #1890ff;
          }

          &:active {
            cursor: grabbing;
          }
        }

        .tag-label {
          flex: 1;
          font-weight: 500;
          display: flex;
          align-items: center;
          gap: 6px;

          .sort-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            height: 20px;
            padding: 0 6px;
            background: #1890ff;
            color: #fff;
            border-radius: 10px;
            font-size: 12px;
            font-weight: bold;
          }
        }

        .edit-icon {
          cursor: pointer;
          color: #8c8c8c;
          transition: color 0.2s;
          font-size: 14px;

          &:hover {
            color: #1890ff;
          }
        }

        .disabled-badge {
          padding: 2px 8px;
          background: #ff4d4f;
          color: #fff;
          border-radius: 4px;
          font-size: 12px;
          margin-left: 4px;
          font-weight: normal;
        }
      }
    }
  }

  .sort-info {
    padding: 16px;
    background: #f0f2f5;
    border-radius: 6px;
    border: 1px solid #d9d9d9;

    h4 {
      margin: 0 0 12px 0;
      font-size: 14px;
      font-weight: 600;
      color: #262626;
    }

    .sort-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;

      .sort-item {
        padding: 4px 12px;
        background: #fff;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        font-size: 13px;
        color: #595959;
      }
    }
  }
}
