/* Windlume · 左下角联系按钮（全站通用：桌面 + 手机）
   - 固定在视口左下角，不随页面滚动
   - 不依赖 mailto / Cloudflare 邮箱解码脚本（避免"点了没反应"）
   改完请跑：python3 ~/.hermes/scripts/hash_assets.py  */

#wlContact {
  position: fixed; left: 20px; bottom: 20px; z-index: 40;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px 8px 12px; border-radius: 999px;
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .3px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  color: var(--sky-700, #0369a1);
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(14, 165, 233, .34);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 4px 14px rgba(14, 165, 233, .16);
  transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
#wlContact:hover {
  background: rgba(14, 165, 233, .14); border-color: var(--sky-500, #0ea5e9);
  color: var(--sky-600, #0284c7); transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, .24);
}
#wlContact:focus-visible { outline: 3px solid var(--sky-300, #7dd3fc); outline-offset: 2px; }
#wlContact svg { width: 15px; height: 15px; flex: none; }

/* 弹出面板 */
#wlContactPop {
  position: fixed; left: 20px; bottom: 68px; z-index: 41;
  min-width: 240px; max-width: calc(100vw - 40px);
  padding: 13px 14px 11px; border-radius: 13px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(14, 165, 233, .28);
  box-shadow: 0 14px 36px rgba(12, 74, 110, .20);
  font: 400 13px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #0c4a6e;
  animation: wlcpIn .16s ease-out;
}
#wlContactPop[hidden] { display: none; }
@keyframes wlcpIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wlcp-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .9px;
  text-transform: uppercase; color: #7a8ba0; margin-bottom: 3px;
}
.wlcp-mail {
  font: 600 14.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--sky-700, #0369a1); word-break: break-all;
  user-select: all; -webkit-user-select: all; margin-bottom: 10px;
}
.wlcp-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.wlcp-btn {
  flex: 1 1 auto; text-align: center; text-decoration: none;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
  font: 600 12.5px/1 inherit; letter-spacing: .2px;
  color: var(--sky-700, #0369a1);
  background: rgba(14, 165, 233, .09);
  border: 1px solid rgba(14, 165, 233, .30);
  transition: background .15s, border-color .15s, color .15s;
}
.wlcp-btn:hover { background: rgba(14, 165, 233, .18); border-color: var(--sky-500, #0ea5e9); }
.wlcp-btn.primary { color: #fff; background: var(--sky-500, #0ea5e9); border-color: var(--sky-500, #0ea5e9); }
.wlcp-btn.primary:hover { background: var(--sky-600, #0284c7); border-color: var(--sky-600, #0284c7); }
.wlcp-hint { margin-top: 8px; font-size: 11px; color: #8a99ab; }
.wlcp-hint.ok { color: #0f766e; font-weight: 600; }

/* 夜间主题 */
html[data-theme="night"] #wlContact {
  color: #bae6fd; background: rgba(15, 23, 42, .82);
  border-color: rgba(125, 211, 252, .34); box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}
html[data-theme="night"] #wlContact:hover {
  background: rgba(14, 165, 233, .26); border-color: #7dd3fc; color: #e0f2fe;
}
html[data-theme="night"] #wlContactPop {
  background: rgba(15, 23, 42, .97); border-color: rgba(125, 211, 252, .3);
  color: #cbd5e1; box-shadow: 0 14px 36px rgba(0, 0, 0, .55);
}
html[data-theme="night"] .wlcp-mail { color: #7dd3fc; }
html[data-theme="night"] .wlcp-btn { color: #bae6fd; background: rgba(125, 211, 252, .1); border-color: rgba(125, 211, 252, .3); }
html[data-theme="night"] .wlcp-btn.primary { color: #0c2a3e; background: #7dd3fc; border-color: #7dd3fc; }
html[data-theme="night"] .wlcp-label { color: #7c8ea3; }
html[data-theme="night"] .wlcp-hint { color: #7c8ea3; }

/* 手机端：贴更紧，弹窗自适应宽度 */
@media (max-width: 560px) {
  #wlContact { left: 13px; bottom: 13px; padding: 7px 13px 7px 11px; font-size: 12.5px; }
  #wlContactPop { left: 13px; right: 13px; bottom: 62px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #wlContact, #wlContactPop { transition: none; animation: none; }
}
