/* ============================================================
   Kingdee MCP 官网 - 统一"联系作者"组件样式（浅色主题）
   依赖 theme.css 的设计变量；与站点风格一致
   ============================================================ */

/* ---- 顶部导航：联系按钮（主色实心，第一眼可见）---- */
.nav-contact-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  background: var(--primary, #2563eb); color: #fff !important;
  border: 1px solid var(--primary, #2563eb); border-radius: 8px;
  font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: all .2s; cursor: pointer; font-family: inherit;
  box-shadow: 0 3px 10px rgba(37, 99, 235, .2);
}
.nav-contact-btn:hover {
  background: var(--primary-dark, #1d4ed8); border-color: var(--primary-dark, #1d4ed8);
  transform: translateY(-1px); color: #fff !important;
}
.nav-contact-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---- 右下角悬浮球（全站常驻）---- */
.contact-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 9998;
  display: flex; align-items: center; gap: 9px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary, #2563eb), #4f46e5);
  color: #fff; border: none; border-radius: 999px;
  font-family: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 26px rgba(37, 99, 235, .32);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.contact-fab:hover {
  transform: translateY(-3px); box-shadow: 0 12px 32px rgba(37, 99, 235, .42); filter: brightness(1.06);
}
.contact-fab svg { width: 21px; height: 21px; }
.contact-fab .fab-pulse {
  position: absolute; top: -2px; right: -2px;
  width: 11px; height: 11px; background: var(--success, #059669);
  border: 2px solid var(--surface, #fff); border-radius: 50%;
  animation: fab-pulse 2s infinite;
}
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, .5); }
  50%      { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
}

/* ---- 展开的联系卡 ---- */
.contact-panel {
  position: fixed; right: 24px; bottom: 84px; z-index: 9999;
  width: 320px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e3e7ed);
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(20, 22, 28, .16);
  padding: 22px;
  opacity: 0; visibility: hidden;
  transform: translateY(12px) scale(.98); transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.contact-panel.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.cp-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.cp-title { font-size: 1.15rem; font-weight: 700; color: var(--text, #14161c); line-height: 1.3; }
.cp-subtitle { font-size: .8rem; color: var(--text-muted, #5b616e); margin-top: 4px; }
.cp-close {
  background: none; border: none; color: var(--text-muted, #5b616e);
  font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 2px; transition: color .2s;
}
.cp-close:hover { color: var(--text, #14161c); }

.cp-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--surface-light, #eef1f6);
  border: 1px solid var(--border, #e3e7ed); border-radius: 10px; margin-bottom: 10px;
}
.cp-row-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-tint, #eff4ff); color: var(--primary, #2563eb);
}
.cp-row-icon svg { width: 19px; height: 19px; }
.cp-row-icon.mail { background: rgba(5, 150, 105, .1); color: var(--success, #059669); }
.cp-row-body { flex: 1; min-width: 0; }
.cp-row-label { font-size: .75rem; color: var(--text-muted, #5b616e); margin-bottom: 2px; }
.cp-row-value {
  font-size: .92rem; font-weight: 700; color: var(--text, #14161c);
  font-family: var(--font-mono, monospace); word-break: break-all;
}
.cp-copy {
  flex-shrink: 0; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; background: var(--surface, #fff);
  border: 1px solid var(--border-strong, #cdd3dc); border-radius: 6px;
  color: var(--text-muted, #5b616e); cursor: pointer; font-family: inherit; transition: all .2s;
}
.cp-copy svg { width: 15px; height: 15px; }
.cp-copy:hover { color: #fff; border-color: var(--primary, #2563eb); background: var(--primary, #2563eb); }
.cp-copy.copied { color: #fff; border-color: var(--success, #059669); background: var(--success, #059669); }

.cp-actions { display: flex; gap: 10px; margin-top: 16px; }
.cp-action {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px; border-radius: 8px; font-size: .85rem; font-weight: 600;
  text-decoration: none; cursor: pointer; font-family: inherit; transition: all .2s;
}
.cp-action svg { width: 15px; height: 15px; }
.cp-action.primary { background: var(--primary, #2563eb); color: #fff; border: 1px solid var(--primary, #2563eb); }
.cp-action.primary:hover { background: var(--primary-dark, #1d4ed8); }
.cp-action.ghost { background: var(--surface, #fff); color: var(--text, #14161c); border: 1px solid var(--border-strong, #cdd3dc); }
.cp-action.ghost:hover { background: var(--surface-light, #eef1f6); border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); }

.cp-feedback {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 12px; padding: 10px;
  background: var(--primary-tint, #eff4ff);
  border: 1px dashed rgba(37, 99, 235, .35); border-radius: 8px;
  color: var(--primary-dark, #1d4ed8); font-size: .8rem; font-weight: 600; transition: all .2s;
}
.cp-feedback:hover { background: #dfeaff; border-style: solid; }
.cp-feedback svg { width: 15px; height: 15px; flex-shrink: 0; }

.cp-foot {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border, #e3e7ed);
  font-size: .75rem; color: var(--text-muted, #5b616e); text-align: center;
}

@media (max-width: 768px) {
  .contact-fab { right: 16px; bottom: 16px; padding: 12px 16px; }
  .contact-panel { right: 16px; left: 16px; bottom: 74px; width: auto; }
  .nav-contact-btn { padding: 8px 12px; font-size: .85rem; }
}
