/**
 * 详情页嵌入社区弹层 · 仅展示成果预览区
 * 由 snapshot-detail-panel-embed.js 在 ?snapshotPanel=preview 时启用
 */

html[data-snapshot-panel='preview'],
html[data-snapshot-panel='preview'] body {
  overflow: auto !important;
  background: #0f1419 !important;
}

html[data-snapshot-panel='preview'] .header,
html[data-snapshot-panel='preview'] .layout-content-left,
html[data-snapshot-panel='preview'] .layout-content-left-fixed,
html[data-snapshot-panel='preview'] .menu,
html[data-snapshot-panel='preview'] .same,
html[data-snapshot-panel='preview'] .chat-input-view,
html[data-snapshot-panel='preview'] .chat-view-bottom,
html[data-snapshot-panel='preview'] .chat-view-component-bottom,
html[data-snapshot-panel='preview'] .msg-view-btn-is-editable,
html[data-snapshot-panel='preview'] .splitpanes__splitter,
html[data-snapshot-panel='preview'] .head-top,
html[data-snapshot-panel='preview'] .el-overlay {
  display: none !important;
}

/* —— 项目详情 communityTask：文档型成果 —— */
html[data-snapshot-panel='preview'] .layout,
html[data-snapshot-panel='preview'] .layout-content,
html[data-snapshot-panel='preview'] .layout-content-right,
html[data-snapshot-panel='preview'] .layout-content-right-container {
  height: auto !important;
  min-height: 100vh !important;
  padding-top: 0 !important;
  overflow: visible !important;
}

html[data-snapshot-panel='preview'] .splitpanes--vertical > .left-pane {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
}

html[data-snapshot-panel='preview'] .splitpanes--vertical > .splitpanes__pane:not(.left-pane),
html[data-snapshot-panel='preview'] .splitpanes--vertical > .right {
  display: none !important;
}

html[data-snapshot-panel='preview'] .v3-mcp-msg,
html[data-snapshot-panel='preview'] .chat-file-item-view,
html[data-snapshot-panel='preview'] .mate-msg,
html[data-snapshot-panel='preview'] .lead-keywords-list,
html[data-snapshot-panel='preview'] .chat-avatar,
html[data-snapshot-panel='preview'] .chat-plugin,
html[data-snapshot-panel='preview'] .snapshot-detail-panel-hide-in-preview {
  display: none !important;
}

html[data-snapshot-panel='preview']:has(.code-content-view),
html[data-snapshot-panel='preview']:has(.code-content-view) body,
html[data-snapshot-panel='preview']:has(.code-content-view) #app,
html[data-snapshot-panel='preview']:has(.code-content-view) .layout,
html[data-snapshot-panel='preview']:has(.code-content-view) .layout-content,
html[data-snapshot-panel='preview']:has(.code-content-view) .layout-content-right,
html[data-snapshot-panel='preview']:has(.code-content-view) .layout-content-right-container,
html[data-snapshot-panel='preview']:has(.code-content-view) .code-content-view,
html[data-snapshot-panel='preview']:has(.code-content-view) .snapshot-detail-preview-host {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  margin: 0 !important;
}

html[data-snapshot-panel='preview']:has(.code-content-view) .layout-content {
  padding-top: 0 !important;
}

html[data-snapshot-panel='preview']:has(.snapshot-detail-preview-host) .layout-content-right,
html[data-snapshot-panel='preview']:has(.snapshot-detail-preview-host) .layout-content-right-container {
  position: relative !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

html[data-snapshot-panel='preview']:has(.snapshot-detail-preview-host) .layout-content-right-container > div,
html[data-snapshot-panel='preview']:has(.snapshot-detail-preview-host) .code-content-view {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

html[data-snapshot-panel='preview'] .code-content-view[data-v-0956d3d2],
html[data-snapshot-panel='preview'] .code-content-view {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

html[data-snapshot-panel='preview'] .snapshot-detail-preview-host {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--light-bg, #f0f2f5) !important;
}

html[data-snapshot-panel='preview'] .snapshot-detail-preview-host-frame {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  display: block !important;
  background: #f0f2f5 !important;
}

html[data-snapshot-panel='preview'] .snapshot-detail-file-preview-host {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #f0f2f5 !important;
}

html[data-snapshot-panel='preview'] .snapshot-detail-file-preview {
  box-sizing: border-box;
  width: min(92%, 560px);
  padding: 36px 28px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  text-align: center;
}

html[data-snapshot-panel='preview'] .snapshot-detail-file-preview-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: rgba(24, 144, 255, 0.12) url('/pages/communityTask/assets/icon-output-2.0fc1c210.svg') center / 28px 28px no-repeat;
}

html[data-snapshot-panel='preview'] .snapshot-detail-file-preview-title {
  margin: 0 0 8px;
  color: #1f1f1f;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

html[data-snapshot-panel='preview'] .snapshot-detail-file-preview-desc {
  margin: 0;
  color: #8c8c8c;
  font-size: 13px;
  line-height: 1.5;
}

/* —— App 型项目（code-content-view：左对话 + 右 Preview iframe） —— */
html[data-snapshot-panel='preview'] .code-content-view,
html[data-snapshot-panel='preview'] .code-content-view .editor-container,
html[data-snapshot-panel='preview'] .code-content-view .editor,
html[data-snapshot-panel='preview'] .code-content-view .splitpanes--vertical,
html[data-snapshot-panel='preview'] .code-content-view .splitpanes--vertical > .right,
html[data-snapshot-panel='preview'] .code-content-view .splitpanes--vertical > .right .splitpanes--horizontal,
html[data-snapshot-panel='preview'] .code-content-view .splitpanes--vertical > .right #iframe,
html[data-snapshot-panel='preview'] .code-content-view .iframe-box,
html[data-snapshot-panel='preview'] .code-content-view .iframe-box-con {
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
}

html[data-snapshot-panel='preview'] .code-content-view .splitpanes--vertical > .left-pane {
  display: none !important;
}

html[data-snapshot-panel='preview'] .code-content-view .splitpanes--vertical > .splitpanes__splitter {
  display: none !important;
}

html[data-snapshot-panel='preview'] .code-content-view .splitpanes--vertical > .right {
  display: block !important;
  width: 100% !important;
  flex: 1 1 100% !important;
  max-width: none !important;
}

html[data-snapshot-panel='preview'] .code-content-view .code-head,
html[data-snapshot-panel='preview'] .code-content-view .splitpanes--horizontal > .splitpanes__splitter,
html[data-snapshot-panel='preview'] .code-content-view .splitpanes--horizontal > .splitpanes__pane.code-head,
html[data-snapshot-panel='preview'] .code-content-view .splitpanes--horizontal > .splitpanes__pane[style*='height: 34px'],
html[data-snapshot-panel='preview'] .code-content-view .splitpanes--horizontal > .splitpanes__pane .splitpanes.code {
  display: none !important;
}

html[data-snapshot-panel='preview'] .code-content-view .splitpanes--horizontal > .splitpanes__pane[style*='height: 100%'] {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  flex: 1 1 auto !important;
  border: none !important;
  border-radius: 0 !important;
}

html[data-snapshot-panel='preview'] .code-content-view .splitpanes--horizontal > .splitpanes__pane[style*='height: 100%'] > .splitpanes--vertical {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
}

html[data-snapshot-panel='preview'] .code-content-view #iframe,
html[data-snapshot-panel='preview'] .code-content-view .iframe-box,
html[data-snapshot-panel='preview'] .code-content-view .iframe-box-con,
html[data-snapshot-panel='preview'] .code-content-view #frameSon,
html[data-snapshot-panel='preview'] .code-content-view .iframe-box iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: block !important;
}

html[data-snapshot-panel='preview'] .code-content-view .loading-content-dark,
html[data-snapshot-panel='preview'] .code-content-view .preview-error-view,
html[data-snapshot-panel='preview'] .code-content-view .same {
  display: none !important;
}

html[data-snapshot-panel='preview'] .code-content-view .layout,
html[data-snapshot-panel='preview'] .code-content-view .layout-content,
html[data-snapshot-panel='preview'] .code-content-view .layout-content-right,
html[data-snapshot-panel='preview'] .code-content-view .layout-content-right-container {
  height: 100% !important;
  min-height: 100% !important;
  padding-top: 0 !important;
  overflow: hidden !important;
}

html[data-snapshot-panel='preview'] .code-content-view .flex[style*='height: 100%'] {
  height: 100% !important;
}

html[data-snapshot-panel='preview']:has(.code-content-view),
html[data-snapshot-panel='preview']:has(.code-content-view) body {
  overflow: hidden !important;
  height: 100% !important;
  background: var(--bg-dark-color, #121212) !important;
}

html[data-snapshot-panel='preview']:has(.snapshot-detail-preview-host) .editor-container,
html[data-snapshot-panel='preview']:has(.snapshot-detail-preview-host) .flex[style*='100vw'] {
  width: 100% !important;
  max-width: 100% !important;
}

/* —— 文档型项目（左栏 markdown 成果） —— */
html[data-snapshot-panel='preview'] .msg-view,
html[data-snapshot-panel='preview'] .msg-view-content {
  height: auto !important;
  overflow: visible !important;
}

html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .msg-view-content {
  background: #f7f3ee;
  color: #1c1c1c;
  padding: 28px 36px 40px;
  min-height: 100vh;
  box-sizing: border-box;
  text-align: left;
}

html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .chat-msg-box.markdown-body {
  max-width: 820px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.75;
}

html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .chat-msg-box.markdown-body h1,
html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .chat-msg-box.markdown-body h2,
html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .chat-msg-box.markdown-body h3 {
  color: #111;
}

html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .chat-msg-box.markdown-body table {
  width: 100%;
  border-collapse: collapse;
}

html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .chat-msg-box.markdown-body th,
html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .chat-msg-box.markdown-body td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 8px 10px;
}

html[data-snapshot-panel='preview'] .chat-msg.snapshot-detail-panel-hide-in-preview {
  display: none !important;
}

html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .splitpanes--vertical > .splitpanes__pane:not(.left-pane),
html[data-snapshot-panel='preview']:not(:has(.code-content-view)) .splitpanes--vertical > .right {
  display: none !important;
}

/* —— 应用分享 shareApp：网页型成果 —— */
html[data-snapshot-panel='preview'] .share-view {
  min-height: 100vh !important;
  height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  background: #0f1419 !important;
}

html[data-snapshot-panel='preview'] .share-view .splitpanes--horizontal,
html[data-snapshot-panel='preview'] .share-view .splitpanes--horizontal > .splitpanes__pane {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100vh !important;
}

html[data-snapshot-panel='preview'] .share-view #iframe,
html[data-snapshot-panel='preview'] .share-view .splitpanes__pane#iframe {
  height: 100vh !important;
}

html[data-snapshot-panel='preview'] .share-view iframe {
  width: 100% !important;
  height: 100vh !important;
  min-height: 100vh !important;
  border: 0;
  display: block;
}

/* —— 弹层右侧：生成过程 / 对话流 —— */
html[data-snapshot-panel='process'],
html[data-snapshot-panel='process'] body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100%;
  padding-bottom: 76px !important;
  background: var(--bg-dark-color, #121212) !important;
}

html[data-snapshot-panel='process'] #app,
html[data-snapshot-panel='process'] .layout,
html[data-snapshot-panel='process'] .layout-content,
html[data-snapshot-panel='process'] .layout-content-right,
html[data-snapshot-panel='process'] .layout-content-right-container,
html[data-snapshot-panel='process'] .splitpanes--vertical,
html[data-snapshot-panel='process'] .splitpanes--vertical > .left-pane {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html[data-snapshot-panel='process'] .header,
html[data-snapshot-panel='process'] .layout-content-left,
html[data-snapshot-panel='process'] .layout-content-left-fixed,
html[data-snapshot-panel='process'] .menu,
html[data-snapshot-panel='process'] .head-top,
html[data-snapshot-panel='process'] .splitpanes__splitter,
html[data-snapshot-panel='process'] .splitpanes--vertical > .splitpanes__pane:not(.left-pane),
html[data-snapshot-panel='process'] .splitpanes--vertical > .right,
html[data-snapshot-panel='process'] .chat-input-view,
html[data-snapshot-panel='process'] .chat-view-bottom,
html[data-snapshot-panel='process'] .msg-view-btn-is-editable,
html[data-snapshot-panel='process'] .el-overlay {
  display: none !important;
}

html[data-snapshot-panel='process'] .splitpanes--vertical > .left-pane {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
}

/* 覆盖 Vue scoped：chat-view-component / msg-view 的 100% 高度 + 内部滚动 */
html[data-snapshot-panel='process'] .left-pane [style*='height: calc'],
html[data-snapshot-panel='process'] .left-pane [style*='height:calc'] {
  height: auto !important;
  max-height: none !important;
}

html[data-snapshot-panel='process'] .chat-view-component,
html[data-snapshot-panel='process'] .chat-view-component[data-v-1e7c986c] {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: block !important;
  flex: none !important;
  align-items: stretch !important;
}

html[data-snapshot-panel='process'] .msg-view,
html[data-snapshot-panel='process'] .chat-view-component .msg-view,
html[data-snapshot-panel='process'] .chat-view-component .msg-view[data-v-1e7c986c] {
  flex: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  justify-content: flex-start !important;
  padding-bottom: 16px !important;
}

html[data-snapshot-panel='process'] .msg-view-content,
html[data-snapshot-panel='process'] .chat-view-component .msg-view-content,
html[data-snapshot-panel='process'] .chat-view-component .msg-view-content[data-v-1e7c986c] {
  max-width: none !important;
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
}

html[data-snapshot-panel='process'] .msg-view-content {
  padding: 8px 10px 24px !important;
  text-align: left;
}

html[data-snapshot-panel='process'] .layout-content {
  padding-top: 0 !important;
}
html[data-snapshot-panel='process'] .mate-msg,
html[data-snapshot-panel='process'] .lead-keywords-list,
html[data-snapshot-panel='process'] .retry-log,
html[data-snapshot-panel='process'] .path-msg-msg,
html[data-snapshot-panel='process'] .snapshot-detail-panel-hide-in-process {
  display: none !important;
}

html[data-snapshot-panel='process'] .same {
  display: none !important;
}

html[data-snapshot-panel='process'] .share-view .head-top,
html[data-snapshot-panel='process'] .share-view .splitpanes--horizontal > .splitpanes__pane:first-child {
  display: none !important;
}

html[data-snapshot-panel='process'] .share-view {
  height: 100vh !important;
  min-height: 100vh !important;
}

html[data-snapshot-panel='process'] .share-view .splitpanes--horizontal,
html[data-snapshot-panel='process'] .share-view .splitpanes--horizontal > .splitpanes__pane {
  height: 100vh !important;
}

html[data-snapshot-panel='process'] .share-view.snapshot-shareapp-process-root {
  height: auto !important;
  min-height: 100% !important;
  background: var(--bg-dark-color, #121212) !important;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .chat-msg,
html[data-snapshot-panel='process'] .snapshot-shareapp-process .v3-mcp-msg,
html[data-snapshot-panel='process'] .snapshot-shareapp-process .mate-msg {
  display: block !important;
  margin-bottom: 14px;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .chat-msg-box {
  display: inline-block;
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .snapshot-shareapp-user-msg .chat-msg-box {
  background: rgba(52, 211, 153, 0.12);
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .v3-mcp-msg-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .v3-mcp-msg-box-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .mate-msg-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .mate-msg-title img {
  width: 16px;
  height: 16px;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .app-msg-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

html[data-snapshot-panel='process'] .snapshot-shareapp-process .app-msg-card-header {
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 600;
}

html[data-snapshot-panel='process'] .snapshot-detail-process-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  box-sizing: border-box;
}
