.container {
  width: 100%;
}

.inputWrapper {
  position: relative;
  margin-bottom: 12px;

  .inputIcon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdbdbd;
    font-size: 20px;
    z-index: 1;
    pointer-events: none;
  }

  .input {
    padding-left: 38px !important;
    height: 48px;
    border-radius: 16px !important;
    border: 1px solid #e5e6eb !important;
    font-size: 16px;
    background: #f8f9fa;
  }

  .clearBtn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    z-index: 1;
  }
}

.selectedGroupsList {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.groupCard {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e6eb;
}

.groupHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.groupInfo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.groupAvatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
}

.groupDetails {
  flex: 1;
  min-width: 0;
}

.groupName {
  font-size: 16px;
  font-weight: 500;
  color: #222;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.groupId {
  font-size: 14px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deleteGroupBtn {
  color: #ff4d4f;
  font-size: 18px;
  padding: 4px;
  min-width: auto;
  height: auto;
}

.membersSection {
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.membersLabel {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  font-weight: 500;
}

.membersList {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.memberItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  width: 70px;
}

.memberAvatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
}

.removeMemberBtn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 50%;
  color: #ff4d4f;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.memberName {
  font-size: 12px;
  color: #222;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addMemberBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px dashed #d9d9d9;
  border-radius: 50%;
  background: #fafafa;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  gap: 4px;

  span {
    font-size: 12px;
  }

  &:active {
    background: #f0f0f0;
    border-color: #1677ff;
    color: #1677ff;
  }
}

.memberSelectionPopup {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

.popupHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.popupTitle {
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.closeBtn {
  color: #1677ff;
  font-size: 16px;
}

.searchBox {
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.searchInputWrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.searchInput {
  flex: 1;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}

.clearSearchBtn {
  position: absolute;
  right: 8px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.searchBtn {
  min-width: 60px;
  height: 32px;
}

.memberList {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.memberListItem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;

  &:last-child {
    border-bottom: none;
  }

  &.selected {
    .memberListItemName {
      color: #1677ff;
    }
  }
}

.memberListItemAvatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.memberListItemName {
  flex: 1;
  font-size: 16px;
  color: #222;
}

.checkmark {
  color: #1677ff;
  font-size: 18px;
  font-weight: bold;
}

.loadingBox {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.loadingText {
  font-size: 14px;
  color: #999;
}

.emptyBox {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.emptyText {
  font-size: 14px;
  color: #999;
}
