/* Module 1: Container
   ============================================== */
.ai-selector {
  width: 75vw;
  padding-bottom: 4.1667vw;
  border-bottom: 0.0521vw solid var(--LightGrey-Light-Grey-line1, rgba(35, 24, 21, 0.12));
  background: #fff;
  margin: 0 auto 4.1667vw;
}
.ai-selector-inner {
  max-width: 75vw;
  margin: 0 auto;
}

/* Module 2: Heading
   ============================================== */
.ai-selector-head {
  display: flex;
  align-items: center;
  gap: 1.0417vw;
}
.ai-selector-head-icon {
  width: 3.3333vw;
  height: 3.3333vw;
  flex-shrink: 0;
  object-fit: contain;
}
.ai-selector-head-title {
  margin: 0;
  color: var(--BrandColor_black, #231815);
  font-family: "Montserrat-SemiBold";
  font-size: 3.125vw;
  font-style: normal;
  line-height: 150%;
  text-transform: capitalize;
}

/* Module 3: Tags（当前版本 HTML 已注释，样式保留，下一版本启用）
   ============================================== */
.ai-selector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25vw;
  margin: 4.1667vw 0 0;
  padding: 0;
  list-style: none;
}
.ai-selector-tag {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25vw;
  padding: 0.3125vw 0.8333vw;
  border-radius: 5.2083vw;
  background: #F4F5F8;
  color: var(--LightGrey-Light-Grey5, rgba(35, 24, 21, 0.40));
  text-align: center;
  font-family: "Montserrat-SemiBold";
  font-size: 0.625vw;
  font-style: normal;
  line-height: 1.0417vw;
  font-feature-settings: 'liga' off, 'clig' off;
  cursor: pointer;
  transition: color 0.3s;
}
.ai-selector-tag:hover {
  color: var(--LightGrey-Light-Grey3, rgba(35, 24, 21, 0.80));
}

/* Module 4: Input Box
   ============================================== */
.ai-selector-input {
  display: flex;
  min-height: 8.4375vw;
  padding: 0.8333vw 1.25vw;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  align-self: stretch;
  border: 0.1042vw solid var(--LightGrey-Light-Grey-line1, rgba(35, 24, 21, 0.12));
  border-radius: 1.0417vw;
  background: #fff;
  box-shadow: 0 0.3125vw 1.0417vw 0 rgba(4, 39, 78, 0.05);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.ai-selector-input:focus-within {
  border-color: #9B8CE2;
  background: #FFF;
  box-shadow: 0 0.2604vw 1.1458vw 0 rgba(3, 78, 189, 0.12);
}
.ai-selector-textarea {
  width: 100%;
  /* 固定两行高度：字号 1.0417vw × 行高 150% × 2 = 3.125vw（1920 下 60px）；
     不参与 flex 拉伸，超出内容纵向滚动 */
  flex: none;
  height: 3.125vw;
  min-height: 3.125vw;
  overflow-y: auto;
  padding: 0;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--LightGrey-Light-Grey1, #000);
  text-align: left;
  font-family: "Montserrat-Medium" !important;
  font-size: 1.0417vw;
  font-style: normal;
  line-height: 150%;
}
.ai-selector-textarea::placeholder {
  color: var(--LightGrey-Light-Grey4, rgba(35, 24, 21, 0.60));
  text-transform: capitalize;
}
/* 两行高度内的滚动条收窄，避免默认 15px 宽滚动条挤压文字 */
.ai-selector-textarea {
  scrollbar-width: thin;
}
.ai-selector-textarea::-webkit-scrollbar {
  width: 0.1042vw;
}
.ai-selector-textarea::-webkit-scrollbar-track {
  background: transparent;
}
.ai-selector-textarea::-webkit-scrollbar-thumb {
  border-radius: 0.1042vw;
  background: rgba(35, 24, 21, 0.24);
}
.ai-selector-toolbar {
  display: flex;
  width: 100%;
  /* 吸收输入区剩余空间，提交按钮沉到右下角；padding 保留与文本域的最小间距 */
  margin-top: auto;
  padding-top: 0.8333vw;
  align-items: center;
  /* 上传图片模块暂时注释，仅剩提交按钮时右对齐；下一版本启用上传后恢复 space-between */
  /* justify-content: space-between; */
  justify-content: flex-end;
}

/* Module 5: Image Preview（当前版本 HTML 已注释，样式保留，下一版本启用）
   ============================================== */
.ai-selector-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4583vw;
  width: 100%;
  margin-top: 0.8333vw;
  padding-top: 0.7292vw;
}
.ai-selector-preview[hidden] {
  display: none;
}
.ai-selector-preview-item {
  position: relative;
  display: flex;
  width: 6.25vw;
  height: 6.25vw;
  justify-content: center;
  align-items: center;
  border: 0.0521vw solid var(--LightGrey-Light-Grey-line1, rgba(35, 24, 21, 0.12));
  border-radius: 0.8333vw;
  background: #fff;
}
.ai-selector-preview-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.8333vw;
  object-fit: contain;
}
.ai-selector-preview-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 1.4583vw;
  height: 1.4583vw;
  padding: 0;
  border: none;
  background: transparent;
  transform: translate(50%, -50%);
  cursor: pointer;
}
.ai-selector-preview-remove img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Module 6: Upload（当前版本 HTML 已注释，样式保留，下一版本启用）
   ============================================== */
.ai-selector-upload {
  display: flex;
  align-items: center;
  gap: 0.8333vw;
}
.ai-selector-upload-btn {
  display: flex;
  align-items: center;
  gap: 0.4167vw;
  padding: 0.7292vw 0.625vw;
  border: 0.0521vw solid var(--LightGrey-Light-Grey-line1, rgba(35, 24, 21, 0.12));
  border-radius: 0.4167vw;
  background: #F3F4F7;
  cursor: pointer;
  transition: background 0.3s;
}
.ai-selector-upload-btn:hover {
  background: #F4F5F8;
}
.ai-selector-upload-icon {
  width: 1.3542vw;
  height: 1.3542vw;
  flex-shrink: 0;
  object-fit: contain;
}
.ai-selector-upload-text {
  color: var(--LightGrey-Light-Grey3, rgba(35, 24, 21, 0.80));
  text-align: left;
  font-family: "Montserrat-SemiBold";
  font-size: 0.9375vw;
  font-style: normal;
  line-height: 150%;
  text-transform: capitalize;
}
.ai-selector-upload-count {
  color: var(--LightGrey-Light-Grey4, rgba(35, 24, 21, 0.60));
  text-align: left;
  font-family: "Montserrat-Medium";
  font-size: 0.9375vw;
  font-style: normal;
  line-height: 150%;
  text-transform: capitalize;
  white-space: nowrap;
}
.ai-selector-file {
  display: none;
}

/* Module 7: Submit
   ============================================== */
.ai-selector-submit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.625vw;
  padding: 0.4688vw 1.25vw;
  border: none;
  border-radius: 0.4167vw;
  background: #231815;
  cursor: pointer;
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.ai-selector-submit::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(97deg, #7257EB 1.6%, #5969ED 53.17%, #23ACE3 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.ai-selector-submit.is-active::before {
  opacity: 1;
}
.ai-selector-submit:disabled {
  cursor: not-allowed;
}
.ai-selector-submit-text {
  color: #FFF;
  text-align: left;
  font-family: "Montserrat-SemiBold";
  font-size: 0.9375vw;
  font-style: normal;
  line-height: 150%;
  text-transform: capitalize;
}
.ai-selector-submit-icon {
  width: 1.0417vw;
  height: 1.0417vw;
  flex-shrink: 0;
  object-fit: contain;
}

/* Module 9: Result
   ============================================== */
.ai-selector-result {
  display: flex;
  min-height: 14.5833vw;
  max-height: 36.4583vw;
  padding: 1.25vw;
  flex-direction: column;
  align-items: center;
  gap: 1.6667vw;
  align-self: stretch;
  margin-top: 2.0833vw;
  border: 0.1042vw solid #FAFDFF;
  border-radius: 1.0417vw;
  background: #FAFDFF;
  overflow-y: auto;
  /* 永久预留滚动条槽位（= 实际滚动条宽）：滚动条出现/消失时内容区宽度
     恒定不变，从根源消除收起锁定时内容向右的抖动 */
  scrollbar-gutter: stable;
  /* Firefox：标准 thin 滚动条（无 ::-webkit-scrollbar） */
  scrollbar-width: thin;
  scrollbar-color: #3A66FB transparent;
}
/* View more 收起完成态：容器不显示滚动条（溢出直接裁剪）。
   收起动画进行中不锁定（保持可滚动）：见 aiSelector.js 的 collapseResultScroll，
   先让滚动位置平滑归顶、正文收缩动画结束后才锁定，
   避免 scrollTop 瞬时归零与滚动条消失重排造成的跳动 */
.ai-selector-result.is-scroll-locked {
  overflow-y: hidden;
}
.ai-selector-result::-webkit-scrollbar {
  width: 0.0521vw;
}
.ai-selector-result::-webkit-scrollbar-track {
  background: transparent;
}
.ai-selector-result::-webkit-scrollbar-thumb {
  border-radius: 0.0521vw;
  background: #3A66FB;
}
.ai-selector-result[hidden] {
  display: none;
}
.ai-selector-result.is-streaming .ai-result-content {
  max-height: none;
  overflow: visible;
}
.ai-result-thinking {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.ai-result-thinking[hidden] {
  display: none;
}
.ai-thinking-head {
  display: flex;
  align-items: center;
  gap: 0.8333vw;
  padding: 0.8333vw 0;
  cursor: pointer;
}
.ai-thinking-head-icon {
  width: 1.4583vw;
  height: 1.4583vw;
  flex-shrink: 0;
  object-fit: contain;
}
.ai-thinking-title {
  color: var(--LightGrey-Light-Grey1, #000);
  text-align: left;
  font-family: "Montserrat-SemiBold";
  font-size: 1.25vw;
  font-style: normal;
  line-height: 150%;
  text-transform: capitalize;
}
.ai-thinking-dots {
  display: inline-flex;
  gap: 0.2083vw;
  align-items: center;
  margin-left: 0.1042vw;
}
.ai-thinking-dots i {
  width: 0.1563vw;
  height: 0.1563vw;
  border-radius: 50%;
  background: var(--MainColor-BrandColor_blue, #3A66FB);
  animation: aiThinkingDot 1.2s ease-in-out infinite;
}
.ai-thinking-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.ai-thinking-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
.ai-result-thinking.is-done .ai-thinking-dots {
  display: none;
}
.ai-thinking-toggle {
  display: flex;
  width: 1.6667vw;
  height: 1.6667vw;
  margin-left: auto;
  padding: 0;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: #FAFDFF;
  cursor: pointer;
}
.ai-thinking-toggle::before {
  content: "";
  width: 0.4167vw;
  height: 0.4167vw;
  border-right: 0.1042vw solid var(--BrandColor_black, #231815);
  border-bottom: 0.1042vw solid var(--BrandColor_black, #231815);
  transform: rotate(-135deg);
  transition: transform 0.3s ease;
}
.ai-result-thinking.is-collapsed .ai-thinking-toggle::before {
  transform: rotate(45deg);
}
.ai-thinking-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s ease;
}
.ai-thinking-status {
  display: flex;
  align-items: center;
  gap: 0.4167vw;
  padding: 0.625vw 0 0;
  color: var(--LightGrey-Light-Grey1, #000);
  text-align: left;
  font-family: "Montserrat";
  font-size: 0.9375vw;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  text-transform: capitalize;
}
.ai-thinking-status[hidden] {
  display: none;
}
.ai-thinking-status-icon {
  width: 1.0417vw;
  height: 1.0417vw;
  flex-shrink: 0;
  object-fit: contain;
  animation: aiThinkingSpin 0.8s linear infinite;
}
.ai-thinking-status.is-error .ai-thinking-status-icon {
  animation: none;
}
.ai-thinking-trace {
  display: flex;
  max-height: 12.5vw;
  overflow-y: auto;
  margin-top: 0.4167vw;
  padding: 0;
  flex-direction: column;
  gap: 0.5208vw;
  scrollbar-width: thin;
  scrollbar-color: #3A66FB transparent;
}
.ai-thinking-trace::-webkit-scrollbar {
  width: 0.0521vw;
}
.ai-thinking-trace::-webkit-scrollbar-track {
  background: transparent;
}
.ai-thinking-trace::-webkit-scrollbar-thumb {
  border-radius: 0.0521vw;
  background: #3A66FB;
}
.ai-thinking-trace::-webkit-scrollbar-button {
  display: none;
}
/* Chrome/Edge 121+ 起：scrollbar-width/color 设为非默认值会禁用 ::-webkit-scrollbar
   自定义伪元素（导致 1px 宽度不生效、退回 ~10px 的标准 thin 滚动条）。
   支持 webkit 伪元素的浏览器重置回默认值，让 0.0521vw（1px）自定义生效；
   本块必须位于两处 scrollbar-width: thin 规则之后，否则会被同特异性的后者覆盖 */
@supports selector(::-webkit-scrollbar) {
  .ai-selector-result,
  .ai-thinking-trace {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
}
.ai-thinking-step,
.ai-thinking-code {
  flex-shrink: 0;
}
.ai-thinking-step {
  display: flex;
  align-items: flex-start;
  gap: 0.4167vw;
}
.ai-thinking-step-icon {
  width: 1.0417vw;
  height: 1.0417vw;
  flex-shrink: 0;
  object-fit: contain;
  margin-top: 0.1823vw;
}
.ai-thinking-step-label {
  color: var(--LightGrey-Light-Grey1, #000);
  text-align: left;
  font-family: "Montserrat";
  font-size: 0.9375vw;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  word-break: break-word;
}
.ai-thinking-code {
  /* 思考区代码块（目前内容为接口返回的 JSON）不展示：
     CSS 隐藏从元素插入即生效，不受流式分帧影响，不会出现"闪一下再消失"。
     注意：会一并隐藏思考过程中出现的普通代码块；恢复展示删掉此行即可 */
  display: none;
  margin: 0.4167vw 0;
  padding: 0.4167vw 0.625vw;
  border-radius: 0.3125vw;
  background: rgba(35, 24, 21, 0.04);
  font-family: "Montserrat";
  font-size: 0.75vw;
  line-height: 150%;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-result-answer[hidden] {
  display: none;
}
.ai-result-more[hidden] {
  display: none;
}
.ai-result-products[hidden] {
  display: none;
}
.ai-result-disclaimer[hidden] {
  display: none;
}
@keyframes aiThinkingSpin {
  to { transform: rotate(360deg); }
}
@keyframes aiThinkingDot {
  0%, 60%, 100% { opacity: 0.25; }
  30% { opacity: 1; }
}
@keyframes aiThinkingPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@keyframes aiResultBtnSpin {
  to { transform: rotate(360deg); }
}
.ai-result-answer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8333vw;
  align-self: stretch;
}
.ai-result-head {
  display: flex;
  align-items: center;
  gap: 0.8333vw;
}
.ai-result-head-icon {
  width: 1.4583vw;
  height: 1.4583vw;
  flex-shrink: 0;
  object-fit: contain;
}
.ai-result-head-title {
  color: var(--LightGrey-Light-Grey1, #000);
  text-align: left;
  font-family: "Montserrat-SemiBold";
  font-size: 1.25vw;
  font-style: normal;
  line-height: 150%;
  text-transform: capitalize;
}
.ai-result-body {
  align-self: stretch;
}
.ai-result-interrupted {
  display: flex;
  align-items: center;
  gap: 0.4167vw;
}
.ai-result-interrupted[hidden] {
  display: none;
}
.ai-result-interrupted-icon {
  width: 1.0417vw;
  height: 1.0417vw;
  flex-shrink: 0;
  object-fit: contain;
}
.ai-result-interrupted-text {
  margin: 0;
  color: var(--LightGrey-Light-Grey1, #000);
  text-align: left;
  font-family: "Montserrat";
  font-size: 0.9375vw;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  text-transform: capitalize;
}
.ai-result-content[hidden] {
  display: none;
}
.ai-result-content {
  max-height: 13.5417vw;
  overflow: hidden;
  transition: max-height 0.45s ease;
}
.ai-result-content > :first-child {
  margin-top: 0;
}
.ai-result-thinking:not([hidden]) + .ai-result-content:not(:empty) {
  margin-top: 0.8333vw;
}
.ai-result-desc,
.ai-result-content p {
  margin: 0;
  color: var(--BrandColor_black, #231815);
  text-align: left;
  font-family: "Montserrat";
  font-size: 0.9375vw;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
}
.ai-result-content p {
  margin-bottom: 0.8333vw;
}
.ai-result-content p:last-child {
  margin-bottom: 0;
}
.ai-result-subtitle,
.ai-result-content h1,
.ai-result-content h2,
.ai-result-content h3,
.ai-result-content h4,
.ai-result-content h5,
.ai-result-content h6 {
  margin: 0.8333vw 0 0;
  color: var(--BrandColor_black, #231815);
  font-family: "Montserrat-SemiBold";
  font-size: 0.9375vw;
  font-style: normal;
  font-weight: normal;
  line-height: 150%;
}
.ai-result-list,
.ai-result-content ul,
.ai-result-content ol {
  margin: 0.4167vw 0 0;
  padding-left: 0.8333vw;
  color: var(--BrandColor_black, #231815);
  font-family: "Montserrat";
  font-size: 0.9375vw;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
}
.ai-result-list li,
.ai-result-content li {
  margin-top: 0.4167vw;
}
.ai-result-table-wrap {
  align-self: stretch;
  max-width: 100%;
  overflow-x: auto;
}
.ai-result-table,
.ai-result-content table {
  width: 100%;
  border-collapse: collapse;
  color: var(--BrandColor_black, #231815);
  font-family: "Montserrat";
  font-size: 0.9375vw;
  font-weight: 400;
  line-height: 150%;
}
.ai-result-table th,
.ai-result-table td,
.ai-result-content th,
.ai-result-content td {
  padding: 0.4167vw 0.625vw;
  border: 0.0521vw solid rgba(35, 24, 21, 0.12);
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.ai-result-table th,
.ai-result-content th {
  font-family: "Montserrat-SemiBold";
  font-weight: normal;
  background: rgba(35, 24, 21, 0.04);
}
.ai-result-code,
.ai-result-content pre {
  margin: 0.4167vw 0 0;
  padding: 0.625vw 0.8333vw;
  overflow-x: auto;
  border-radius: 0.4167vw;
  background: rgba(35, 24, 21, 0.04);
  color: var(--BrandColor_black, #231815);
  font-family: "Montserrat";
  font-size: 0.9375vw;
  line-height: 150%;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-result-code-inline,
.ai-result-content code {
  padding: 0 0.2083vw;
  border-radius: 0.2083vw;
  background: rgba(35, 24, 21, 0.06);
  font-family: "Montserrat";
  font-size: 0.9375vw;
}
.ai-result-content pre code {
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: inherit;
}
.ai-result-quote,
.ai-result-content blockquote {
  margin: 0.4167vw 0 0;
  padding-left: 0.625vw;
  border-left: 0.1563vw solid rgba(35, 24, 21, 0.2);
  color: var(--LightGrey-Light-Grey3, rgba(35, 24, 21, 0.80));
  font-family: "Montserrat";
  font-size: 0.9375vw;
  font-weight: 400;
  line-height: 150%;
}
.ai-result-hr,
.ai-result-content hr {
  width: 100%;
  height: 0.0521vw;
  margin: 0.8333vw 0;
  border: none;
  background: rgba(35, 24, 21, 0.12);
}
.ai-result-content a {
  color: var(--MainColor-BrandColor_blue, #3A66FB);
  text-decoration: underline;
}
.ai-result-content img {
  max-width: 100%;
  height: auto;
}
.ai-result-content strong,
.ai-thinking-step-label strong {
  font-family: "Montserrat-SemiBold";
  font-weight: normal;
}
.ai-result-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  background: #FAFDFF;
}
.ai-result-fade {
  height: 2.9167vw;
  align-self: stretch;
  margin-top: -2.9167vw;
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.00) 0%, #FAFDFF 92.31%);
  pointer-events: none;
  transition: opacity 0.3s;
}
.ai-selector-result.is-expanded .ai-result-fade {
  opacity: 0;
}
.ai-result-toggle {
  display: flex;
  margin-top: 0;
  padding: 0.4167vw 0.4167vw 0.4167vw 1.25vw;
  justify-content: center;
  align-items: center;
  gap: 0.8333vw;
  border: 0.0521vw solid var(--BrandColor_black, #231815);
  border-radius: 1.5625vw;
  background: #fff;
  cursor: pointer;
  transition: margin-top 0.45s ease;
}
.ai-selector-result.is-expanded .ai-result-toggle {
  margin-top: 0.8333vw;
}
.ai-result-toggle-text {
  color: var(--BrandColor_black, #231815);
  text-align: center;
  font-family: "Montserrat-SemiBold";
  font-size: 0.7292vw;
  font-style: normal;
  line-height: 150%;
  text-transform: capitalize;
}
.ai-result-toggle-icon {
  display: flex;
  width: 1.25vw;
  height: 1.25vw;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: #4F88DD;
  color: #FFF;
}
.ai-result-toggle-icon .iconfont {
  font-size: 0.8333vw;
  line-height: 1;
}
.ai-result-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.0417vw;
  align-self: stretch;
}
.ai-result-card {
  display: flex;
  padding: 1.6667vw 0.8333vw;
  align-items: center;
  gap: 0.4167vw;
  min-width: 0;
  border-radius: 0.625vw;
  background: #FFF;
  cursor: pointer;
}
.ai-result-card-img {
  width: 5.9896vw;
  height: 5.9896vw;
  flex-shrink: 0;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.ai-result-card:hover .ai-result-card-img {
  transform: scale(1.05);
}
.ai-result-card-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}
.ai-result-card-title {
  display: -webkit-box;
  overflow: hidden;
  align-self: stretch;
  margin: 0;
  color: var(--BrandColor_black, #231815);
  text-overflow: ellipsis;
  font-family: "Montserrat-SemiBold";
  font-size: 0.7292vw;
  font-style: normal;
  line-height: 1.25vw;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.ai-result-card-model {
  margin: 0.2083vw 0 0;
  color: var(--BrandColor_black, #231815);
  font-family: "Montserrat-Medium";
  font-size: 0.625vw;
  font-style: normal;
  line-height: 1.0417vw;
  opacity: 0.5;
}
.ai-result-card-btn {
  display: flex;
  height: 1.875vw;
  margin-top: 0.625vw;
  padding: 0 1.0417vw;
  justify-content: center;
  align-items: center;
  border-radius: 5.2083vw;
  background: var(--MainColor-BrandColor_blue, #3A66FB);
  color: #FFF;
  text-align: center;
  font-family: "Montserrat-SemiBold";
  font-size: 0.7292vw;
  font-style: normal;
  line-height: 1.1458vw;
  font-feature-settings: 'liga' off, 'clig' off;
  text-transform: capitalize;
}
.ai-result-card-btn:hover {
  color: #FFF;
}
.ai-result-card-btn.is-disabled {
  background: rgba(35, 24, 21, 0.15);
  cursor: default;
}
.ai-result-card-btn.is-loading {
  pointer-events: none;
  opacity: 0.85;
}
.ai-result-card-btn.is-loading::before {
  content: "";
  width: 0.625vw;
  height: 0.625vw;
  margin-right: 0.3125vw;
  border: 0.1042vw solid rgba(255, 255, 255, 0.45);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: aiResultBtnSpin 0.8s linear infinite;
}
.ai-result-disclaimer {
  margin: 0;
  align-self: stretch;
  color: var(--LightGrey-Light-Grey3, rgba(35, 24, 21, 0.80));
  text-align: center;
  font-family: "Montserrat";
  font-size: 0.7292vw;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  text-transform: capitalize;
}

/* Module 10: Mobile
   ============================================== */
@media (max-width: 768px) {
  .ai-selector {
    width: auto;
    margin: 0 6.4vw 10.6667vw;
    padding-bottom: 10.6667vw;
    border-bottom: 0.2667vw solid var(--LightGrey-Light-Grey-line1, rgba(35, 24, 21, 0.12));
  }
  .ai-selector-inner {
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
  }
  .ai-selector-head {
    gap: 2.1333vw;
  }
  .ai-selector-head-icon {
    width: 8.5333vw;
    height: 8.5333vw;
  }
  .ai-selector-head-title {
    font-size: 6.4vw;
    line-height: 150%;
  }
  .ai-selector-tags {
    gap: 2.1333vw;
    margin-top: 8.5333vw;
  }
  .ai-selector-tag {
    gap: 2.1333vw;
    padding: 1.0667vw 3.2vw;
    border-radius: 26.6667vw;
    font-size: 2.6667vw;
    line-height: 4vw;
  }
  .ai-selector-input {
    height: auto;
    min-height: 36vw;
    margin-top: 0;
    padding: 3.2vw 4.2667vw;
    border-width: 0.5333vw;
    border-radius: 4.2667vw;
    box-shadow: 0 1.6vw 5.3333vw 0 rgba(4, 39, 78, 0.05);
  }
  .ai-selector-input:focus-within {
    box-shadow: 0 1.3333vw 5.8667vw 0 rgba(3, 78, 189, 0.12);
  }
  .ai-selector-textarea {
    /* 移动端保持随输入区拉伸的原有行为，不受 PC 两行定高影响 */
    flex: 1;
    height: auto;
    font-size: 3.7333vw;
    line-height: 150%;
    min-height: 13.3333vw;
  }
  .ai-selector-preview {
    gap: 5.3333vw;
    margin-top: 3.2vw;
    padding-top: 4vw;
  }
  .ai-selector-preview-item {
    width: 24vw;
    height: 24vw;
    border-width: 0.2667vw;
    border-radius: 4.2667vw;
  }
  .ai-selector-preview-img {
    border-radius: 4.2667vw;
  }
  .ai-selector-preview-remove {
    width: 5.8667vw;
    height: 5.8667vw;
  }
  .ai-selector-toolbar {
    margin-top: 3.2vw;
    padding-top: 0;
  }
  .ai-selector-upload {
    gap: 2.1333vw;
  }
  .ai-selector-upload-btn {
    gap: 2.1333vw;
    padding: 2.1333vw 2.6667vw;
    border-width: 0.2667vw;
    border-radius: 2.1333vw;
  }
  .ai-selector-upload-icon {
    width: 4.8vw;
    height: 4.8vw;
  }
  .ai-selector-upload-text {
    font-size: 3.2vw;
    line-height: 150%;
  }
  .ai-selector-upload-count {
    font-size: 3.2vw;
    line-height: 150%;
  }
  .ai-selector-submit {
    gap: 2.1333vw;
    padding: 2.1333vw 4.2667vw;
    border-radius: 2.1333vw;
  }
  .ai-selector-submit-text {
    font-size: 3.2vw;
    line-height: 150%;
  }
  .ai-selector-submit-icon {
    width: 4.2667vw;
    height: 4.2667vw;
  }
  .ai-selector-result {
    min-height: 74.6667vw;
    /* 移动端不限制高度：产品卡片较多时随内容撑开，由页面整体滚动，
       避免容器内部滚动导致卡片显示不全 */
    max-height: none;
    gap: 8.5333vw;
    margin-top: 10.6667vw;
    border-width: 0.5333vw;
    border-radius: 5.3333vw;
  }
  .ai-selector-result::-webkit-scrollbar {
    width: 0.2667vw;
  }
  .ai-selector-result::-webkit-scrollbar-thumb {
    border-radius: 0.2667vw;
  }
  .ai-thinking-head {
    gap: 4.2667vw;
    padding: 4.2667vw 0;
  }
  .ai-thinking-head-icon {
    width: 7.4667vw;
    height: 7.4667vw;
  }
  .ai-thinking-title {
    font-size: 4.8vw;
    line-height: 150%;
  }
  .ai-thinking-dots {
    gap: 1.0667vw;
    margin-left: 0.8vw;
  }
  .ai-thinking-dots i {
    width: 0.8vw;
    height: 0.8vw;
  }
  .ai-thinking-toggle {
    width: 8.5333vw;
    height: 8.5333vw;
  }
  .ai-thinking-toggle::before {
    width: 2.1333vw;
    height: 2.1333vw;
    border-width: 0.5333vw;
  }
  .ai-thinking-status {
    gap: 2.1333vw;
    padding: 3.2vw 0 0;
    font-size: 3.7333vw;
    line-height: 150%;
  }
  .ai-thinking-status-icon {
    width: 5.3333vw;
    height: 5.3333vw;
  }
  .ai-thinking-trace {
    max-height: 80vw;
    margin-top: 2.1333vw;
    padding: 0;
    gap: 2.6667vw;
  }
  .ai-thinking-trace::-webkit-scrollbar {
    width: 0.2667vw;
  }
  .ai-thinking-trace::-webkit-scrollbar-thumb {
    border-radius: 0.2667vw;
  }
  .ai-thinking-step {
    gap: 2.1333vw;
  }
  .ai-thinking-step-icon {
    width: 5.3333vw;
    height: 5.3333vw;
    margin-top: 0.9333vw;
  }
  .ai-thinking-step-label {
    font-size: 3.7333vw;
    line-height: 150%;
  }
  .ai-result-answer {
    gap: 4.2667vw;
  }
  .ai-result-head {
    gap: 4.2667vw;
  }
  .ai-result-head-icon {
    width: 7.4667vw;
    height: 7.4667vw;
  }
  .ai-result-head-title {
    font-size: 4.8vw;
    line-height: 150%;
  }
  .ai-result-interrupted {
    gap: 2.1333vw;
  }
  .ai-result-interrupted-icon {
    width: 5.3333vw;
    height: 5.3333vw;
  }
  .ai-result-interrupted-text {
    font-size: 4.8vw;
    line-height: 150%;
  }
  .ai-result-content {
    max-height: 80vw;
  }
  .ai-result-thinking:not([hidden]) + .ai-result-content:not(:empty) {
    margin-top: 4.2667vw;
  }
  .ai-result-desc,
  .ai-result-content p {
    font-size: 3.7333vw;
    line-height: 150%;
  }
  .ai-result-content p {
    margin-bottom: 4.2667vw;
  }
  .ai-result-subtitle,
  .ai-result-content h1,
  .ai-result-content h2,
  .ai-result-content h3,
  .ai-result-content h4,
  .ai-result-content h5,
  .ai-result-content h6 {
    margin-top: 4.2667vw;
    font-size: 3.7333vw;
    line-height: 150%;
  }
  .ai-result-list,
  .ai-result-content ul,
  .ai-result-content ol {
    margin-top: 2.1333vw;
    padding-left: 4.2667vw;
    font-size: 3.7333vw;
    line-height: 150%;
  }
  .ai-result-list li,
  .ai-result-content li {
    margin-top: 2.1333vw;
  }
  .ai-result-table,
  .ai-result-content table {
    font-size: 3.7333vw;
  }
  .ai-result-table th,
  .ai-result-table td,
  .ai-result-content th,
  .ai-result-content td {
    padding: 2.1333vw 2.6667vw;
    border-width: 0.2667vw;
  }
  /* 移动端表格：列保持自然宽度，超出容器左右滚动 */
  .ai-result-table,
  .ai-result-content table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ai-result-table th,
  .ai-result-table td,
  .ai-result-content th,
  .ai-result-content td {
    white-space: nowrap;
    word-break: normal;
  }
  .ai-result-code,
  .ai-result-content pre {
    margin-top: 2.1333vw;
    padding: 2.6667vw 3.2vw;
    border-radius: 2.1333vw;
    font-size: 3.2vw;
  }
  .ai-result-content pre code {
    padding: 0;
    border-radius: 0;
  }
  .ai-result-code-inline,
  .ai-result-content code {
    padding: 0 1.0667vw;
    border-radius: 1.0667vw;
    font-size: 3.7333vw;
  }
  .ai-result-quote,
  .ai-result-content blockquote {
    margin-top: 2.1333vw;
    padding-left: 3.2vw;
    border-left-width: 0.8vw;
    font-size: 3.7333vw;
  }
  .ai-result-hr,
  .ai-result-content hr {
    height: 0.2667vw;
    margin: 4.2667vw 0;
  }
  .ai-thinking-code {
    margin: 2.1333vw 0;
    padding: 2.1333vw 2.6667vw;
    border-radius: 1.6vw;
    font-size: 3.2vw;
  }
  .ai-result-fade {
    height: 14.9333vw;
    margin-top: -14.9333vw;
  }
  .ai-result-toggle {
    padding: 2.1333vw 2.1333vw 2.1333vw 5.3333vw;
    gap: 4.2667vw;
    border-width: 0.2667vw;
    border-radius: 8vw;
  }
  .ai-selector-result.is-expanded .ai-result-toggle {
    margin-top: 4.2667vw;
  }
  .ai-result-toggle-text {
    font-size: 3.2vw;
    line-height: 150%;
  }
  .ai-result-toggle-icon {
    width: 5.8667vw;
    height: 5.8667vw;
  }
  .ai-result-toggle-icon .iconfont {
    font-size: 3.7333vw;
  }
  .ai-result-products {
    grid-template-columns: 1fr;
    gap: 5.3333vw;
  }
  .ai-result-card {
    padding: 4.2667vw 3.2vw;
    gap: 2.1333vw;
    border-radius: 2.6667vw;
  }
  .ai-result-card-img {
    width: 24vw;
    height: 24vw;
  }
  .ai-result-card-title {
    font-size: 3.7333vw;
    line-height: 5.3333vw;
  }
  .ai-result-card-model {
    margin-top: 1.0667vw;
    font-size: 3.2vw;
    line-height: 4.2667vw;
  }
  .ai-result-card-btn {
    height: 8.5333vw;
    margin-top: 2.6667vw;
    padding: 0 4.2667vw;
    border-radius: 10.6667vw;
    font-size: 3.2vw;
    line-height: 4.8vw;
  }
  .ai-result-card-btn.is-loading::before {
    width: 3.2vw;
    height: 3.2vw;
    margin-right: 1.6vw;
    border-width: 0.5333vw;
  }
  .ai-result-disclaimer {
    font-size: 3.2vw;
    line-height: 150%;
  }
}

/* Module 11: Toast
   ============================================== */
.toast-container {
  position: fixed;
  top: 6.25vw;
  left: 0;
  right: 0;
  z-index: 10560;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5208vw;
  pointer-events: none;
}
.msg-toast {
  display: flex;
  align-items: center;
  margin: 0 auto;
  min-width: 18.75vw;
  max-width: 26.0417vw;
  padding: 0.8333vw 1.0417vw;
  border-radius: 0.4167vw;
  border: none;
  box-shadow: 0 0.2083vw 0.625vw rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5208vw);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: auto;
  box-sizing: border-box;
}
.msg-toast.msg-toast--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.msg-toast--success {
  background: #E8F5E9;
  border-left: 0.2083vw solid #2E7D32;
}
.msg-toast--error {
  background: #FFEBEE;
  border-left: 0.2083vw solid #C62828;
}
.msg-toast__icon {
  font-size: 1.0417vw;
  margin-right: 0.5208vw;
  flex-shrink: 0;
}
.msg-toast__icon .iconfont {
  font-size: 1.0417vw;
}
.msg-toast--success .msg-toast__icon {
  color: #2E7D32;
}
.msg-toast--error .msg-toast__icon {
  color: #C62828;
}
.msg-toast__body {
  flex: 1;
  color: #231815;
  font-family: "Montserrat";
  font-size: 0.7292vw;
  font-weight: 400;
  line-height: 150%;
}

/* Module 12: Toast Mobile
   ============================================== */
@media (max-width: 768px) {
  .toast-container {
    top: 32vw;
    gap: 2.6667vw;
  }
  .msg-toast {
    min-width: 80vw;
    max-width: 85.3333vw;
    padding: 2.1333vw 4.2667vw;
    border-radius: 2.1333vw;
    box-shadow: 0 1.0667vw 3.2vw rgba(0, 0, 0, 0.12);
    transform: translateY(-2.6667vw);
  }
  .msg-toast.msg-toast--visible {
    transform: translateY(0);
  }
  .msg-toast--success {
    border-left-width: 1.0667vw;
  }
  .msg-toast--error {
    border-left-width: 1.0667vw;
  }
  .msg-toast__icon {
    font-size: 5.3333vw;
    margin-right: 2.6667vw;
  }
  .msg-toast__icon .iconfont {
    font-size: 5.3333vw;
  }
  .msg-toast__body {
    font-size: 3.7333vw;
  }
}

/* Module 13: Result Reset Button（国际站产品列表无结果时显示）
   ============================================== */
.ai-result-reset-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4167vw;
  padding: 0.4167vw 0.8333vw;
  border: 0.0521vw solid var(--BrandColor_black, #231815);
  border-radius: 1.25vw;
  background: transparent;
  color: var(--BrandColor_black, #231815);
  text-align: center;
  font-family: "Montserrat-SemiBold";
  font-size: 0.8333vw;
  font-style: normal;
  line-height: 150%;
  margin: 1.25vw 0 0;
  cursor: pointer;
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}
.ai-result-reset-text {
  min-width: 3.9583vw;
}
.ai-result-reset-btn:hover {
  color: #FFF;
  background: #3A66FB;
  border-color: #3A66FB;
}
.ai-result-reset-btn[hidden] {
  display: none;
}
.ai-result-reset-btn .iconfont {
  display: flex;
  width: 1.25vw;
  height: 1.25vw;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: #3A66FB;
  color: #FFF;
  font-size: 1.0417vw;
}

/* Module 14: Result Reset Button Mobile
   ============================================== */
@media (max-width: 768px) {
  .ai-result-reset-btn {
    gap: 2.1333vw;
    padding: 2.1333vw 4.2667vw;
    border-width: 0.2667vw;
    border-radius: 6.4vw;
    font-size: 4.2667vw;
    margin: 2.1333vw 0 0;
  }
  .ai-result-reset-text {
    min-width: 20.2667vw;
  }
  .ai-result-reset-btn .iconfont {
    width: 6.4vw;
    height: 6.4vw;
    font-size: 5.3333vw;
  }
}
