/*!
 * share.css —— 依米三站通用「分享 / 转发」样式
 * 与 share.js 配套；不依赖站点变量，三站同一份即可。
 */

/* ---------- 分享条 ---------- */
.ysh {
  --ysh-wx: #07C160;
  --ysh-tl: #10A85C;
  --ysh-ww: #2F6FE4;
  --ysh-cp: #5B6470;
  --ysh-mo: #8A929E;
  --ysh-line: #E7EAF0;
  --ysh-ink: #1B1E24;
  --ysh-ink2: #7A828F;
  margin: 34px 0 6px;
  padding: 20px 22px 22px;
  background: #FAFBFD;
  border: 1px solid var(--ysh-line);
  border-radius: 16px;
  text-align: left;
}

.ysh-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.ysh-head b { font-size: 15.5px; color: var(--ysh-ink); letter-spacing: .2px; }
.ysh-head span { font-size: 13px; color: var(--ysh-ink2); }

.ysh-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }

.ysh-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  border: 1px solid var(--ysh-line);
  background: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  color: var(--ysh-ink);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.ysh-btn i { display: inline-flex; width: 21px; height: 21px; align-items: center; justify-content: center; }
.ysh-btn svg { width: 19px; height: 19px; display: block; }
.ysh-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(20, 22, 26, .09); }
.ysh-btn:active { transform: translateY(0); box-shadow: none; }
.ysh-btn:focus-visible { outline: 2px solid #2F6FE4; outline-offset: 2px; }

.ysh-btn.wz { color: var(--ysh-wx); border-color: rgba(7, 193, 96, .3); }
.ysh-btn.wz:hover { background: rgba(7, 193, 96, .07); }
.ysh-btn.pyq { color: var(--ysh-tl); border-color: rgba(16, 168, 92, .3); }
.ysh-btn.pyq:hover { background: rgba(16, 168, 92, .07); }
.ysh-btn.qywx { color: var(--ysh-ww); border-color: rgba(47, 111, 228, .3); }
.ysh-btn.qywx:hover { background: rgba(47, 111, 228, .07); }
.ysh-btn.cp { color: var(--ysh-cp); }
.ysh-btn.mo { color: var(--ysh-mo); }

/* ---------- 弹层 ---------- */
.ysh-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 13, 17, .62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: ysh-fade .18s ease;
}

.ysh-modal-box {
  position: relative;
  width: min(358px, 94vw);
  max-height: 90vh;
  overflow: auto;
  padding: 26px 24px 20px;
  background: #fff;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .3);
  animation: ysh-pop .22s cubic-bezier(.2, .8, .3, 1);
}

.ysh-modal-x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #A6ADB8;
  cursor: pointer;
  border-radius: 50%;
}
.ysh-modal-x:hover { background: #F3F5F8; color: #5B6470; }

.ysh-modal-h { margin-bottom: 18px; }
.ysh-modal-h b { display: block; font-size: 17px; color: #1B1E24; }
.ysh-modal-h span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.6; color: #8A929E; }

.ysh-qr {
  display: inline-flex;
  padding: 11px;
  background: #fff;
  border: 1px solid #EEF0F4;
  border-radius: 12px;
  line-height: 0;
}
.ysh-qr canvas { display: block; image-rendering: pixelated; }
.ysh-qr-fail { width: 200px; padding: 30px 10px; font-size: 13px; color: #8A929E; line-height: 0; }

.ysh-modal-url {
  margin-top: 12px;
  font-size: 12px;
  color: #9AA2AE;
  word-break: break-all;
  line-height: 1.5;
}

.ysh-modal-foot { margin-top: 16px; }
.ysh-mini {
  -webkit-appearance: none;
  appearance: none;
  padding: 9px 20px;
  border: 1px solid #E1E5EC;
  background: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
  color: #444B56;
  cursor: pointer;
}
.ysh-mini:hover { background: #F6F8FA; }

/* 更多面板 */
.ysh-more-box { width: min(400px, 94vw); }
.ysh-more-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.ysh-more-i {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #E7EAF0;
  background: #fff;
  border-radius: 12px;
  font: inherit;
  font-size: 13.5px;
  color: #2A2F38;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.ysh-more-i:hover { border-color: #CFD6E2; background: #FAFBFD; }
.ysh-more-i i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  color: #fff;
  flex: 0 0 auto;
}
.ysh-more-i i.c-wb { background: #E6162D; }
.ysh-more-i i.c-qq { background: #12B7F5; }
.ysh-more-i i.c-sys { background: #6C7684; font-size: 15px; }
.ysh-more-i i.c-qr { background: #17A2A8; font-size: 15px; }

/* ---------- 轻提示 ---------- */
.ysh-toast {
  position: fixed;
  left: 50%;
  top: 26px;
  z-index: 99995;
  max-width: min(420px, 92vw);
  padding: 13px 20px;
  background: rgba(17, 20, 26, .93);
  color: #fff;
  font-size: 14px;
  line-height: 1.62;
  border-radius: 12px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -14px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}
.ysh-toast b { color: #4AD07C; font-size: 16px; }
.ysh-toast span { color: rgba(255, 255, 255, .68); font-size: 12.5px; }

body.ysh-lock { overflow: hidden; }

@keyframes ysh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ysh-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- 手机 ---------- */
@media (max-width: 640px) {
  .ysh { margin: 26px 0 4px; padding: 17px 16px 18px; border-radius: 14px; }
  .ysh-head { gap: 4px 10px; }
  .ysh-head b { font-size: 15px; }
  .ysh-head span { font-size: 12.5px; }
  .ysh-btns { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
  .ysh-btn { grid-column: span 2; justify-content: center; padding: 10px 6px; font-size: 13px; gap: 6px; }
  .ysh-btn i { width: 18px; height: 18px; }
  .ysh-btn svg { width: 17px; height: 17px; }
  .ysh-btn.cp, .ysh-btn.mo { grid-column: span 3; }
  .ysh-modal-box { padding: 24px 18px 18px; }
  .ysh-toast { top: 16px; font-size: 13.5px; padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ysh-modal, .ysh-modal-box { animation: none; }
  .ysh-btn, .ysh-toast { transition: none; }
}
