/* ===== 微信式输入区组件库（mobile.input.css） =====
   权威源：v20260934 总单九「聊天输入区全局统一」——所有聊天窗口套同一
   「长条圆角矩形」输入区模板（与八·C assist-compose 一致：bar-bg + 24px 圆角）：
   [ 工具行：✨AI优化 · 📞语音通话 ] → [ 🔊 ｜ 圆角矩形输入框（文字发送/按住说话）｜ 😊 ｜ ＋ ]
   按住说话=蓝色半球霞光（八·E 同款）；语音通话=统一入口（建设中，仅助理会话支持）。
   复用 mobile.css DesignToken（--bg/--surface/--card/--accent/--text/--sub/--border/--bar-bg）。
   三态（亮/深/普通）只换色，尺寸形状不变。 */

/* 输入区容器：平贴底部，顶部细分隔线，无黑条/渐变 */
.wx-input{
  position:relative;display:block;flex-shrink:0;background:var(--bg);
  border-top:0.5px solid var(--border);
  padding:6px 8px calc(14px + env(safe-area-inset-bottom, 0px));   /* 老板⑪: 底留白6→14px撑开(对齐assist-input⑪标准), 输入条/按住说话不贴屏底; env加,0px兜底防不支持时掉0 */
}
/* 工具行：✨AI优化开关 + 📞语音通话统一入口（spacer 把按钮推右侧） */
.wx-tools{display:flex;align-items:center;gap:8px;padding:0 2px 4px;min-height:44px}
.wx-tools-spacer{flex:1}
/* 语音通话统一入口：44pt 热区透明图标（电话），各窗口复用 */
.wx-call{
  flex-shrink:0;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
  background:transparent;border:none;padding:0;cursor:pointer;color:var(--sub);
  -webkit-tap-highlight-color:transparent;
}
.wx-call:active{color:var(--accent)}
.wx-call svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* AI 优化开关（十一·只要图标）：纯 ✨ 无胶囊无文字，44pt 热区 */
.wx-ai{
  display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;
  background:transparent;color:var(--accent);font-size:22px;border:none;cursor:pointer;flex-shrink:0;
  -webkit-tap-highlight-color:transparent;
}
.wx-ai.off{color:var(--sub)}
/* 主输入行：长条圆角矩形（bar-bg + 24px 圆角，与八·C assist-compose 统一） */
.wx-row{
  display:flex;align-items:center;gap:4px;min-height:54px;
  background:var(--bar-bg);border:none;border-radius:24px;padding:0 6px;
}
/* 语音键 / emoji / 加号：图标 22-24pt，热区 44×44pt */
.wx-vkey,.wx-emoji,.wx-plus{
  flex-shrink:0;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
  background:transparent;border:none;padding:0;cursor:pointer;color:var(--sub);
  -webkit-tap-highlight-color:transparent;
}
.wx-vkey:active,.wx-emoji:active,.wx-plus:active{color:var(--accent)}
.wx-vkey svg,.wx-emoji svg,.wx-plus svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* 圆角输入框：嵌于长条圆角矩形内，透明无边框无圆角 */
.wx-field{
  flex:1;min-width:0;height:40px;min-height:40px;max-height:120px;
  background:transparent;border:none;border-radius:0;
  padding:10px 2px;font-size:16px;line-height:20px;color:var(--text);
  resize:none;outline:none;overflow-y:auto;
  -webkit-appearance:none;appearance:none;
}
.wx-field::placeholder{color:var(--sub);font-size:14px}
.wx-field:focus{outline:none}
/* 覆盖 kefu/workchat/term 旧「单条输入框」textarea 样式（mobile.kefu.css/mobile.workchat.css 遗留）：
   统一嵌进长条圆角矩形，透明无边框无圆角 */
.kefu-input textarea.wx-field,
.wcd-input textarea.wx-field,
.term-input textarea.wx-field{
  background:transparent;border:none;border-radius:0;
  padding:10px 2px;
}
/* 发送钮（唯一形态）：--accent 蓝圆钮 + 白色↑ 细线；视觉 32-36pt、热区 44×44pt */
.wx-send{
  flex-shrink:0;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--accent);border:none;border-radius:50%;cursor:pointer;color:#fff;padding:0;
  -webkit-tap-highlight-color:transparent;
}
.wx-send svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.wx-send:active{opacity:.85}
/* 「内容由AI生成」小字（同 assist-ai-note） */
.wx-ai-note{
  text-align:center;font-size:12px;color:var(--sub);opacity:.75;
  padding:6px 0 2px;line-height:1.2;-webkit-user-select:none;user-select:none;
}
.wx-input.call-mode .wx-ai-note{display:none}

/* ===== 语音条（标准组件 · 三态：未按 / 按住录音 / 上滑取消） =====
   按住录音 = 蓝色半球霞光（v20260934 八·E 同款），替换旧红色。 */
.wx-voicebar{
  display:none;flex:1;min-width:0;height:48px;border-radius:24px;   /* 20260821 老板: 按住说话触发区扩大(40→48), 语音不易误取消 */
  background:var(--surface);border:1px solid var(--border);cursor:pointer;
  position:relative;user-select:none;-webkit-user-select:none;      /* 20260821 老板: 按住说话光晕/波纹要散发出去, 去掉 overflow:hidden 防裁剪 */
  -webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;
  touch-action:none;
}
.wx-voicebar.show{display:block}
.wx-vb-txt{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-size:14px;letter-spacing:1px;color:var(--sub);pointer-events:none;
}
.wx-vb-timer{margin-left:6px;font-variant-numeric:tabular-nums}
/* ⑨老板: 按住说话提示「松手发送 / 上移取消」，常态小字指引、录音中白字更清楚 */
.wx-vb-hint{margin-left:8px;color:var(--sub);opacity:.8;font-size:12px;white-space:nowrap}
.wx-voicebar.rec .wx-vb-hint{color:#fff;opacity:1}
/* 按住（录音中）：蓝色半球霞光（底部椭圆光晕），白字"松开发送" + 实时计时 */
.wx-voicebar.rec{
  background:radial-gradient(ellipse 120% 100% at 50% 104%, #93C5FD 0%, #3B82F6 34%, #2563EB 70%, #1E40AF 100%);
  border-color:transparent;
}
.wx-voicebar.rec .wx-vb-txt{color:#fff}
/* 外圈散发柔光（蓝色光晕）——20260821 老板三连反馈(054039 散发→055713 还是太小):
   光晕容器加大到180px+扩散scale2.6≈直径470px近屏宽, 从中心向外整圈扩散, 覆盖语音条周边大半个聊天区 */
.wx-vb-glow{
  position:absolute;left:50%;top:50%;width:180px;height:180px;margin:-90px 0 0 -90px;
  border-radius:50%;pointer-events:none;opacity:0;
  background:radial-gradient(circle,rgba(96,165,250,.75) 0%,rgba(59,130,246,.45) 38%,rgba(37,99,235,.18) 62%,rgba(37,99,235,0) 78%);   /* 20260821 老板: 品牌蓝点缀, 加深中心蓝色 */
}
.wx-voicebar.rec .wx-vb-glow{opacity:1;animation:wxGlow 1.5s ease-out infinite}
@keyframes wxGlow{0%{transform:scale(.6);opacity:1}100%{transform:scale(2.6);opacity:0}}
/* 三条波纹向外扩散（不做静态按钮图标）——20260821 老板055713: 散发太小(在按键旁一点点)达不到助理效果。
   对齐助理模板(vo-ripple 190px大圈起步 scale2.2): 起点160px大圈 → 扩散3.6≈576px, 三次错开推出, 波纹覆盖语音条周边大半个聊天区 */
.wx-vb-ripple{position:absolute;inset:0;pointer-events:none;display:none}
.wx-voicebar.rec .wx-vb-ripple{display:block}
.wx-vb-ripple i{
  position:absolute;left:50%;top:50%;width:160px;height:160px;margin:-80px 0 0 -80px;
  border:3px solid rgba(59,130,246,.9);border-radius:50%;
  animation:wx-wave 1.6s ease-out infinite;
}
.wx-vb-ripple i:nth-child(2){animation-delay:.5s}
.wx-vb-ripple i:nth-child(3){animation-delay:1s}
@keyframes wx-wave{0%{transform:scale(.9);opacity:.95}100%{transform:scale(3.6);opacity:0}}
/* 上滑（取消中）：灰底灰字"松开 取消" */
.wx-voicebar.cancel{background:var(--bar-bg);border-color:var(--border)}
.wx-voicebar.cancel .wx-vb-txt{color:var(--sub)}
/* 三态切换无跳变 */
.wx-voicebar,.wx-vb-txt{transition:background .15s ease,color .15s ease,border-color .15s ease}

/* ===== 20260821 老板: 键盘弹出(kb-open)压缩输入区 + 通话按钮下线换语音播报开关 ===== */
/* 键盘弹出时隐藏工具行(通话/播报开关/语速), 输入区只留输入条紧贴键盘, 多留聊天区空间 */
body.kb-open .wx-tools{display:none}
/* 工具行内的语速选择器隐藏(只留喇叭开关), 折叠菜单那份语速档保留 */
.wx-tools .vs-sel{display:none}
/* 工具行语音播报开关(替换原通话按钮): 喇叭图标两态由 voice.css 控制 */
.wx-tools .vs-host{color:var(--sub)}
.wx-tools .vs-host .vs-btn{width:30px;height:30px;border-radius:50%}
.wx-tools .vs-host .vs-btn svg{width:18px;height:18px}
