.contact-list-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #ffffff;
  /* 确保可以滚动 */
  overflow: hidden;
  position: relative;
}

/* 搜索框 */
.contact-search-box {
  padding: 20px 10px 10px 10px;
  background-color: #f7f7f7;
  border-bottom: 1px solid #e7e7e7;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #e2e2e2;
  border: none;
  border-radius: 4px;
  padding: 6px 8px;
  transition: border-color 0.2s;
}

.search-input-wrapper:focus-within {
  border: none;
}

.search-icon {
  color: #666;
  margin-right: 5px;
  font-size: 12px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 12px;
  color: #666;
  background: transparent;
}

.search-input::placeholder {
  color: #666;
}

.search-clear-btn {
  background: none;
  border: none;
  color: #909399;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.search-clear-btn:hover {
  color: #303133;
}

/* 联系人列表 */
.contact-list {
  flex: 1;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  /* 确保可以滚动 */
  min-height: 0;
  /* 确保可以交互 */
  pointer-events: auto;
  touch-action: pan-y;
}

/* 刷新提示 */
.refresh-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #909399;
  font-size: 14px;
  gap: 8px;
}

/* 加载更多提示 */
.load-more-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #909399;
  font-size: 14px;
  gap: 8px;
}

/* 没有更多提示 */
.no-more-tip {
  text-align: center;
  padding: 16px;
  color: #c0c4cc;
  font-size: 13px;
}

/* 错误提示 */
.error-tip {
  text-align: center;
  padding: 16px;
  color: #f56c6c;
  font-size: 14px;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #909399;
}

.empty-icon {
  font-size: 60px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-text {
  font-size: 14px;
  color: #c0c4cc;
}

/* 联系人项 */
.contact-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f5f7fa;
}

.contact-item:hover {
  background-color: #f5f7fa;
}

.contact-item:active {
  background-color: #e4e7ed;
}

.contact-avatar {
  margin-right: 12px;
  color: #909399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* 防止头像被压缩 */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-name {
  font-size: 14px;
  color: #000;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.5;
}

/* 加载动画 */
.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e4e7ed;
  border-top-color: #409eff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
