/* ============================================================================
   M108 彻底重构：v4 对话页专属完整样式（chat-v4 最后加载，覆盖 detail/v4 层）
   作用域 .v4-page——与 /chat 旧页（.zltc-new）双主题并存互不影响
   百色站品牌色：右江青 #1F8A6B / 红城红 #C63227（M88 品牌决策，替代通用绿 #1E9B6A）
   ============================================================================ */

/* ---------- 一、整体布局 ---------- */
.v4-page.nw-chat-layout { background: #fff; }
.v4-page .nw-chat-side {
  width: 240px; background: #F7F9F8; border-right: 1px solid #E8F0ED;
}
.v4-page .nw-chat-main { background: #FFFFFF; }
.v4-page .nw-chat-msgs { max-width: 1200px; width: 100%; margin: 0 auto; box-sizing: border-box; }

/* ---------- 二、左侧会话栏 ---------- */
/* 新建对话按钮：主色填充 圆角 8px 高 36px 宽 100% */
.v4-page .nw-chat-side .nw-btn.primary { height: 36px; border-radius: 8px; }
/* 会话项：高 44px 左右 16px，选中 #E8F6F1 + 左侧 3px 主色指示条，字号 14px */
.v4-page .nw-sess-item {
  height: 44px; padding: 0 16px; border-radius: 0; border: none;
  position: relative; font-size: 14px;
}
.v4-page .nw-sess-item:hover { background: #F0F7F4; }
.v4-page .nw-sess-item.active { background: #E8F6F1; }
.v4-page .nw-sess-item.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 2px; background: #1F8A6B;
}
.v4-page .nw-sess-item .t { font-size: 14px; color: #1A2622; }
.v4-page .nw-sess-item .m { font-size: 12px; }

/* ---------- 三、输入框组件（64px 高 / 32px 圆角 / 2px 右江青描边 / 聚焦外发光） ---------- */
.v4-page .nw-chat-input {
  padding: 12px 24px 8px; gap: 12px; align-items: center;
  max-width: 800px; width: 100%; margin: 0 auto; box-sizing: border-box;
}
.v4-page .nw-chat-input textarea {
  min-height: 64px; height: 64px; flex: 1;
  border: 2px solid #1F8A6B; border-radius: 32px;
  padding: 12px 24px; font-size: 16px; font-weight: 400; line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1A2622; background: #fff; resize: none;
  box-sizing: border-box;
  transition: box-shadow 200ms ease, border-color 200ms ease;
}
.v4-page .nw-chat-input textarea:focus {
  outline: none; border-color: #1F8A6B;
  box-shadow: 0 0 0 4px rgba(31, 138, 107, 0.12);
}
/* placeholder 15px #8A9691（对比度 ≥4.5:1 达 WCAG AA） */
.v4-page .nw-chat-input textarea::placeholder { color: #8A9691; font-size: 15px; }
.v4-page .nw-chat-input .nw-voice-btn { border-radius: 50%; transition: background 200ms ease; }
.v4-page .nw-chat-input .nw-voice-btn:hover { background: rgba(31, 138, 107, 0.1); }
/* 发送按钮：40×40 圆形主色 + 纸飞机 18px 像素级居中；悬停明度 +8%；点击缩放 96%
   M110 兜底：按钮基础形态（圆形渐变底）由 CSS 独立承载——sprite 加载异常时图标缺失
   不影响按钮可见性与点击功能（title/aria-label 保留无障碍语义） */
.v4-page .v4-chat-send {
  width: 40px; height: 40px; min-width: 40px; border: none; border-radius: 50%;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1F8A6B, #2E9B6B); color: #fff;
  flex-shrink: 0;
  transition: filter 200ms ease, transform 120ms ease;
}
.v4-page .v4-chat-send:hover { filter: brightness(1.08); }
.v4-page .v4-chat-send:active { transform: scale(0.96); }
.v4-page .v4-chat-send .v4-si { width: 18px; height: 18px; display: block; }

/* ---------- 四、快捷提问标签（28px 高 / 14px 圆角 / 13px 字号 / 8px 间距） ---------- */
.v4-page .v4-quick { display: flex; gap: 8px; flex-wrap: wrap; max-width: 800px; width: 100%; margin: 0 auto 10px; box-sizing: border-box; padding: 0 24px; }
.v4-page .v4-quick .sx-tag {
  cursor: pointer; height: 28px; border-radius: 14px; font-size: 13px;
  padding: 0 12px; background: #F5FBF8; border: 1px solid #E8F0ED; color: #1F8A6B;
  transition: background 200ms ease;
}
.v4-page .v4-quick .sx-tag:hover { background: #E8F6F1; }

/* ---------- 五、消息气泡（15px/1.6；用户右对齐主色圆角 16 16 4 16；AI 左对齐浅底 16 16 16 4） ---------- */
.v4-page .nw-bubble {
  max-width: 60%; padding: 12px 16px;
  font-size: 15px; font-weight: 400; line-height: 1.6;
  border-radius: 16px;
  animation: v4-msg-in 200ms ease-out both;
}
.v4-page .nw-msg.user .nw-bubble {
  background: #1F8A6B; color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.v4-page .nw-msg.ai .nw-bubble {
  max-width: 75%; position: relative;
  background: #F5FBF8; border: 1px solid #E8F0ED;
  box-shadow: 0 2px 12px rgba(31, 138, 107, 0.06);
  border-radius: 16px 16px 16px 4px;
  color: #1A2622;
}
.v4-page .nw-msg.ai .nw-bubble::before {
  content: '';
  position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px; border-radius: 2px; background: #1F8A6B;
}

/* ---------- 六、思考动效容器（右江水纹 + 铜鼓轻转动效定义在 v4.css，此处只对齐尺寸） ---------- */
.v4-page .v4-thinking { min-height: 24px; }

/* ---------- 七、M110 Markdown 渲染元素对齐 v4 视觉（Zltc.md 白名单输出） ---------- */
.v4-page .nw-bubble p { margin: 0 0 6px; }
.v4-page .nw-bubble p:last-child { margin-bottom: 0; }
.v4-page .nw-bubble strong { font-weight: 600; color: #1F8A6B; }
.v4-page .nw-bubble h3 { font-size: 15px; font-weight: 600; margin: 8px 0 4px; color: #1A2622; }
.v4-page .nw-bubble h4 { font-size: 14px; font-weight: 600; margin: 6px 0 3px; color: #1A2622; }
.v4-page .nw-bubble ol, .v4-page .nw-bubble ul { margin: 4px 0; padding-left: 20px; }
.v4-page .nw-bubble li { margin: 2px 0; }
.v4-page .nw-bubble br { line-height: 1.4; }

/* ---------- 七·一、M113 壮文折叠块与朗读工具条（v4 规范：浅主色底/圆角 10/内边距 16） ---------- */
.v4-page .zhuang-toolbar { margin-top: 8px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.v4-page .zhuang-fold { font-size: 14px; color: #1F8A6B; text-decoration: none; cursor: pointer; transition: color 200ms ease; }
.v4-page .zhuang-fold:hover { color: #177A52; }
.v4-page .zhuang-speak { font-size: 14px; color: #1F8A6B; text-decoration: none; cursor: pointer; transition: color 200ms ease; }
.v4-page .zhuang-speak:hover { color: #177A52; }
.v4-page .zhuang-block {
  margin-top: 8px; padding: 16px;
  background: #F5FBF8; border-radius: 10px;
  font-size: 15px; line-height: 1.7; color: #1A2622;
  animation: v4-msg-in 200ms ease-out both;
}
.v4-page .zhuang-note { font-size: 12px; color: #B0BAB6; }

/* ---------- 八、动效降级（无障碍） ---------- */
@media (prefers-reduced-motion: reduce) {
  .v4-page .nw-bubble, .v4-page .v4-chat-send, .v4-page .nw-chat-input textarea {
    animation: none !important;
    transition: none !important;
  }
}

/* M187 发布引导卡按钮（类化替代内联——M156 样式预算门禁） */
.nw-conv-card .pg-btn { display:inline-block; margin-top:6px; text-decoration:none; }

/* M188 入驻弹窗提示（类化替代内联——M156 样式预算门禁） */
.ma-tip { font-size:12px; color:#8A9691; }

/* M189 UGC 图片上传（类化替代内联——M156 样式预算门禁） */
.ugc-imgs { display:flex; flex-wrap:wrap; gap:8px; }
.ugc-img-cell { position:relative; width:64px; height:64px; }
.ugc-img-thumb { width:64px; height:64px; object-fit:cover; border-radius:8px; border:1px solid #E5EDE8; }
.ugc-img-del { position:absolute; top:-6px; right:-6px; width:18px; height:18px; border:none; border-radius:9px; background:rgba(0,0,0,.55); color:#fff; font-size:11px; cursor:pointer; }
.ugc-img-add { width:64px; height:64px; display:inline-flex; align-items:center; justify-content:center; font-size:22px; }
