/* =====================================================================
   chat-panel.css — 「更多」界面：由按钮矩形生长为整页
   ---------------------------------------------------------------------
   ▌动画由 JS（chat.js 的 moreMorph）用 Web Animations API 驱动，
     本文件只声明两个状态，不写 transition / animation。
     原因：chat-motion.css 在 reduce-motion 下用 animation:none!important
           接管，CSS 动画方案会被打断且难以验证；
           纯 JS 驱动可精确控制、可逆、可取消。

   ▌动画机制直接复用「发送图片」的 flyImg（chat.js:1062）
     · 曲线 easeOut = 1 - pow(1-t, 2.4)
     · 上抛弧度 arc = lift * 4 * t * (1-t)，lift = min(46, 18+|dy|*0.12)
     · 时长 520ms
     · translate3d + scale(sx,sy)，非等比从按钮矩形过渡到整页
     透明度随动画进度实时插值（已移除高斯模糊）

   ▌坐标系
     transform-origin: 0 0；面板 fixed;inset:0，左上角 = 视口 (0,0)。
     scale 后左上角仍在 (0,0)，再 translate 到按钮左上角即精确覆盖按钮。

   加载顺序：必须在 chat.css 之后。
   ===================================================================== */

/* ---------- 遮罩 ---------- */
.cm-ci-veil {
  position: fixed;
  inset: 0;
  z-index: 54;               /* 低于 pageChatInfo(55) */
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s cubic-bezier(.22, 1, .36, 1);
}
.cm-ci-veil.show {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 面板：两态，无过渡 ---------- */
.wx-chatinfo,
.wx-console {
  transform-origin: 0 0;
  visibility: hidden;
  opacity: 0;
  will-change: transform, opacity;
  /* 防御：JS 未接管前不要残留旧动画 */
  animation: none;
  transition: none;
}

.wx-chatinfo.on,
.wx-console.on {
  visibility: visible;
  opacity: 1;
}

/* 收起/展开过程中内容不做额外动画 */
.wx-chatinfo:not(.on) .ci-card,
.wx-console:not(.on) .cs-row,
.wx-console:not(.on) .cs-card,
.wx-chatinfo:not(.on) .ci-row,
.wx-console:not(.on) .cs-grid {
  opacity: 1;
}

/* ---------- 减少动态：JS 会直接跳过动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  .wx-chatinfo,
  .wx-console {
    will-change: auto;
  }
  .cm-ci-veil { transition-duration: .001ms !important; }
}
