/* ============================================================
   分享名片 · share.css (MD3 现代化直角规范)
   ============================================================ */

/* ---- 导航栏触发按钮 ---- */
.shareTrigger{
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  border:1px solid var(--accent, #5B4BD6);
  background:transparent;
  color:var(--accent-ink, #5B4BD6);
  font-family:MiSans-Medium,sans-serif;
  font-size:12px;
  font-weight:600;
  line-height:1;
  padding:0 12px;
  height:32px;
  flex-shrink:0;
  border-radius:0 !important;
  transition:background .2s cubic-bezier(0.2, 0, 0, 1), color .2s cubic-bezier(0.2, 0, 0, 1), box-shadow .2s;
  -webkit-tap-highlight-color:transparent;
}
.shareTrigger:hover,
.shareTrigger:focus-visible{
  background:var(--accent, #5B4BD6);
  color:var(--on-accent, #ffffff);
  box-shadow:0 1px 3px rgba(0,0,0,.08);
  outline:none;
}
.shareTrigger svg{
  width:12px;
  height:12px;
  flex-shrink:0;
}
.shareTrigger svg *{
  stroke:currentColor;
  stroke-width:1.8;
  fill:none;
  stroke-linecap:square;
  stroke-linejoin:miter;
}

/* ---- 弹层遮罩与 MD3 Scrim ---- */
.shareVeil{
  position:fixed;
  inset:0;
  z-index:1000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(28,27,31,.48);
  -webkit-backdrop-filter:blur(12px) saturate(1.1);
  backdrop-filter:blur(12px) saturate(1.1);
  opacity:0;
  visibility:hidden;
  transition:opacity .24s cubic-bezier(0.2, 0, 0, 1), visibility .24s;
}
.shareVeil.open{
  opacity:1;
  visibility:visible;
}

/* ---- MD3 浮层面板（全直角设计） ---- */
.shareSheet{
  position:relative;
  width:min(400px,100%);
  max-height:calc(100dvh - 32px);
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:20px;
  background:#ffffff;
  border:1px solid rgba(28,27,31,.14);
  border-radius:0 !important;
  box-shadow:0 16px 36px -4px rgba(0,0,0,.18), 0 6px 12px -3px rgba(0,0,0,.1);
  transform:translateY(16px);
  transition:transform .28s cubic-bezier(0.1, 0.9, 0.2, 1);
}
.shareVeil.open .shareSheet{
  transform:none;
}

.shareTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:2px;
  border-bottom:1px solid rgba(28,27,31,.08);
}
.shareTitle{
  font-family:MiSans-Bold,sans-serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--accent-ink, #5B4BD6);
}
.shareClose{
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border:1px solid rgba(28,27,31,.16);
  border-radius:0 !important;
  background:transparent;
  color:#1b1b1f;
  font-size:13px;
  line-height:1;
  padding:0;
  transition:background .18s, color .18s, border-color .18s;
}
.shareClose:hover{
  background:rgba(28,27,31,.08);
  border-color:rgba(28,27,31,.3);
  color:#000;
}

.shareCanvasWrap{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:0;
  border:1px solid rgba(28,27,31,.1);
  border-radius:0 !important;
  background:#faf8f5;
  overflow:hidden;
}
.shareCanvasWrap canvas{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:calc(100dvh - 220px);
}

.shareActions{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
}
.shareAct{
  cursor:pointer;
  border:1px solid rgba(28,27,31,.16);
  border-radius:0 !important;
  background:#ffffff;
  color:#1b1b1f;
  font-family:MiSans-Medium,sans-serif;
  font-size:12px;
  font-weight:600;
  padding:10px 4px;
  white-space:nowrap;
  transition:background .18s, color .18s, border-color .18s, box-shadow .18s;
  -webkit-tap-highlight-color:transparent;
}
.shareAct:hover{
  background:rgba(28,27,31,.06);
  border-color:rgba(28,27,31,.28);
}
.shareAct.primary{
  background:var(--accent, #5B4BD6);
  border-color:var(--accent, #5B4BD6);
  color:var(--on-accent, #ffffff);
  box-shadow:0 1px 3px rgba(0,0,0,.1);
}
.shareAct.primary:hover{
  background:var(--accent-ink, #4838C0);
  border-color:var(--accent-ink, #4838C0);
  color:#ffffff;
  box-shadow:0 2px 6px rgba(0,0,0,.15);
}
.shareAct[disabled]{
  opacity:.4;
  cursor:default;
}

.shareTip{
  margin:0;
  color:#706e75;
  font-size:11.5px;
  line-height:1.7;
  letter-spacing:.01em;
}

/* ---- MD3 浮窗 Snackbar（直角） ---- */
.shareToast{
  position:fixed;
  left:50%;
  bottom:42px;
  transform:translate(-50%,10px);
  background:#1c1b1f;
  color:#f4eff4;
  font-family:MiSans-Medium,sans-serif;
  font-size:13px;
  letter-spacing:.02em;
  padding:12px 22px;
  border-radius:0 !important;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 8px 24px -4px rgba(0,0,0,.25);
  opacity:0;
  visibility:hidden;
  transition:opacity .22s cubic-bezier(0.2, 0, 0, 1), transform .22s cubic-bezier(0.2, 0, 0, 1), visibility .22s;
  pointer-events:none;
  max-width:calc(100vw - 40px);
  text-align:center;
  z-index:2100;
}
.shareToast.show{
  opacity:1;
  visibility:visible;
  transform:translate(-50%,0);
}

/* ---- 小屏适配 ---- */
@media (max-width:520px){
  .shareTrigger{
    padding:0 9px;
    height:30px;
  }
  .shareTrigger .shareLabel{
    display:none;
  }
  .shareSheet{
    padding:16px;
    gap:14px;
  }
  .shareAct{
    font-size:11.5px;
    padding:9px 2px;
  }
  .shareTip{
    font-size:11px;
  }
}
