/* ============================================
   WeChat AI Chat - Contacts Styles
   ============================================ */

.contacts-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--wx-bg);
  overflow: hidden;
}

.contacts-search {
  padding: 8px 12px;
  background: var(--wx-bg-light);
}

.contacts-list {
  flex: 1;
  overflow-y: auto;
  background: var(--wx-bg-white);
}

.contacts-entries {
  background: var(--wx-bg-white);
  margin-bottom: 8px;
}

.contacts-entries .cell {
  padding: 10px 16px;
}

.contacts-entries .cell-icon {
  width: 36px;
  height: 36px;
  margin-right: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.contacts-entries .cell-icon.new-friends { background: #FA5151; }
.contacts-entries .cell-icon.only-chat { background: #FA9D3B; }
.contacts-entries .cell-icon.tags { background: #07C160; }
.contacts-entries .cell-icon.official { background: #576B95; }

.contact-group-title {
  padding: 4px 16px;
  font-size: 13px;
  color: var(--wx-text-secondary);
  background: var(--wx-bg);
  font-weight: 500;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--wx-bg-white);
  cursor: pointer;
  gap: 12px;
  transition: background var(--wx-transition-fast);
  position: relative;
}

.contact-item:active {
  background: var(--wx-bg-hover);
}

.contact-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 64px;
  right: 0;
  height: 1px;
  background: var(--wx-border-light);
}

.contact-item .contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.contact-item .contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-item .contact-info {
  flex: 1;
  min-width: 0;
}

.contact-item .contact-name {
  font-size: 15px;
  color: var(--wx-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-item .contact-signature {
  font-size: 12px;
  color: var(--wx-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}

.contact-item.ai-contact .contact-name::after {
  content: 'AI';
  display: inline-block;
  margin-left: 6px;
  padding: 1px 4px;
  background: var(--wx-green-bg);
  color: var(--wx-green);
  font-size: 9px;
  border-radius: 3px;
  font-weight: 600;
  vertical-align: middle;
}

.contact-detail {
  flex: 1;
  overflow-y: auto;
  background: var(--wx-bg);
}

.contact-detail .detail-header {
  background: var(--wx-bg-white);
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-detail .detail-header .detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.contact-detail .detail-header .detail-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-detail .detail-header .detail-wechat-id {
  font-size: 13px;
  color: var(--wx-text-secondary);
}

.contact-detail .detail-actions {
  padding: 16px;
  display: flex;
  gap: 12px;
}

.contact-detail .detail-actions .btn {
  flex: 1;
}

.add-friend-page {
  flex: 1;
  overflow-y: auto;
  background: var(--wx-bg);
}
