/* ==========================================================================
   nova · AI 智能助手（插件 addons/ai_assistant）对话窗皮肤
   --------------------------------------------------------------------------
   插件自带「悬浮球 + 收起把手 + 未登录气泡 + 对话窗」；本主题用工具条顶部的
   头像按钮（AI.webm）当唯一入口，所以只保留对话窗，并把它统一成 nova 的视觉：
   品牌蓝 #0052d9 / #0059eb→#2677ff、方正刚硬直角、细蓝边、克制投影。

   ⚠ 插件样式是页脚 inline <style>，在文档里比本文件晚出现；同权重时它一定赢。
     所以这里每条选择器前面都加一个 `body`（多一个元素选择器 → 权重更高），
     靠权重取胜，而不是到处写 !important（只有 display 那几条不得不用 !important，
     因为插件会用 JS 写行内 style）。

   改这里就能换整个对话框的皮，不用动插件模板 plugins/addons/ai_assistant/template/clientarea/floatball.tpl
   ========================================================================== */

/* ---------- 1) 隐藏插件自带的悬浮入口（只保留对话窗） ---------- */
.aias-ball,      /* 悬浮球 */
.aias-cg,        /* 收起/展开把手 */
.aias-tip{display:none!important}   /* 未登录打字气泡（JS 会写行内 display，故用 !important） */

/* ---------- 2) 对话窗容器让开工具条（工具条 right:8 宽 48 → 占 8~56px） ---------- */
body .aias.rb,body .aias.rt{right:64px!important}

/* ---------- 3) 外壳 + 抽屉式开合（纯平移） ----------
   插件原本用 `display:none ↔ display:flex` 切显隐（display 无法过渡，所以是"啪"地闪出来）。
   这里改成「常驻显示 + transform 过渡」，只做**水平平移**：从右侧滑入 / 向右滑出，
   不缩放、不淡入淡出（要淡入淡出就把 opacity 加回 transition）。
     · display 用 !important 锁成 flex（否则 `.aias.open .aias-panel{display:flex}` 一关就 display:none）
     · 收起态 translate3d(calc(100% + 80px),0,0) = 移到右侧屏幕外。
       ⚠ 必须比 100% 多一截：面板右边缘本来就在视口右 64px 处，只移 100% 的话
         末了还会在右边露出 64px 的一条（`body .aias.rb{right:64px}` 那 64px）。 */
body .aias-panel{
  display:flex!important;
  visibility:hidden;pointer-events:none;
  transform:translate3d(calc(100% + 80px),0,0);
  transition:transform .3s cubic-bezier(.55,0,1,.45),visibility .3s ease;
  width:392px;max-width:92vw;height:560px;max-height:78vh;border-radius:0;
  border:1px solid #e6e9ef;                 /* 对标 KiKi：中性浅灰细线，比品牌蓝细线更"轻" */
  box-shadow:0 8px 12px rgba(0,0,0,.03),0 8px 24px rgba(0,0,0,.06),0 24px 64px -12px rgba(15,35,80,.2)}
body .aias.open .aias-panel{
  visibility:visible;pointer-events:auto;transform:translate3d(0,0,0);
  transition:transform .38s cubic-bezier(.22,.9,.28,1),visibility .38s ease}
/* 顶部 2px 品牌渐变压线（与导航商品大面板同一手法） */
body .aias-panel:before{content:"";position:absolute;left:0;top:0;width:100%;height:2px;z-index:2;
  background:linear-gradient(90deg,#0052d9,#4e88f5 58%,#9cc0ff)}
/* 手机端面板是全屏的，同样从右侧平移进出（这里不用改，注释保留方便定位） */
/* 系统开了「减少动态效果」→ 取消位移，只做瞬时显隐 */
@media(prefers-reduced-motion:reduce){
  body .aias-panel,body .aias.open .aias-panel{transform:none;transition:none}
}

/* ---------- 4) 头部：品牌蓝渐变 ---------- */
body .aias-hd{padding:13px 14px;background:linear-gradient(135deg,#0059eb,#2677ff);
  box-shadow:inset 0 -1px 0 rgba(0,0,0,.07)}
body .aias-hd .av{width:34px;height:34px;background:rgba(255,255,255,.18)}
body .aias-hd .av img{width:34px;height:34px}
body .aias-hd .nm{font-size:15px;letter-spacing:.2px}
body .aias-hd .sb{font-size:11.5px;opacity:.88}
body .aias-hd .hb{border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.14);
  padding:5px 10px;transition:background .16s ease,border-color .16s ease}
body .aias-hd .hb:hover{background:rgba(255,255,255,.3);border-color:rgba(255,255,255,.42)}
body .aias-hd .hb.x{background:transparent;border-color:transparent}
body .aias-hd .hb.x:hover{background:rgba(255,255,255,.26)}

/* ---------- 5) 消息区（对标 KiKi：顶部一层柔和渐变 + 大留白 + 极浅边） ---------- */
body .aias-bd{padding:18px 14px;gap:14px;background:#fff;
  background-image:linear-gradient(180deg,#eef4ff 0,rgba(255,255,255,0) 140px)}
body .aias-bd::-webkit-scrollbar{width:6px}
body .aias-bd::-webkit-scrollbar-thumb{background:#dfe4ec}
body .aias-bd::-webkit-scrollbar-thumb:hover{background:#c6cede}
body .aias-m .bb{padding:11px 13px;line-height:1.75;color:#334155;
  border:1px solid #e6e9ef;box-shadow:0 1px 2px rgba(15,35,80,.04)}
body .aias-m.u .bb{background:#eaf2ff;border-color:rgba(0,82,217,.18);color:#0b3f86}
body .aias-typing i{background:#9dc0f5}
/* 首条助手消息 = 空态欢迎语：去掉气泡底、放大加粗（对标 KiKi 展开后的空态大标题） */
body .aias-bd>.aias-m:first-child .bb{padding:2px 0 4px;border:0;background:transparent;box-shadow:none;
  font-size:17px;font-weight:600;color:rgba(0,0,0,.9);line-height:28px;max-width:100%}

/* ---------- 6) 未登录引导卡 ---------- */
body .aias-guest{padding:24px 18px;border:1px solid rgba(0,82,217,.14);
  box-shadow:0 6px 18px rgba(15,35,80,.05)}
body .aias-guest .ic{width:52px;height:52px;margin:0 auto 12px;color:#0052d9;
  background:linear-gradient(135deg,#eaf2ff,#dbe9ff);border:1px solid rgba(0,82,217,.16)}
body .aias-guest .ic svg{width:30px;height:30px}
body .aias-guest .tx{font-size:14px;color:#3d4757;line-height:1.8}
body .aias-guest .bt{margin-top:18px}
body .aias-guest .bt a{padding:10px 22px;font-weight:600;
  transition:background .16s ease,color .16s ease,border-color .16s ease}
body .aias-guest .bt .p{background:#0052d9;border:1px solid #0052d9;color:#fff}
body .aias-guest .bt .p:hover{background:#0d6fc4;border-color:#0d6fc4}
body .aias-guest .bt .g{background:#fff;color:#0052d9;border:1px solid rgba(0,82,217,.35)}
body .aias-guest .bt .g:hover{background:#f2f7ff;border-color:#0052d9}

/* ---------- 7) 快捷提问（对标 KiKi：透明底 + 浅灰细线，hover 用「左浓右淡」的渐隐覆盖层） ---------- */
body .aias-quick button{padding:11px 15px;font-size:13px;color:rgba(0,0,0,.9);
  border:1px solid #e6e9ef;background:transparent;
  transition:color .2s cubic-bezier(.4,0,.2,1),border-color .2s cubic-bezier(.4,0,.2,1),
             background-image .2s cubic-bezier(.4,0,.2,1);background-image:none}
body .aias-quick button:hover{color:#0052d9;border-color:#bcd6fb;
  background-image:linear-gradient(90deg,rgba(0,82,217,.08) 0,rgba(0,82,217,0) 100%)}
body .aias-quick button:active{border-color:#9cc0ff;
  background-image:linear-gradient(90deg,rgba(0,82,217,.16) 0,rgba(0,82,217,.04) 100%)}

/* ---------- 8) 商品推荐卡 ---------- */
body .aias-card{padding:11px 13px;border:1px solid rgba(0,82,217,.12);background:#fff;
  transition:border-color .16s ease,box-shadow .16s ease}
body .aias-card:hover{border-color:#9cc0ff;box-shadow:0 6px 18px rgba(0,82,217,.12)}
body .aias-card .go{padding:8px 13px;background:#0052d9;font-weight:600}
body .aias-card .go:hover{background:#0d6fc4}
body .aias-card .go.off{background:#cbd5e1}
body .aias-card .mt .tag{background:#fff4e6;color:#e8590c;border-color:#ffd8a8}

/* ---------- 9) 输入区（对标 KiKi：白底 + #e6e9ef 细边 + 极浅投影，聚焦才点亮主题蓝） ---------- */
body .aias-ft{padding:11px 14px 9px;border-top:1px solid #eef1f6}
body .aias-in{padding:5px;border:1px solid #e6e9ef;background:#fff;
  box-shadow:0 4px 16px rgba(0,0,0,.04);
  transition:border-color .18s ease,box-shadow .18s ease}
body .aias-in:focus-within{border-color:#0052d9;background:#fff;
  box-shadow:0 4px 16px rgba(0,0,0,.04),0 0 0 3px rgba(0,82,217,.08)}
body .aias-in .send{background:#0052d9;font-weight:600;letter-spacing:2px}
body .aias-in .send:hover{background:#0d6fc4}
body .aias-in .send:disabled{background:#e7ebf2;color:#9aa9bb}
body .aias-note{color:#9aa9bb}
