/* ===== 通讯录页面特有样式 ===== */

.search-wrapper {
  background: #fff;
  border-radius: 0 0 12px 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.search-input {
  flex: 1;
  background: #f5f5f5;
  border: none;
  border-radius: 24px;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border: 1px solid #d4af37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.search-btn {
  background: transparent;
  border: none;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.search-btn:focus,
.search-btn:active {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.filter-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

/* 筛选下拉框 - 与朋友圈页面完全一致（圆角6px） */
.filter-select {
  flex: 1;
  padding: 8px 6px;
  border: 1px solid #D0E7FF;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #333;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-select:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
}

.city-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* 城市按钮样式 - 彻底去除焦点背景残留 */
.city-list button {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #1677FF;
  color: #1677FF;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s;
  background-clip: padding-box;
}

.city-list button:hover {
  background: #e6f0ff;
}

.city-list button:active {
  background: #cce4ff;
  border-color: #0056b3;
  box-shadow: none;
  outline: none;
}

.city-list button:focus {
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22,119,255,0.3);
}

.city-list button:focus:not(:focus-visible) {
  background: #fff;
  outline: none;
  box-shadow: none;
}

.city-list button:focus-visible {
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22,119,255,0.3);
}

/* 暗金色小喇叭 - 实时注册信息滚动 */
.live-register {
  background: #fff;
  border: 1px solid #d4af37;
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 0;
  color: #d4af37;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-register-icon {
  font-size: 16px;
  color: #d4af37;
  flex-shrink: 0;
}

.live-register-scroll {
  flex: 1;
  height: 24px;
  overflow: hidden;
  position: relative;
}

.live-register-content {
  animation: scrollUp 9s ease-in-out infinite;
  line-height: 24px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  height: 24px;
}

@keyframes scrollUp {
  0%, 25% { transform: translateY(0); }
  30%, 55% { transform: translateY(-100%); }
  60%, 85% { transform: translateY(-200%); }
  90%, 100% { transform: translateY(0); }
}

/* 通讯录列表卡片 - 基础样式 */
.contact-item {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}

/* 通讯录卡片悬停效果 - 与企业完全一致 */
.contact-item:hover {
  border-color: #d4af37;
  box-shadow: 0 6px 16px rgba(0,67,156,0.12);
  transform: translateY(-1px);
}

.contact-avatar-small {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  background: #1677FF;
  background-size: cover;
}

.contact-info-small {
  flex: 1;
}

.contact-name-small {
  font-size: 16px;
  font-weight: bold;
  color: #1677FF;
  margin-bottom: 4px;
}

.contact-area-small {
  font-size: 13px;
  color: #666;
}

.contact-phone {
  font-size: 13px;
  color: #999;
  margin-top: 2px;
  cursor: pointer;
}

/* 红色星号样式（改为橙色，与提示一致） */
.phone-masked {
  color: #ff6600;
  font-weight: bold;
}

.contact-tip {
  font-size: 12px;
  color: #ff6600;
  margin-left: 4px;
}

/* 置顶标记样式（暗金色） */
.top-mark {
  background: #d4af37;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 8px;
}

/* 详情页样式 */
.contact-detail {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
}

.detail-header {
  text-align: center;
  margin-bottom: 20px;
}

.detail-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #D0E7FF;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1677FF;
  font-weight: bold;
  font-size: 24px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.detail-avatar:active,
.detail-avatar:focus {
  background-color: transparent;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.detail-name {
  font-size: 20px;
  font-weight: bold;
  color: #1677FF;
  margin-bottom: 5px;
}

.detail-area {
  font-size: 14px;
  color: #666;
}

.detail-info-row {
  margin-bottom: 12px;
}

.detail-info-row label {
  font-size: 14px;
  color: #666;
  display: block;
  margin-bottom: 4px;
}

/* 统一所有输入框样式：白色背景，灰色边框 */
.detail-info-row input,
.detail-info-row textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #D0E7FF !important;
  border-radius: 8px;
  background: #fff !important;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

/* 聚焦时暗金色边框（通用规则） */
.detail-info-row input:focus,
.detail-info-row textarea:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
}

/* 单独为联系方式输入框添加更具体的规则，确保生效 */
#detailContact {
  border: 1px solid #D0E7FF !important;
  background: #fff !important;
}

#detailContact:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
}

.detail-info-row textarea {
  height: 80px;
  resize: none;
}

/* 微信二维码样式 - 与企业名片详情页完全一致 */
.qrcode-preview {
  width: 150px;
  height: 150px;
  background-color: #f5f5f5;
  margin: 10px auto;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.qrcode-preview:active,
.qrcode-preview:focus {
  background-color: #f5f5f5;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.qrcode-preview.loaded {
  color: transparent;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.detail-actions button {
  flex: 1;
  padding: 10px;
  background: #1677FF;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.detail-actions button:focus,
.detail-actions button:active {
  outline: none;
  box-shadow: none;
  background: #1677FF;
}

/* 全局输入框聚焦暗金色边框（确保覆盖所有输入框） */
input:focus,
select:focus,
textarea:focus {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
    outline: none;
}

/* 移除所有按钮点击高亮 */
button,
.search-btn,
.detail-actions button,
.nav a,
.footer-links .links a {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}

button:focus,
button:active,
.search-btn:focus,
.search-btn:active,
.detail-actions button:focus,
.detail-actions button:active,
.nav a:focus,
.nav a:active,
.footer-links .links a:focus,
.footer-links .links a:active {
    outline: none !important;
    box-shadow: none !important;
    background: inherit !important;
}

/* 底部协议链接点击时保持蓝色文字 */
.footer-links .links a:focus,
.footer-links .links a:active {
    color: #1677FF !important;
}