/* 视频生成：提示词 @ 引用 */
.mention-source { display: none !important; }
.mention-wrap { position: relative; }
.mention-editor {
  width: 100%; min-height: 150px; max-height: 420px; overflow: auto; padding: 15px;
  border: 1px solid var(--work-line-strong, var(--line)); border-radius: 12px;
  background: var(--work-input, rgba(8,8,10,.64)); color: var(--work-text, var(--text));
  font: 13px/1.75 var(--sans); white-space: pre-wrap; word-break: break-word; caret-color: currentColor;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.mention-editor:focus { border-color: rgba(255,255,255,.7); box-shadow: 0 0 0 3px rgba(var(--blue-rgb, 37,78,255), .12); }
.mention-editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.mention-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; margin: 0 2px; padding: 0 7px 0 3px;
  border-radius: 6px; background: rgba(var(--blue-rgb, 37,78,255), .22); color: #dfe6ff;
  font-size: 12px; line-height: 22px; vertical-align: middle; white-space: nowrap; user-select: all; cursor: default;
}
.mention-chip img { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; }
.mention-chip b { font-weight: 700; }
.mention-chip span { opacity: .78; }
.mention-chip.kind-video:not(.invalid) { background: rgba(89, 201, 212, .2); color: #c9f4f8; padding-left: 7px; }
.mention-chip.kind-audio:not(.invalid) { background: rgba(232, 193, 92, .2); color: #f7e7bd; padding-left: 7px; }
.mention-chip.invalid { background: rgba(255, 92, 96, .18); color: #ff9a9d; padding-left: 7px; }
.mention-panel {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 300px; overflow: auto; padding: 6px;
  border: 1px solid var(--work-line-strong, var(--line)); border-radius: 12px; background: #18181b; box-shadow: 0 16px 40px -16px rgba(0,0,0,.9);
}
.mention-panel.hidden { display: none; }
.mention-option {
  width: 100%; display: grid; grid-template-columns: 36px 46px minmax(0, auto) minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: inherit; text-align: left; cursor: pointer;
}
.mention-option:hover, .mention-option.active { background: rgba(255,255,255,.07); }
.mention-option img, .mention-option i {
  width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: #0d0d0f;
  display: grid; place-items: center; font-style: normal; font-size: 10px; color: var(--muted);
}
.mention-option b { font-size: 13px; }
.mention-option span { font-size: 13px; color: var(--work-text, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-option small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-empty { padding: 10px; color: var(--muted); font-size: 12px; }
.mention-mapping { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.mention-map { display: inline-flex; gap: 4px; max-width: 220px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--work-line, rgba(255,255,255,.1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-map b { color: var(--work-text, var(--text)); }
.mention-map.used { border-color: rgba(var(--blue-rgb, 37,78,255), .7); color: var(--work-text, var(--text)); }
.mention-hint kbd { padding: 0 4px; border: 1px solid var(--work-line-strong, var(--line)); border-radius: 4px; font: inherit; }
.mention-problem { flex-basis: 100%; color: #ffb36b; font-size: 12px; }
#consoleView .reference-file { grid-template-columns: 88px minmax(0, 1fr) auto; }
.reference-file-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reference-file-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
#consoleView .reference-file .reference-alias, .reference-file .reference-alias {
  display: inline-block; width: auto; min-width: 0; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; line-height: 1.4; text-align: left;
}
.reference-alias { align-self: flex-start; max-width: 100%; padding: 0; border: 0; background: none; color: var(--work-text, var(--text)); font-size: 12px; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-alias.empty { color: var(--muted); font-weight: 400; }
.reference-alias:hover { text-decoration: underline; }
.reference-alias-input { width: 100%; max-width: 220px; height: 26px; padding: 0 8px !important; font-size: 12px; }
html[data-theme="light"] .mention-panel { background: #fff; }
html[data-theme="light"] .mention-chip { color: #1d3a9a; }
html[data-theme="light"] .mention-chip.kind-video:not(.invalid) { color: #0f5f67; }
html[data-theme="light"] .mention-chip.kind-audio:not(.invalid) { color: #7a5a10; }
html[data-theme="light"] .mention-chip.invalid { color: #b7353b; }
