/* ============================================================
 * share.css —— 长图生成 / 分享（2026-09-24 重做）
 *
 * 结构：
 *   .bl-fab        右下角悬浮「分享」按钮（只在星运/星盘/合盘/日历四个视图出现）
 *   .bl-sheet      分享面板（手机贴底、桌面居中）：两个动作 + 醒目隐私说明
 *   .bl-share-*    长图预览弹层（preview / 保存 / 分享图片）
 *   .bl-busy-*     生成中遮罩（长图要 1~3 秒，必须有反馈，否则用户以为坏了）
 *
 * 设计约束：
 *   1. 分享必然发生在**手机**上：所有可点元素 ≥44px，弹层用 dvh + safe-area；
 *      长图预览区可滚动（图很高，不能撑破弹层）。
 *   2. 隐私说明必须与动作**同屏相邻**（用户要求「按钮旁边要有醒目的字」）——
 *      放在两个动作之间，绿色实底，第一眼就看到。
 *   3. 右下角已被「通话气泡」占用（.call-bubble），有通话时自动让位。
 *   4. 颜色全部取自 style.css 的 :root 变量，不另造色系。
 * ============================================================ */

/* ---------- 悬浮分享按钮 ---------- */
.bl-fab {
  position: fixed; right: 16px; z-index: 115;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 74px);   /* 移动端：让开 58px 底部标签栏 */
  height: 46px; padding: 0 18px 0 15px;
  display: inline-flex; align-items: center; gap: 7px;
  border: none; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 800; letter-spacing: .02em;
  color: #1a1030;
  background: linear-gradient(135deg, #ffe089 0%, #f5d76e 58%, #e8c06a 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45), 0 0 20px rgba(245, 215, 110, .38);
  -webkit-tap-highlight-color: transparent;
  transition: transform .14s ease, box-shadow .2s ease;
}
.bl-fab:active { transform: scale(.95); box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
.bl-fab-ic { display: inline-flex; }
/* 通话气泡在右下角同一区域 → 让位，别叠在一起 */
body:has(.call-bubble) .bl-fab { display: none !important; }
@media (min-width: 769px) {
  .bl-fab { bottom: 26px; right: 26px; }
}
@media (max-width: 380px) {
  .bl-fab { padding: 0 15px 0 13px; font-size: 14px; }
}

/* ---------- 分享面板 ---------- */
.bl-sheet-mask {
  position: fixed; inset: 0; z-index: 9992;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(4, 6, 20, .74);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  animation: blFade .18s ease-out;
}
@keyframes blFade { from { opacity: 0 } to { opacity: 1 } }

.bl-sheet {
  width: 100%; max-width: 460px;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(245, 215, 110, .22);
  border-bottom: none;
  background: linear-gradient(180deg, #171a45 0%, #0d1136 100%);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .6);
  animation: blUp .24s cubic-bezier(.22, .9, .3, 1);
}
@keyframes blUp { from { transform: translateY(24px); opacity: .4 } to { transform: none; opacity: 1 } }
@media (min-width: 769px) {
  .bl-sheet-mask { align-items: center; }
  .bl-sheet { border-radius: 22px; border-bottom: 1px solid rgba(245, 215, 110, .22);
    padding-bottom: 20px; }
}

.bl-sheet-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 4px 14px;
}
.bl-sheet-ic { color: var(--gold); font-size: 15px; }
.bl-sheet-t { flex: 1; font-size: 16px; font-weight: 700; color: var(--text); }
.bl-sheet-x {
  width: 44px; height: 44px; margin: -8px -10px -8px 0; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; border-radius: 12px;
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.bl-sheet-x:hover { background: rgba(255, 255, 255, .07); color: var(--text); }

/* 动作行：图标 + 标题/说明 + 箭头，整行都是热区（≥64px） */
.bl-row {
  width: 100%; min-height: 68px;
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px; margin-bottom: 10px;
  border-radius: 16px; cursor: pointer; text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .045);
  color: var(--text); font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background .16s, border-color .16s, transform .12s;
}
.bl-row:hover { background: rgba(245, 215, 110, .10); border-color: rgba(245, 215, 110, .34); }
.bl-row:active { transform: scale(.985); }
.bl-row-ic {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 19px;
  background: rgba(245, 215, 110, .13);
}
.bl-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bl-row-body b { font-size: 15.5px; font-weight: 700; color: var(--gold); }
.bl-row-body i {
  font-style: normal; font-size: 12.5px; line-height: 1.45; color: var(--muted);
}
.bl-row-go { flex: 0 0 auto; color: var(--muted); font-size: 20px; line-height: 1; }

/* 隐私说明（2026-09-26 用户要求改版）
   原来：绿色实底卡片、夹在两个动作**中间** —— 既跟按钮抢视线，又容易被误认为可点。
   现在：放到两个动作**之后**、**不套卡片**，靠「金色分隔线 + 居中金色加粗小字 + 锁图标」
   醒目；元素是 <div>（不是 button），不可点击、无 hover/active 反馈。 */
.bl-sheet-safe {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 15px 0 0; padding: 13px 6px 1px;
  border-top: 1px solid rgba(245, 215, 110, .22);
  border-radius: 0;
  background: none;
  font-size: 13px; line-height: 1.6; font-weight: 700; letter-spacing: .2px;
  color: #f5d76e; text-align: center;
}
.bl-sheet-lock { flex: 0 0 auto; display: inline-flex; align-items: center; }

/* ---------- 生成中遮罩 ---------- */
.bl-busy-mask {
  position: fixed; inset: 0; z-index: 9995;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 20, .6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.bl-busy {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 26px; border-radius: 16px;
  font-size: 14.5px; color: var(--text);
  border: 1px solid rgba(245, 215, 110, .3);
  background: rgba(20, 22, 52, .96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.bl-busy-orb { color: var(--gold); animation: blSpin 1.4s linear infinite; display: inline-block; }
@keyframes blSpin { to { transform: rotate(360deg) } }

/* ---------- 长图预览弹层 ---------- */
.bl-share-mask {
  position: fixed; inset: 0; z-index: 9993;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(4, 6, 20, .88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: blFade .18s ease-out;
}

.bl-share-panel {
  width: min(560px, 100%); max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(245, 215, 110, .26);
  background: linear-gradient(160deg, #0d1136 0%, #1a1147 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .62);
}

.bl-share-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.bl-share-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--gold); }
.bl-share-x {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; border-radius: 12px;
}
.bl-share-x:hover { background: rgba(255, 255, 255, .07); color: var(--text); }

.bl-share-body {
  flex: 1 1 auto; overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 14px; display: flex; justify-content: center; align-items: flex-start;
  background: rgba(0, 0, 0, .22);
}
.bl-share-img {
  width: 100%; max-width: 420px; height: auto; display: block;
  border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
}
.bl-share-loading {
  padding: 60px 10px; text-align: center; color: var(--muted); font-size: 14px;
}

.bl-share-tip {
  flex: 0 0 auto; padding: 10px 14px; text-align: center;
  font-size: 12.5px; line-height: 1.55; color: #8ce0b0;
  border-top: 1px dashed rgba(140, 224, 176, .32);
  background: rgba(140, 224, 176, .06);
}

.bl-share-foot {
  flex: 0 0 auto; display: flex; gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}
.bl-share-act {
  flex: 1 1 0; min-height: 46px; padding: 10px 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.bl-share-act:active { transform: scale(.98); }
.bl-share-act.primary {
  border: none; font-weight: 800; color: #1a1030;
  background: linear-gradient(135deg, #ffe089 0%, #f5d76e 60%, #e8c06a 100%);
  box-shadow: 0 8px 22px rgba(245, 215, 110, .3);
}
.bl-share-note {
  flex: 0 0 auto; padding: 0 14px 10px;
  font-size: 11.5px; line-height: 1.5; color: var(--muted); text-align: center;
}

/* ---------- 轻提示 ---------- */
.bl-share-toast {
  position: fixed; left: 50%; bottom: 16vh; transform: translateX(-50%);
  z-index: 10000; max-width: 82vw;
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; line-height: 1.5; color: var(--text); text-align: center;
  background: rgba(20, 22, 52, .96);
  border: 1px solid rgba(245, 215, 110, .34);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  animation: blFade .18s ease-out;
}

/* ---------- 小屏 ---------- */
@media (max-width: 600px) {
  .bl-sheet { max-width: 100%; }
  .bl-share-panel { max-height: 94vh; max-height: 94dvh; border-radius: 16px; }
  .bl-share-foot { flex-direction: column; }
  .bl-share-act { width: 100%; }
}
