/* 对话输入框的上传、引用、技能与反馈交互。 */
.chat-feature-composer { position: relative; overflow: visible; }
.chat-feature-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chat-feature-toolbar button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; padding: 3px 5px; border: 0; border-radius: 5px; background: transparent; color: #6b7280; font: inherit; font-size: 12px; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.chat-feature-toolbar button:hover, .chat-feature-toolbar button[aria-expanded="true"] { background: #f2f3f5; color: #16161b; }
.chat-feature-toolbar button[data-chat-action]:focus-visible { outline: 2px solid #a7baff; outline-offset: 2px; }
.chat-feature-toolbar svg { flex: none; width: 18px; height: 18px; stroke-width: 1.8; }
.chat-feature-toolbar [data-chat-action="upload"] { width: 32px; padding: 4px; }
.chat-feature-toolbar [data-chat-action="upload"] svg { width: 23px; height: 23px; }
.chat-toolbar-divider { flex: none; width: 1px; height: 20px; margin: 0 -5px; background: #e5e5e8; }
.at-symbol { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; font-size: 18px; font-weight: 500; }
.chat-feature-status { margin: 7px 0 0; color: #8b82a4; font-size: 10px; line-height: 1.5; }
.chat-feature-status:empty { display: none; }
.chat-selected-references { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; max-height: 110px; overflow-y: auto; }
.chat-selected-references[hidden], .chat-feature-panel[hidden] { display: none; }
.chat-reference-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 6px 4px 8px; border: 1px solid #d9d4f3; border-radius: 6px; background: #f2eeff; color: #7760aa; font-size: 11px; }
.chat-reference-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-reference-chip svg { flex: none; width: 13px; height: 13px; }
.chat-reference-chip button { display: grid; place-items: center; flex: none; padding: 2px; border: 0; border-radius: 3px; background: none; color: inherit; cursor: pointer; }
.chat-reference-chip button:hover { background: #ddd5f7; }
.chat-reference-chip.skill { border-color: #cfd9fa; background: #edf2ff; color: #5070b5; }
.chat-feature-panel { position: fixed; z-index: 15; left: 0; width: min(460px, 100%); max-height: min(370px, 60dvh); display: flex; flex-direction: column; overflow: hidden; padding: 8px; border: 1px solid #e5dff5; border-radius: 12px; background: #fff; box-shadow: 0 8px 30px #7062982b; color: #43516c; text-align: left; }
.chat-panel-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 8px; font-size: 12px; }
.chat-panel-header button { display: grid; place-items: center; width: 25px; height: 25px; border: 0; border-radius: 5px; background: none; color: #8a8e9e; cursor: pointer; }
.chat-panel-header button:hover { background: #f1edff; }
.chat-panel-header svg { width: 14px; height: 14px; }
.chat-resource-tabs { display: flex; flex: none; gap: 4px; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid #eeeaf6; }
.chat-resource-tabs button { flex: 1; padding: 6px 5px; border: 0; border-radius: 5px; background: none; color: #77809b; font-size: 11px; cursor: pointer; }
.chat-resource-tabs button.active { background: #f2ecff; color: #7858b9; }
.chat-panel-search { flex: none; display: flex; align-items: center; gap: 7px; margin-bottom: 6px; padding: 7px 9px; border: 1px solid #e7e4f1; border-radius: 7px; }
.chat-panel-search svg { width: 14px; height: 14px; color: #9098ad; }
.chat-panel-search input { flex: 1; width: 0; min-width: 0; padding: 0; border: 0; background: none; outline: none; color: #43516c; font: inherit; font-size: 11px; }
.chat-option-list { flex: 1; overflow: auto; min-height: 35px; }
.chat-resource-option, .chat-upload-option { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 8px; border: 0; border-radius: 7px; background: none; color: #5d6680; text-align: left; cursor: pointer; }
.chat-resource-option:hover, .chat-resource-option.keyboard-active, .chat-upload-option:hover { background: #f5f0ff; }
.chat-resource-option > svg, .chat-upload-option > svg { flex: none; width: 20px; height: 20px; color: #8c76c3; }
.chat-resource-option > span, .chat-upload-option > span { flex: 1; min-width: 0; }
.chat-resource-option strong, .chat-upload-option strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.chat-resource-option small, .chat-upload-option small { display: block; margin-top: 4px; color: #9397a8; font-size: 10px; overflow-wrap: anywhere; line-height: 1.5; }
.chat-resource-option em { flex: none; max-width: 60px; overflow: hidden; text-overflow: ellipsis; color: #a4a0b0; font-size: 9px; font-style: normal; }
.chat-option-empty { padding: 22px 8px; color: #9b95ad; text-align: center; font-size: 11px; }
.chat-panel-note { flex: none; margin: 7px 3px 2px; color: #9b95ad; font-size: 10px; line-height: 1.5; }
.chat-panel-footer { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; padding: 7px 3px 2px; border-top: 1px solid #f0edf5; color: #9b95ad; font-size: 10px; }
.chat-panel-footer button { min-height: 27px; padding: 4px 9px; border: 1px solid #ded7f6; border-radius: 6px; background: #f7f4ff; color: #7059cf; font: inherit; font-size: 10px; white-space: nowrap; }
.chat-panel-footer button:hover { border-color: #c7baf0; background: #f0ebff; }
.message-references { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.message-reference { display: inline-block; padding: 4px 8px; border: 1px solid #d9d4f3; border-radius: 5px; background: #f3efff; color: #756095; font-size: 11px; overflow-wrap: anywhere; }
.message-reference small { display: block; margin-top: 3px; color: #9b92ab; font-size: 9px; }
.question-bubble { white-space: pre-wrap; overflow-wrap: anywhere; }
.question-bubble[hidden] { display: none; }
.usage-feedback-dialog { width: min(920px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--theme-border); border-radius: 20px; background: var(--theme-surface); color: #313b54; box-shadow: 0 20px 80px #27365033; }
.usage-feedback-dialog::backdrop { background: #75769420; backdrop-filter: blur(2px); }
.usage-feedback-form { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.usage-feedback-header { position: relative; display: flex; flex: none; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 88px; padding: 18px 30px; border-bottom: 1px solid var(--theme-border); background: var(--theme-wash); overflow: hidden; }
.usage-feedback-header h2 { margin: 0 0 5px; color: #202635; font-size: 22px; font-weight: 800; }
.usage-feedback-header p { margin: 0; color: #6b7790; font-size: 13px; line-height: 1.6; }
.usage-feedback-header button { z-index: 1; flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: -2px -16px 0 0; padding: 7px; border: 0; border-radius: 50%; background: #ffffffc9; color: #81889b; cursor: pointer; }
.usage-feedback-header svg { width: 18px; height: 18px; }
.feedback-header-decoration { position: absolute; right: 55px; top: 0; width: 110px; height: 75px; border-radius: 0 0 20px 20px; background: linear-gradient(145deg, #e8edff, #d2d9ff80); pointer-events: none; }
.feedback-header-decoration > span { position: absolute; top: 12px; right: 26px; display: grid; place-items: center; width: 58px; height: 42px; border-radius: 11px; background: linear-gradient(135deg, #8e92ff, #6571ed); color: #fff; font-size: 28px; line-height: 1; letter-spacing: 4px; transform: rotate(12deg); box-shadow: 0 8px 16px #858efc4d; }
.feedback-header-decoration > span::after { content: ""; position: absolute; left: 9px; bottom: -7px; border: 7px solid transparent; border-top-color: #7a84f5; border-left-color: #7a84f5; }
.feedback-header-decoration i::before, .feedback-header-decoration i::after { content: ""; position: absolute; left: 1px; top: 17px; width: 15px; height: 4px; border-radius: 4px; background: #8d94f6; transform: rotate(40deg); }
.feedback-header-decoration i::after { top: 37px; left: -4px; transform: rotate(-15deg); }
.usage-feedback-fields { display: grid; flex: 1; min-height: 0; overflow-y: auto; gap: 8px; padding: 8px 20px 10px; background: var(--theme-background); }
.usage-feedback-fields label { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 13px; }
.feedback-field-card, .feedback-description-field { padding: 8px 12px; border: 1px solid var(--theme-border); border-radius: 11px; background: var(--theme-surface); box-shadow: 0 3px 10px #41548906; }
.usage-feedback-fields label > span, .feedback-description-field > span { display: flex; flex: 0 0 116px; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.usage-feedback-fields label > span > i, .feedback-description-field > span > i { flex: none; display: grid; place-items: center; width: 32px; height: 36px; margin-right: 5px; border-radius: 8px; background: linear-gradient(150deg, #f8f8ff, #eef1ff); color: #707df0; box-shadow: 0 3px 12px #8b98eb12; }
.usage-feedback-fields label > span svg, .feedback-description-field > span svg { width: 17px; height: 17px; }
.usage-feedback-fields em { color: #d97587; font-style: normal; }
.usage-feedback-fields input { flex: 1; width: 0; min-width: 0; height: 40px; padding: 8px 12px; border: 1px solid #dce0e9; border-radius: 8px; background: #fff; color: #313b54; font: inherit; font-size: 13px; box-shadow: inset 0 1px 2px #63709204; }
.usage-feedback-fields input:focus { outline: 0; border-color: #929ff6; box-shadow: 0 0 0 4px #8697f421; }
.usage-feedback-fields input:disabled { background: #f2f3fa; color: #48536a; }
.usage-feedback-fields input[name="title"] { padding-right: 62px; }
.feedback-title-count { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); color: #8e97a8; font-size: 12px; }
.feedback-contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feedback-description-field { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.feedback-description-field > span { padding-top: 0; }
.feedback-editor-wrap { flex: 1; min-width: 0; overflow: hidden; }
.feedback-description-field .ql-toolbar { padding: 12px 10px; border-color: #dce0e9; border-radius: 8px 8px 0 0; background: #fff; line-height: 1.8; }
.feedback-description-field .ql-picker.ql-header .ql-picker-label::before,
.feedback-description-field .ql-picker.ql-header .ql-picker-item::before { content: "正文"; }
.feedback-description-field .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.feedback-description-field .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: "二级标题"; }
.feedback-description-field .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.feedback-description-field .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: "三级标题"; }
.feedback-description-field .ql-container { border-color: #dce0e9; border-radius: 0 0 8px 8px; background: #fff; font-family: inherit; font-size: 13px; }
.feedback-description-field .ql-editor { min-height: 136px; max-height: 260px; overflow-y: auto; color: #43516c; line-height: 1.7; }
.feedback-description-field .ql-editor.ql-blank::before { color: #a0a7b8; font-size: 12px; font-style: normal; }
.feedback-description-error { margin: 7px 0 0; color: #c55770; font-size: 11px; }
.usage-feedback-footer { display: flex; flex: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 22px; border-top: 1px solid #fff; background: #ffffffdf; }
.usage-feedback-footer > span { color: #9a9fb2; font-size: 10px; line-height: 1.5; }
.usage-feedback-footer > div { display: flex; gap: 8px; margin-left: auto; }
.usage-feedback-footer button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 108px; height: 40px; padding: 8px 15px; border: 1px solid #d4dae6; border-radius: 10px; background: #fff; color: #4e5b73; font-size: 13px; font-weight: 600; cursor: pointer; }
.usage-feedback-footer .feedback-submit { border-color: var(--theme-blue); background: var(--theme-blue); color: #fff; box-shadow: 0 4px 12px #6958df18; }
.feedback-submit svg { width: 17px; height: 17px; }
.chat-feature-composer button:focus-visible, .usage-feedback-dialog button:focus-visible, .usage-feedback-dialog input:focus-visible { outline: 2px solid #ad95ed; outline-offset: 2px; }
.widget-conversation-host { display: flex; flex: 1; min-height: 0; }
.widget-conversation-frame { width: 100%; flex: 1; min-height: 0; border: 0; }
.integration-widget .conversation-inner { padding: 16px 12px; }
.integration-widget .conversation:not(.has-conversation) .conversation-inner { justify-content: flex-start; padding: 20px 16px; }
.integration-widget .page-heading { margin: 0 0 14px; gap: 9px; align-items: flex-start; }
.integration-widget .hero-bots img { width: 32px; height: 32px; }
.integration-widget .hero-copy h1 { font-size: 18px; }
.integration-widget .hero-copy p { font-size: 11px; line-height: 1.6; }
.integration-widget .conversation .prompt-grid { display: flex; flex-direction: column; gap: 0; }
.integration-widget .prompt-title { display: none; }
.integration-widget .prompt-card { height: auto; min-height: 30px; padding: 4px; }
.integration-widget .prompt-icon { display: flex; }
.integration-widget .prompt-copy strong { white-space: normal; font-size: 11px; }
.integration-widget .composer { min-height: 102px; border-radius: 10px; padding: 10px; }
.integration-widget .composer textarea { min-height: 36px; font-size: 12px; }
.integration-widget .chat-feature-toolbar { gap: 6px; }
.integration-widget .chat-feature-toolbar button { gap: 4px; padding: 4px; font-size: 11px; }
.integration-widget .chat-feature-toolbar svg { width: 16px; height: 16px; }
.integration-widget .chat-feature-toolbar [data-chat-action="upload"] { width: 27px; }
.integration-widget .chat-feature-toolbar [data-chat-action="upload"] svg { width: 21px; height: 21px; }
.integration-widget .chat-toolbar-divider { margin: 0; height: 18px; }
.integration-widget .at-symbol { width: 16px; height: 16px; font-size: 16px; }
.integration-widget .chat-feature-panel { max-height: min(330px, 65dvh); }
.integration-widget .answer-card { padding: 12px; }
.integration-widget .answer-header { flex-wrap: wrap; }
.integration-widget .chat-selected-references { max-height: 70px; }
.feedback-detail-button { padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.feedback-detail-button:hover { color: #7964c6; }
@media (max-width: 520px) {
  .chat-feature-toolbar { gap: 6px; }
  .chat-feature-toolbar button { gap: 4px; padding: 4px; font-size: 12px; }
  .chat-toolbar-divider { margin: 0; }
  .usage-feedback-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .usage-feedback-form { max-height: calc(100dvh - 18px); }
  .usage-feedback-header, .usage-feedback-fields { padding: 12px; }
  .usage-feedback-header { min-height: 86px; }
  .usage-feedback-header h2 { font-size: 20px; }
  .usage-feedback-header p { max-width: calc(100% - 24px); font-size: 11px; }
  .usage-feedback-header button { margin-right: 0; }
  .feedback-header-decoration { display: none; }
  .usage-feedback-fields label > span, .feedback-description-field > span { flex-basis: 96px; gap: 3px; font-size: 12px; }
  .usage-feedback-fields label > span > i, .feedback-description-field > span > i { width: 24px; margin-right: 2px; }
  .feedback-field-card, .feedback-description-field { gap: 7px; padding: 7px; }
  .feedback-description-field { flex-direction: column; }
  .feedback-description-field > span { flex-basis: auto; }
  .feedback-editor-wrap { width: 100%; }
  .usage-feedback-footer { padding: 10px 12px; }
  .feedback-contact-fields { grid-template-columns: 1fr; gap: 8px; }
  .feedback-description-field .ql-editor { min-height: 140px; }
}
