/* 武小创法务 · 场景胶囊二级卡片显示修复
 * 对应组件：adp-chat-component/src/components/Chat/AssistQuickButtons.vue
 * 问题：4 张卡片 min-width:200px 横排 + 滚动条隐藏 -> 第 4 张被容器右缘裁切；
 *       描述 -webkit-line-clamp:2 + 卡片 height:88px + overflow:hidden -> 文案末尾全是省略号。
 * 说明：组件是 scoped 样式（属性选择器 [data-v-*] 优先级 0,2,0），
 *       全局样式必须用 !important 才能覆盖；组件源码已同步修改，
 *       以后重建组件包后本文件可保留（规则一致，无害）或删除。
 * 生效方式：server/static/app/index.html 引入，纯静态，无需构建、无需重启服务。
 */

.assist-quick-buttons__suggestions {
  flex-wrap: wrap !important;
  overflow-x: visible !important;
}

.assist-quick-buttons__suggestion-item {
  flex: 1 1 calc(25% - 12px) !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 96px !important;
  overflow: visible !important;
}

.assist-quick-buttons__suggestion-desc {
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}

/* 右上角箭头原为 rotate:45deg 的 ">"，视觉上像残缺角标；改成右上箭头 */
.assist-quick-buttons__suggestion-arrow {
  rotate: -45deg !important;
  opacity: .6;
}

@media (max-width: 720px) {
  .assist-quick-buttons__suggestion-item { flex: 1 1 calc(50% - 8px) !important; }
}
@media (max-width: 420px) {
  .assist-quick-buttons__suggestion-item { flex: 1 1 100% !important; }
}
/* 武小创法务 · 手机端欢迎区显示不全修复
 * 现象：手机窄屏打开首页，欢迎标题只剩最后一个字、官方图标被裁成白色盾形、
 *       4 条推荐问题只显示 3 条。
 * 根因：.greeting-panel 为 height:100% + justify-content:center；窄屏下标题被
 *       flex 挤压后逐字换行、推荐问题竖排，内容总高超过 .t-chat__list 可视高度时，
 *       flex 居中会让上下内容溢出到滚动区之外，而 overflow-y:auto 从 0 开始，
 *       顶部溢出的部分永远滚不到 → 被永久裁掉。
 * 方案：safe center（不溢出时仍居中，溢出时自动退化为 flex-start）
 *       + height:auto / min-height:100% + 标题防挤压 + 官方六边形图标换 06 logo。
 * 说明：组件是 scoped 样式（0,2,0），全局样式一律用 !important 覆盖；
 *       故意不写 [data-v-*] 属性选择器，避免以后重建组件包 scopeId 变化后失效。
 * 生效：server/static/app/index.html 引入，纯静态，无需构建、无需重启。
 */

.greeting-panel {
  height: auto !important;
  min-height: 100% !important;
  justify-content: flex-start !important;   /* 不支持 safe 的老浏览器兜底 */
  justify-content: safe center !important;  /* 现代浏览器：溢出时从顶部开始 */
  overflow: visible !important;
}

.welcome-header-content,
.welcome-title-row,
.recommend-question-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.welcome-title-row {
  flex-wrap: wrap !important;
  justify-content: center !important;
  /* 20:19 曹律师：标题行只保留动图、居中显示，去掉「您好，我是武小创法务」。
     文字隐藏后行内只剩 ::before 一个 flex item ⇒ 水平居中靠 justify-content:center、
     垂直居中靠 align-items:center；19:4x 的 flex-end 图/文下缘齐平已无对象，撤回。 */
  align-items: center !important;
  overflow: visible !important;
}

.welcome-title {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-align: center !important;
  color: var(--td-text-color-primary, #111) !important;
}

:root.dark .welcome-title,
:root[theme-mode="dark"] .welcome-title {
  color: rgba(255, 255, 255, .92) !important;
}

/* 官方数字人图标在深色主题下白色内六边形会变成刺眼白块，溢出裁切时形状怪异；
   换成 06 号吉祥物 logo（透明 PNG，浅色/深色都清晰）。
   2026-11-21 18:5x 曹律师要求放大：44 -> 72px，且避免损害图片质量 ⇒ 改用
   wxc-logo-06-welcome.png（694x622 紧致透明图：仅裁去 hd 版四周透明留白、
   补 6% 透明边，全程不重采样插值；浏览器按 72px 降采样显示，锐度无损）。
   注意 /application/list 也返回 Avatar，会渲染 <img class="welcome-avatar">；
   统一隐藏 img，只保留 ::before 一张图，避免放大后出现双图。 */
.welcome-robot-icon,
.welcome-title-row .welcome-avatar {
  display: none !important;
}
.welcome-title-row::before {
  content: '' !important;
  display: block;
  /* 20:23 曹律师「图片可以放大一点，但要避免图片质量太差」：72 -> 96px。
     动图源 288×258（比例 1.116:1），96×86 盒正好等比填满、无上下透明边；
     96px × 3 DPR = 288 物理像素，与源 1:1，不插值、不糊。
     ⚠️ 全盘无矢量源，768hd 本身由 311×278 插值放大 ⇒ 勿再超约 96px。 */
  width: 96px;
  height: 86px;
  flex: 0 0 96px;
  background: url('/static/app/wxc-logo-06-work-v6.webp?v=1') center / contain no-repeat;
}

.greet-desc {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.greet-tag {
  max-width: 100% !important;
  height: auto !important;
  white-space: normal !important;
}
.greet-tag-text {
  display: block !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 720px) {
  .greeting-panel {
    padding: 16px 16px 24px !important;
    box-sizing: border-box !important;
  }
  .welcome-title {
    font-size: clamp(18px, 5.2vw, 24px) !important;
  }
}
/* 武小创法务 · 登录页 logo 放大 + 高清图（2026-11-20）
 * 原 .login-logo 为 48x48，图片是 logo-EImvwXBE.svg 内嵌的 128x128 PNG，
 * 直接放大到 88px 在 3x 屏上会明显模糊。改用 768x768 无损 PNG：
 * 由 06 原生 311x278 透明图经 Lanczos 等比放大后居中，不做锐化，
 * 浏览器按需降采样显示，边缘干净、无插值糊边。
 * 用 content:url() 覆盖 <img> 的 src，零构建、不动产物 JS/SVG。
 * 生效：server/static/app/index.html 引入，纯静态，无需构建、无需重启。
 */
.login-logo {
  content: url('/static/app/wxc-logo-06-hd.png?v=3') !important;
  width: 96px !important;
  height: 96px !important;
  object-fit: contain !important;
  margin: 0 auto 20px !important;
}

/* ── 深色主题修复：输入框上方 3 个一级分组胶囊 + 二级建议卡片 ──────────────
 * 现象（曹律师 11-21 18:5x）：切深色后「文字背景颜色不对、文字看不清楚」。
 * 根因：AssistQuickButtons.vue 把背景/文字色写死为浅色稿——
 *   一级 .assist-quick-buttons__item      background:#F4F5F7  hover:#ECEEF1
 *   二级 .assist-quick-buttons__suggestion-item 同上
 *   标题 rgba(0,1,11,.93) / 描述 rgba(1,10,40,.65) / 箭头 同描述色
 * 深色下 --td-text-color-primary 变白，但硬编码浅灰背景不变 ⇒ 白字压浅底。
 * 方案：仅在 [theme-mode='dark'] 下把背景换成 TDesign 深色容器变量、
 *   文字换成深色文字变量。选择器不写 :root 前缀，兼容主题属性挂在
 *   html 根元素（ui.ts:16）或 container 元素（App.vue:221）两种情形。
 * 组件为 scoped（0,2,0），全局一律 !important 覆盖；不写 [data-v-*]。
 * 浅色主题完全不受影响（规则只在 dark 下生效）。零构建、无需重启。
 * ─────────────────────────────────────────────────────────────────────── */
[theme-mode='dark'] .assist-quick-buttons__item,
[theme-mode='dark'] .assist-quick-buttons__suggestion-item {
  background: var(--td-bg-color-container-hover, #2a2a2a) !important;
  color: var(--td-text-color-primary, rgba(255, 255, 255, .9)) !important;
}
[theme-mode='dark'] .assist-quick-buttons__item:hover,
[theme-mode='dark'] .assist-quick-buttons__suggestion-item:hover {
  background: var(--td-bg-color-container-active, #333333) !important;
  box-shadow: none !important;
}
[theme-mode='dark'] .assist-quick-buttons__suggestion-title {
  color: var(--td-text-color-primary, rgba(255, 255, 255, .92)) !important;
}
[theme-mode='dark'] .assist-quick-buttons__suggestion-desc {
  color: var(--td-text-color-secondary, rgba(255, 255, 255, .55)) !important;
}
[theme-mode='dark'] .assist-quick-buttons__suggestion-arrow {
  color: var(--td-text-color-placeholder, rgba(255, 255, 255, .4)) !important;
}
[theme-mode='dark'] .assist-quick-buttons__header {
  color: var(--td-text-color-primary, rgba(255, 255, 255, .9)) !important;
}


/* ── 20:19 曹律师：欢迎标题行只留居中的动图 ──────────────────────────
 * 「只保留这个图居中显示，把后面那句『您好，我是武小创法务』去掉」。
 * 隐藏标题文字本身；描述框（greet-desc）与 3 个场景胶囊不属于「后面那句」，保留。
 * .welcome-title-row 宽度 100% + justify-content:center ⇒ ::before 动图整行居中。
 * 组件 scoped(0,2,0)，全局一律 !important；浅深主题均生效。
 * 回退：删掉本段即可恢复标题文字。──────────────────────────────────── */
.welcome-title-row .welcome-title {
  display: none !important;
}


/* ── 20:23 曹律师：图放大 + 与下方描述框贴近（留一点空） ──────────────
 * 「图片可以放大一点，但要避免图片质量太差，同时图片和下方的文本框距离贴近留一点空就行」。
 * 原间距 = .welcome-title-row margin-bottom 12px + .welcome-header-content
 *   margin-bottom var(--td-size-11)(≈24px) + .greet-desc margin-top var(--td-size-7)(≈14px)
 *   ≈ 50px 框外空白（截图实测图底→框顶约 65px，含框内 padding-top 10px）。
 * 现压到 0 / 0 / 12px ⇒ 图底到描述框顶约 12px，贴近但留一点空。
 * 只影响欢迎区；组件 scoped(0,2,0)，一律 !important；浅深主题通用。
 * 回退：删掉本段 + 把 ::before 改回 72×72 即可。────────────────────── */
.welcome-title-row {
  margin-bottom: 0 !important;
}
.welcome-header-content {
  margin-bottom: 0 !important;
}
.greet-desc {
  margin-top: 12px !important;
}
