@charset "utf-8";

/* logo区域 */
.main-slogan-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 12px;
  padding-top: max(calc(50vh - 350px), 40px);
}

.main-slogan-wrapper img {
  width: 100%;
  height: 100%;
}

.main-slogan-logo {
  height: 29px;
  min-width: 36.25px;
  max-width: 44px;
  transition: 0.3s;
}

@media (max-width: 480px) {
  .main-slogan-logo {
    height: 26px;
    min-width: 29.25px;
  }
}

.main-slogan-logo.jufa-logo {
  height: 32px;
  padding: 0;
}

@media (max-width: 480px) {
  .main-slogan-logo.jufa-logo {
    height: 28px;
    padding: 0;
  }
}

.main-slogan-divider {
  width: 1px;
  height: 1em;
  font-size: 20px;
  background: #999;
}

.main-slogan-content {
  color: var(--theme-dark-text-color);
  font-size: 26px;
  font-weight: 400;
  height: 26px;
  line-height: 26px;
  letter-spacing: 6px;
  text-align: left;
  padding-left: 4px;
  white-space: nowrap;
  position: relative;
  /* 光泽效果实现 */
  display: inline-flex;
  align-items: center;
  background: linear-gradient(90deg,
      var(--theme-dark-text-color) 0%,
      var(--theme-secondary-color) 10%,
      var(--theme-primary-color) 20%,
      var(--theme-secondary-color) 30%,
      var(--theme-dark-text-color) 40%);
  background-size: 300% 105%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gloss 3s cubic-bezier(0.4, 0, 1, 1) infinite;
}

@media (max-width: 480px) {
  .main-slogan-content {
    font-size: 22px
  }
}

@keyframes gloss {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

/* 提问框  */
.chat-input-wrapper {
  background: linear-gradient(#fff, #fff) padding-box, transparent border-box;
  background-clip: padding-box, border-box;
  background-origin: border-box;
  /* border: 1px solid transparent; */
  border-radius: 12px;
  box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.08);
  position: relative;
  transition: box-shadow 0.24s ease;
  z-index: 3;
  /* width: min(840px, 100% - 32px); */
  margin: 30px auto 10px;
}

.chat-input-container {
  padding: 10px 10px;
  text-align: left;
}

/* 新建 */
.chat-input-new-session {
  position: absolute;
  left: 0;
  top: -35px;
  font-size: 12px;
  color: #666;
  display: none;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0px 1px 25px 0 rgba(0, 0, 0, 0.08);
  transition: color 0.1s ease-in, border-color 0.15s ease,
    background 0.2s ease-in-out;
}

.chat-input-new-session:hover,
.chat-input-new-session:active {
  color: var(--theme-primary-color);
  border-color: var(--theme-lighter-a-color);
  background: rgb(242, 246, 254);
}

.chat-input-new-session i {
  font-size: 12px;
  margin-right: 5px;
}

/* 返回上个问题 */
.chat-input-prev-question {
  position: absolute;
  right: 0;
  top: -35px;
  font-size: 12px;
  color: #666;
  display: none;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0px 1px 25px 0 rgba(0, 0, 0, 0.08);
  transition: color 0.1s ease-in, border-color 0.15s ease,
    background 0.2s ease-in-out;
}

.chat-input-prev-question:hover,
.chat-input-prev-question:active {
  color: var(--theme-primary-color);
  border-color: var(--theme-lighter-a-color);
  background: rgb(242, 246, 254);
}

.chat-input-prev-question.is-active {
  display: block;
}

.chat-input-prev-question i {
  font-size: 12px;
  margin-right: 5px;
}

/* 输入区域 */
.chat-input-area {
  font-family: inherit;
}

.chat-input-textarea {
  border: none;
  box-sizing: border-box;
  caret-color: #335bff;
  cursor: auto;
  display: block;
  font-size: 14px;
  font-family: inherit;
  line-height: 26px;
  min-height: 69px;
  /* 最多10行：26px * 10 = 260px */
  max-height: 260px;
  outline: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 6px 0 0;
  resize: none;
  width: 100%;
  /* 自动调整高度 */
  height: auto;
}

.chat-input-textarea::placeholder {
  color: var(--theme-light-text-color);
  font-size: 14px;
}

.chat-input-textarea::-webkit-scrollbar {
  display: block;
  width: 6px;
}

.chat-input-textarea::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.chat-input-textarea::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.chat-input-main.chat-input-main-focus .chat-input-textarea {
  overflow-x: hidden;
  overflow-y: auto;
}

/* 工具栏 */
.chat-input-tool {
  align-items: center;
  display: flex;
  justify-content: center;
  padding-top: 9px;
  width: 100%;
}

.chat-input-tool.chat-input-tool--handling {
  padding-top: 0;
}

.chat-input-tool * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.chat-input-tool .tool-btn {
  border: 1px solid #ededed;
  background: #fff;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  height: 32px;
  padding: 0 6px 0 8px;
  display: flex;
  column-gap: 4px;
  cursor: pointer;
  color: var(--theme-medium-text-color);
  transition: color 0.1s ease-in, border-color 0.15s ease,
    background 0.2s ease-in-out;
}

.chat-input-tool .tool-btn.tool-btn--icon {
  border-color: transparent;
  border-image: initial;
  background: transparent;
  padding-left: 6px;
}

.chat-input-tool .tool-btn.tool-btn--primary {
  color: rgb(255, 255, 255);
  font-size: 14px;
  cursor: pointer;
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-width: initial;
  border-style: none;
  border-color: initial;
  border-image: initial;
  border-radius: 50%;
  padding: 0 12px;
  background: var(--theme-primary-color);
  transition: 0.2s;
}

.chat-input-tool .tool-btn.is-disabled {
  background: var(--theme-lighter-a-color);
}

.chat-input-tool .tool-btn .tool-btn__icon {
  width: 18px;
  display: flex;
  justify-content: center;
}

.chat-input-tool .tool-btn .tool-btn__icon .iconfont {
  font-size: 14px;
}

.chat-input-tool .tool-btn .tool-btn__icon>img {
  width: 100%;
  height: 100%;
}

.chat-input-tool .tool-btn .tool-btn__mode-val {
  display: none;
}

.chat-input-tool .tool-btn.online-search .tool-btn__icon {
  width: fit-content;
}

.chat-input-tool .tool-btn.online-search.active {
  color: var(--theme-primary-color);
  border-color: var(--theme-lighter-a-color);
  background: rgb(242, 246, 254);
}

/* 工具栏 - 左侧 */
.chat-input-tool .left-tools-wrapper {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  row-gap: 8px;
}

.chat-input-tool .left-tools-wrapper .tool-btn:hover {
  color: var(--theme-primary-color);
  border-color: var(--theme-lighter-a-color);
  background: rgb(242, 246, 254);
}

.chat-input-tool .left-tools-wrapper .tool-btn>b {
  font-weight: normal;
  line-height: 1;
  font-size: 12px;
}

.chat-input-tool .left-tools-wrapper .tool-btn>em {
  display: block;
  height: 16px;
  min-width: 16px;
  text-align: center;
  line-height: 16px;
  color: var(--theme-secondary-color);
  font-size: 12px;
  border-radius: 50%;
}

.chat-input-tool .left-tools-wrapper .tool-btn>i {
  font-size: inherit;
}

.chat-input-tool .left-tools-wrapper> :not(:last-child) .tool-btn {
  margin-right: 8px;
}

/* 追问按钮 */
.follow-questions {
  display: none;
}

.follow-questions .tool-btn {
  position: relative;
}

.follow-questions .tool-btn .switch {
  display: inline-block;
  width: 28px;
  height: 14px;
  background: #ddd;
  border-radius: 9px;
  position: relative;
  margin-left: 2px;
  transition: background 0.3s;
  cursor: pointer;
}

.follow-questions .tool-btn .switch::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 0.3s;
}

.follow-questions .tool-btn.active .switch {
  background: var(--theme-primary-color);
}

.follow-questions .tool-btn.active .switch::after {
  left: 16px;
}

/* 生成中提示 */
.generating-indicator {
  display: flex;
  align-items: center;
  color: var(--theme-primary-color);
  font-size: 14px;
  padding: 0 12px 0 0;
  line-height: 20px;
  white-space: nowrap;
}

.generating-indicator::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  margin-right: 10px;
  border: 2px solid var(--theme-primary-color);
  border-top-color: var(--theme-secondary-color);
  border-bottom-color: var(--theme-secondary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 占位符 */
.chat-input-tool .placeholder-tools-wrapper {
  flex: 1 1;
  min-width: 4px;
}

/* 工具栏 - 右侧 */
.chat-input-tool .right-tools-wrapper {
  align-items: center;
  background: #fff;
  border-radius: 12px;
  display: flex;
  padding-left: 4px;
}

.chat-input-tool .right-tools-wrapper> :last-child {
  margin-left: 8px;
}

.chat-input-tool .tool-btn--icon .tool-btn__icon {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-input-tool .tool-btn--icon .tool-btn__icon>img {
  width: 100%;
  height: 100%;
}

.chat-input-tool .tool-btn--icon.que-clear-btn {
  display: none;
  color: #d0d2d8;
}

.chat-input-tool.chat-input-tool--handling .tool-btn--icon.que-clear-btn {
  display: none !important;
}

/* 提问类型 tab */
.chat-fn-tabs {
  padding: 10px 0 0;
  margin-top: 10px;
  border-top: 1px solid rgba(237, 237, 237, 1);
}

.chat-fn-tabs__scroll {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  min-height: 32px;
}

.chat-fn-tab {
  float: left;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #f1f5fe;
  background: #f1f5fe;
  cursor: pointer;
  line-height: 14px;
  white-space: nowrap;
}

.chat-fn-tab:hover {
  color: var(--theme-primary-color);
}

.chat-fn-tab.is-active {
  color: var(--theme-primary-color);
  border: 1px solid var(--theme-primary-color);
}

.chat-fn-tab+.chat-fn-tab {
  margin-left: 10px;
}

.chat-fn-tab>span {
  display: inline-flex;
  color: inherit;
  line-height: inherit;
}

.chat-fn-tab>.chat-fn-tab__icon {
  font-size: 14px;
  display: inline-flex;
}

/* 更多按钮特殊样式 */
.chat-fn-tab-more {
  position: relative;
}

.chat-fn-tab-more.is-active {
  color: var(--theme-primary-color);
  border: 1px solid var(--theme-primary-color);
}

/* 更多按钮下拉菜单 */
.chat-fn-tab-dropdown {
  position: absolute;
  z-index: 1000;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  padding: 8px;
  max-height: 300px;
  margin: 5px 0;
  overflow-y: auto;
  display: none;
  animation-name: fadeIn;
  animation-duration: 0.3s;
  animation-fill-mode: both;
}

.chat-fn-tab-dropdown.is-show {
  display: block;
}

.chat-fn-tab-dropdown__inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-fn-tab-dropdown .chat-fn-tab {
  margin-left: 0 !important;
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  border-color: transparent;
  margin: 0;
}

.chat-fn-tab-dropdown .chat-fn-tab:hover {
  background: #f1f5fe;
}

.chat-fn-tab-dropdown .chat-fn-tab+.chat-fn-tab {
  margin-left: 0;
  margin-top: 0;
}

.chat-fn-tab-dropdown .chat-fn-tab.is-active {
  background: var(--theme-light-color);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* 工具栏 - 下拉框通用样式 */
.tool-dropdown-menu {
  display: none;
  position: fixed;
  top: 30px;
  z-index: 99;
  box-sizing: border-box;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 1px, rgba(0, 0, 0, 0.02) 0px 0px 4px, rgba(0, 0, 0, 0.08) 0px 12px 20px;
  max-width: calc(100% - 10px);
  padding: 8px;
  border-radius: 12px;
  background: rgb(255, 255, 255);
  overflow: hidden;
}

.tool-dropdown-menu ul {
  max-height: min(290px, 44vh);
  overflow-y: auto;
  overflow-x: hidden;
}

.tool-dropdown-menu li {
  line-height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: 10px;
  cursor: pointer;
  padding: 0 40px 0 8px;
}

.tool-dropdown-menu li:hover {
  background: rgb(249, 249, 251);
  border-radius: 10px;
}

/* 模型切换下拉框 */
.model-dropdown-menu li.active {
  color: var(--theme-primary-color);
  position: relative;
  background: rgb(242, 246, 254);
  border-radius: 12px;
}

.model-dropdown-menu li img {
  width: 22px;
}

.model-dropdown-menu li.active::after {
  content: "\e656";
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  position: absolute;
  right: 8px;
  font-family: iconfont !important;
}

/* 知识库下拉框 */
.tool-dropdown-menu.knowledge-dropdown-menu {
  overflow: auto;
  max-height: min(400px, 44vh);
}

.knowledge-dropdown-menu .knowledge-base-list {
  position: relative;
}

.knowledge-dropdown-menu>.line {
  height: 1px;
  width: 100%;
  background: #f0f0f0;
  margin: 6px 0;
}

.knowledge-dropdown-menu>.knowledge-list-title {
  display: flex;
  align-items: center;
  line-height: 24px;
  font-size: 14px;
  color: var(--theme-dark-text-color);
  font-weight: bold;
  margin: 4px 0;
  cursor: pointer;
}

.knowledge-dropdown-menu>.knowledge-list-title>em {
  margin-right: 8px;
}

.knowledge-dropdown-menu .knowledge-base-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px;
}

.knowledge-dropdown-menu .knowledge-base-list li>i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f5f5f5;
  border-radius: 4px;
  font-family: "iconfont";
  font-size: 16px;
}

.knowledge-dropdown-menu .knowledge-base-list li>div {
  display: inline-flex;
  flex-direction: column;
  row-gap: 2px;
  flex: 1;
}

.knowledge-dropdown-menu .knowledge-base-list li>div>span {
  display: block;
  line-height: 20px;
}

.knowledge-dropdown-menu .knowledge-base-list li>div>p {
  display: block;
  line-height: 20px;
  font-size: 12px;
  color: #999;
}

.knowledge-dropdown-menu em.checkbox {
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid #eee;
  border-radius: 10px;
  position: relative;
  transition: border-color 0.2s ease-in-out;
}

.knowledge-dropdown-menu .knowledge-list-title:hover em.checkbox,
.knowledge-dropdown-menu .knowledge-base-list li:hover em.checkbox {
  border-color: var(--theme-primary-color);
}

.knowledge-dropdown-menu em.checkbox::before {
  content: "";
  box-sizing: content-box;
  border: 1px solid #fff;
  border-left: 0;
  border-top: 0;
  height: 6px;
  left: 4px;
  position: absolute;
  top: 2px;
  transform: rotate(45deg) scaleY(0);
  width: 2.5px;
  transition: transform 0.15s ease-in 0.05s;
  transform-origin: center;
}

.knowledge-dropdown-menu .knowledge-list-title.checked em.checkbox,
.knowledge-dropdown-menu .knowledge-base-list li.checked em.checkbox {
  border-color: var(--theme-primary-color);
  background: var(--theme-primary-color);
}

.knowledge-dropdown-menu .knowledge-list-title.checked em.checkbox::before,
.knowledge-dropdown-menu .knowledge-base-list li.checked em.checkbox::before {
  transform: rotate(45deg) scale(1);
}

/* 最近提问下拉 */
.recently-dropdown-menu {
  width: 360px;
}

.recently-content-head {
  padding: 4px 10px;
  display: flex;
  justify-content: space-between;
}

.recently-content-head b {
  font-size: 14px;
}

.recently-content-head span {
  color: var(--theme-medium-text-color);
  cursor: pointer;
}

.recently-content-list {
  width: 100%;
  max-width: 500px;
  outline: 0;
}

.recently-content-list .recently-list-item {
  display: block;
  line-height: 24px;
  /* column-gap: 5px; */
  cursor: pointer;
  padding: 5px 8px;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 8px;
}

.recently-content-list .recently-list-item:hover {
  background: #f9f9fb;
}

.recently-content-list .recently-list-item span {
  display: inline-flex;
  background: var(--theme-label-default-bg-color);
  padding: 0 8px;
  line-height: 24px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--theme-medium-text-color);
}

.recently-content-list .recently-list-item p {
  flex-grow: 1;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recently-list-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
}

/* 上传文件列表 */
.chat-upload-wrapper.chat-upload-wrapper--active {
  padding: 10px 0 0;
  margin-top: 10px;
  border-top: 1px solid rgba(237, 237, 237, 1);
}

.chat-upload-wrapper__file-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

/* 文件项 */
.attachment-file__item {
  height: 56px;
  background: #f8f8f8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  position: relative;
  animation-name: upbit;
  animation-duration: 0.3s;
  animation-fill-mode: both;
}

.attachment-file__item:nth-child(n + 3) {
  margin-top: 8px;
}

.attachment-file__item:nth-child(odd) {
  margin-right: 8px;
}

.attachment-file__item[data-type="file"] {
  padding: 2px 14px 2px 8px;
  flex: 1 1 50%;
  max-width: calc(50% - 8px);
}

.attachment-file__item[data-type="img"] {
  /* width: 50px; */
  padding: 2px 14px 2px 8px;
  flex: 1 1 calc(33.333% - 12px);
  max-width: calc(50% - 8px);
}

.attachment-file__item .file_del {
  position: absolute;
  right: -3px;
  top: 2px;
  display: flex;
  align-items: center;
  line-height: 1;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  color: #414141;
}

.attachment-file__item .file_del:hover {
  color: #666;
}

.attachment-file__item .file_del i {
  font-size: 12px;
}

/* 文件项 - 文件图标 */
.attachment-file__item .file_icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  background-size: 100% 100%;
}

.attachment-file__item.is-handling .file_icon,
.attachment-file__item.is-failed .file_icon {
  filter: grayscale(1);
}

.attachment-file__item[data-ft="pdf"] .file_icon {
  background-image: url(/static/Public/images/jufaAIimg/file_pdf.png);
}

.attachment-file__item[data-ft="doc"] .file_icon,
.attachment-file__item[data-ft="docx"] .file_icon {
  background-image: url(/static/Public/images/jufaAIimg/file_doc.png);
}

.attachment-file__item[data-ft="xls"] .file_icon,
.attachment-file__item[data-ft="xlsx"] .file_icon {
  background-image: url(/static/Public/images/jufaAIimg/file_xls.png);
}

.attachment-file__item[data-ft="txt"] .file_icon {
  background-image: url(/static/Public/images/jufaAIimg/file_txt.png);
}

/* 文件项 - 文件信息 */
.attachment-file__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  flex: 1;
  max-width: calc(100% - 48px);
  margin-left: 10px;
  text-align: left;
}

.attachment-file__info p {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.attachment-file__info em {
  font-size: 12px;
  color: #888;
}

.attachment-file__title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.is-failed .attachment-file__title {
  cursor: pointer;
}

.attachment-file__desc {
  font-size: 12px;
  color: var(--theme-light-text-color);
  display: flex;
  column-gap: 6px;
  align-items: center;
  margin-top: 3px;
}

.attachment-file__status {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  column-gap: 2px;
}

.is-failed .attachment-file__status {
  color: var(--theme-label-fifth-bg-color);
  cursor: pointer;
}

.attachment-file__status i {
  color: inherit;
  font-size: 13px;
  line-height: 1;
}

/* 图片项 */
.attachment-file__item .file_img {
  /* width: 100%;
  height: 100%; */
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
}

.attachment-file__item .file_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* AI免责声明 */
.chat-input-statement {
  width: 100%;
  text-align: center;
  padding-bottom: 10px;
}

.chat-input-statement>p {
  font-size: 12px;
  color: var(--theme-light-text-color);
}

/* 文书生成 特殊下拉区 */
.chat-input-panel-modal .modal-body {
  max-height: 400px;
}

.chat-input-panel {
  overflow: hidden;
  width: 100%;
  max-height: calc(46vh - 21px);
  flex-direction: column;
  display: flex;
  position: absolute;
  background: #fff;
  z-index: 12;
  top: calc(100% - 10px);
  padding-top: 10px;
  border-radius: 0 0 12px 12px;
  border: 1px solid #fff;
  border-top-color: transparent;
  box-shadow: 0px 25px 25px 0 rgba(0, 0, 0, 0.08);
}

.chat-input-panel.hide {
  animation: slideUp 0.3s ease-out forwards;
  pointer-events: none;
}

.chat-input-panel:not(.hide) {
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from {
    max-height: 0;
  }

  to {
    max-height: calc(46vh - 21px);
  }
}

@keyframes slideUp {
  from {
    max-height: calc(46vh - 21px);
  }

  to {
    max-height: 0;
  }
}

.chat-input-panel-container {
  position: relative;
  height: 100%;
  overflow: hidden;
  display: flex;
}

.input-panel-create {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.input-panel-create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.input-panel-create-tab {
  margin: 4px 0 12px 0;
  padding: 0 18px;
  box-sizing: border-box;
  flex-grow: 1;
  display: flex;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 185, 193, 0.6) transparent;
  transition: none;
}

.input-panel-create-tab-item {
  box-sizing: border-box;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
  flex: none;
  cursor: pointer;
  height: 30px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 14px;
  position: relative;
  justify-content: center;
  align-items: center;
  display: flex;
}

.input-panel-create-tab-item:not(:last-child) {
  margin-right: 8px;
}

.input-panel-create-tab-item.input-panel-create-tab-item-selected {
  color: #4e6ef2;
}

.input-panel-create-tab-item.input-panel-create-tab-item-selected:after {
  content: "";
  background-color: #4e6ef2;
  border-radius: 30px;
  width: 26px;
  height: 3px;
  position: absolute;
  bottom: 0px;
  z-index: 1;
}

/* 模板搜索 */
.input-panel-create-search {
  position: relative;
  width: 184px;
  margin: 4px 18px 12px 18px;
  flex-grow: 1;
}

.input-panel-create-search>input {
  width: 100%;
  padding: 0px 40px 0px 12px;
  border: 1px solid #f5f5f8;
  line-height: 26px;
  font-size: 13px;
  transition: all 0.3s;
  border-radius: 8px;
  background: #f5f5f8;
}

.input-panel-create-search>input:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.input-panel-create-search>i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #333;
}

.input-panel-create-search #searchInput-clear {
  right: 34px;
  font-size: 14px;
  color: #d0d2d8
}

/* 二级Tab按钮样式  */
.secondary-tabs-wrapper {
  display: flex;
  width: 100%;
  gap: 8px;
  padding: 0 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.secondary-tab-btn {
  flex-shrink: 0;
  padding: 4px 16px;
  background-color: var(--theme-label-default-bg-color);
  border: 1px solid var(--theme-label-default-bg-color);
  border-radius: 9px;
  color: #666;
  font-size: 13px;
  line-height: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.secondary-tab-btn:hover {
  color: var(--theme-dark-text-color);
  border-color: var(--theme-light-color);
  background-color: var(--theme-light-color);
}

.secondary-tab-btn.active {
  background-color: var(--theme-light-color);
  border-color: var(--theme-secondary-color);
  color: var(--theme-primary-color);
}

.secondary-content-wrapper {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  display: flex;
  width: 100%;
}

.input-panel-create-content {
  padding: 8px 16px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 185, 193, 0.6) transparent;
}

.input-panel-create-content-list {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  display: flex;
}

.input-panel-create-content-list .empty-content {
  width: 100%;
  text-align: center;
  color: #999;
  padding: 50px 0;
}

.input-panel-create-item {
  cursor: pointer;
  flex: 1 1 20%;
  max-width: calc(25% - 6px);
  margin-left: 8px;
  margin-bottom: 8px;
  position: relative;
}

.input-panel-create-item.upload-template-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-panel-create-item.upload-template-btn .upload-icon {
  display: flex;
  border-radius: 9px;
  width: 32px;
  height: 32px;
  margin-right: 9px;
  align-items: center;
  justify-content: center;
  background: var(--theme-light-color);
  color: var(--theme-secondary-color);
}

/* 选中状态样式 */
.input-panel-create-item.input-panel-create-item-selected {
  background-color: var(--theme-lighter-color);
  border-color: var(--theme-primary-color);
  color: var(--theme-primary-color);
}

.input-panel-create-item.input-panel-create-item-selected .input-panel-create-item-title {
  color: #4e6ef2;
  font-weight: 500;
}

/* 默认屏幕，一行4个（仅作用于可见元素） */
/* 选择同类型、可见的元素，且是第1、5、9...个 */
.input-panel-create-item:not([hidden]):not(.hide):nth-of-type(4n + 1) {
  margin-left: 0;
}

/* 中等屏幕（≤768px），一行3个（仅作用于可见元素） */
@media (max-width: 768px) {
  .input-panel-create-item {
    flex: 1 1 30%;
    max-width: calc(33.333% - 6px);
  }

  /* 覆盖默认屏幕的4n+1规则（仅可见元素） */
  .input-panel-create-item:not([hidden]):not(.hide):nth-of-type(4n + 1) {
    margin-left: 8px;
  }

  /* 新规则：可见元素的第1、4、7...个无左边距 */
  .input-panel-create-item:not([hidden]):not(.hide):nth-of-type(3n + 1) {
    margin-left: 0;
  }
}

/* 小屏幕（≤600px），一行2个（仅作用于可见元素） */
@media (max-width: 600px) {
  .input-panel-create-item {
    flex: 1 1 45%;
    max-width: calc(50% - 6px);
  }

  /* 覆盖中等屏幕的3n+1规则（仅可见元素） */
  .input-panel-create-item:not([hidden]):not(.hide):nth-of-type(3n + 1) {
    margin-left: 8px;
  }

  /* 新规则：可见元素的第1、3、5...个无左边距 */
  .input-panel-create-item:not([hidden]):not(.hide):nth-of-type(2n + 1) {
    margin-left: 0;
  }
}

/* 超小屏幕（≤480px），一行2个（仅作用于可见元素） */
@media (max-width: 480px) {
  .input-panel-create-item {
    flex: 1 1 45%;
    max-width: calc(50% - 4px);
    margin-left: 8px;
    margin-bottom: 8px;
  }

  /* 确保覆盖上层规则，仅可见元素生效 */
  .input-panel-create-item:not([hidden]):not(.hide):nth-of-type(2n + 1) {
    margin-left: 0;
  }
}

.input-panel-create-item-content {
  padding: 6px 10px;
  color: #333;
  box-sizing: border-box;
  /* 每个占20%宽度，一行4个 */
  align-items: center;
  display: flex;
  position: relative;
  border: 1px solid #eee;
  border-radius: 12px;
  width: 100%;
  transition: all 0.2s ease;
  overflow: hidden;
}

.input-panel-create-item-content:hover {
  background-color: var(--theme-hover-bg-color);
}

.input-panel-create-item.is-useful .input-panel-create-item-content::after {
  content: '最近';
  position: absolute;
  width: 80px;
  top: 2px;
  right: -29px;
  font-size: 12px;
  text-align: center;
  background: #ebf1fe;
  color: var(--theme-primary-color);
  padding: 2px 10px;
  border-radius: 0;
  transform: rotate(45deg) scale(0.8);
}

.input-panel-create-item-img {
  border-radius: 9px;
  width: 32px;
  height: 32px;
  margin-right: 9px;
}

.input-panel-create-item-text {
  flex-direction: column;
  flex: 1;
  display: flex;
  justify-content: center;
  overflow: hidden;
  text-align: left;
  line-height: 1.6;
  height: 40px;
}

.input-panel-create-item.is-useful .input-panel-create-item-text {
  padding-right: 14px;
}

.input-panel-create-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: -webkit-line-clamp 0.2s ease;
  word-break: break-all;
  font-size: 13px;
}

/*  我的 删除按钮样式  */
.input-panel-create-item .delete-template-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background-color: transparent;
  border: none;
  border-radius: 50%;
  color: #999;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1;
}

.input-panel-create-item:hover .delete-template-btn {
  top: -8px;
  right: -8px;
  opacity: 1;
  background-color: #b5b5b5;
  color: var(--theme-medium-text-color);
}

.input-panel-create-item .delete-template-btn:hover {
  background-color: rgba(255, 59, 48, 0.2);
  color: red;
}

.input-panel-create-item .delete-template-btn i {
  font-size: 12px;
  line-height: 1;
}

.input-panel-create-item .template-status-btn {
  width: 32px;
  height: 32px;
  background: #eee;
  border-radius: 9px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 12px;
}

.input-panel-create-item .template-status-btn[data-status] {
  color: #f0b731;
  background-color: #fff6e8;
}

.input-panel-create-item .template-status-btn[data-status] i:before {
  content: '\e649';
}

.input-panel-create-item .template-status-btn[data-status="wait"],
.input-panel-create-item .template-status-btn[data-status="parse"] {
  color: #38aef6;
  background: #d1edff;
}

/* .input-panel-create-item .template-status-btn[data-status="wait"] i:before {
  content: '\e6e6';
} */

.input-panel-create-item .template-status-btn[data-status="wait"] i,
.input-panel-create-item .template-status-btn[data-status="parse"] i {
  animation: spin 0.8s linear infinite;
}

.input-panel-create-item .template-status-btn[data-status="wait"] i:before,
.input-panel-create-item .template-status-btn[data-status="parse"] i:before {
  content: '\e6f2';
}

.input-panel-create-item .template-status-btn[data-status="error"] {
  color: #f63838;
  background-color: #fff0f2;
}

.input-panel-create-item .template-status-btn[data-status="error"] i:before {
  content: '\e645';
}

/* 输入框富文本编辑模式 */
.chat-input-ai {
  min-height: 69px;
}

.chat-input-ai .chat-input-editor * {
  text-indent: 0;
}

.chat-input-ai .chat-input-editor .input-custom-no-width {
  display: inline-block;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  width: 3px;
}

.chat-input-ai .chat-input-editor .input-custom-item {
  background-color: rgba(78, 110, 242, 0.09);
  border-radius: 6px;
  color: #4e6ef2;
  display: inline-block;
  font-weight: 500;
  line-height: 24px;
  max-width: 100%;
  padding: 0 6px;
  position: relative;
  min-width: 60px;
  /* 确保空内容时有最小宽度 */
}

/* placeholder样式 - 当内容为空时显示 */
.chat-input-ai .chat-input-editor .input-custom-placeholder:empty:before {
  content: attr(placeholder);
  color: rgba(78, 110, 242, 0.4);
  font-weight: 400;
  pointer-events: none;
}

/* 焦点时placeholder样式 */
.chat-input-ai .chat-input-editor .input-custom-placeholder:focus:empty:before {
  color: rgba(78, 110, 242, 0.3);
}

/* 自定义输入项删除按钮 */
.chat-input-ai .chat-input-editor .input-custom-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 16px;
  height: 16px;
  line-height: 1;
  margin-top: 0px;
  margin-left: 5px;
  text-align: center;
  background-color: #d4d4d4;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  vertical-align: text-bottom;
}

.chat-input-ai .chat-input-editor .input-custom-delete-btn::after {
  content: "\e6cc";
  font-family: "iconfont" !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin-left: -1px;
}

.chat-input-ai .chat-input-editor .input-custom-delete-btn:hover {
  background-color: #c3c3c3;
}

.chat-input-ai .chat-input-editor .input-custom-item:hover .input-custom-delete-btn {
  display: inline-block;
}

/* 富文本编辑器基础样式 */
.chat-input-ai .chat-input-editor {
  border: none;
  box-sizing: border-box;
  caret-color: #335bff;
  cursor: auto;
  display: block;
  font-size: 14px;
  font-family: inherit;
  line-height: 26px;
  outline: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 6px 0 0;
  text-align: left;
  width: 100%;
  min-height: 69px;
  max-height: 200px;
}

.chat-input-ai .chat-input-editor:empty::before {
  content: attr(placeholder);
  color: var(--theme-light-text-color);
  font-size: 14px;
  pointer-events: none;
}

.chat-input-ai .chat-input-editor:focus::before {
  content: "";
}

.chat-input-ai .chat-input-editor.editor-placeholder::before {
  content: attr(placeholder);
  color: var(--theme-light-text-color);
  padding-left: 1px;
}

/* 前缀容器样式 */
.chat-input-ai .chat-input-editor .chat-input-prefix-wrapper {
  display: inline-block;
  width: 0;
  height: 0;
  overflow: hidden;
}

.chat-input-ai .chat-input-editor .chat-input-editor-content {
  display: inline;
}

/* 引用 */
.chat-input-quote {
  position: relative;
  display: none;
  padding: 3px 0 13px 0;
  width: 100%;
}

.chat-input-quote.is-active {
  display: flex;
}

.chat-input-quote__dropdown-btn {
  width: 100%;
  display: flex;
}

.chat-input-quote__box.is-list-quote,
.chat-input-quote__box.is-text-quote {
  position: relative;
  display: flex;
  justify-content: flex-start;
  background: #f3f4f6;
  border: 1px solid #f3f4f6;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--theme-light-text-color);
  cursor: pointer;
  border-radius: 8px;
  width: 100%;
  transition: 0.3s;
}

.chat-input-quote__box.is-list-quote:hover {
  border-color: #e7e7e7;
}

.chat-input-quote__icon {
  margin-right: 10px;
}

.chat-input-quote__inner {
  flex-grow: 1;
  display: inline-flex;
  max-width: calc(100% - 26px);
}

.chat-input-quote__inner>p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.chat-input-quote__inner>span {
  margin-left: 10px;
  white-space: nowrap;
}

.chat-input-quote__inner>i {
  margin-left: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-light-text-color);
  transition: color 0.15s;
}

.chat-input-quote__inner>i:hover {
  color: var(--theme-dark-text-color);
}

/* 引用下拉菜单 */
.chat-input-quote__dropdown {
  display: none;
  position: absolute;
  left: 0;
  bottom: 35px;
  width: 100%;
  z-index: 99;
  box-sizing: border-box;
  box-shadow: rgba(0, 0, 0, 0.1) 0 0 16px 0;
  max-width: 100%;
  padding: 8px;
  border-width: 1px;
  border-style: solid;
  border-color: rgb(238, 238, 238);
  border-image: initial;
  border-radius: 8px;
  background: rgb(255, 255, 255);
  overflow: hidden;
}

.chat-input-quote__dropdown.is-active {
  display: block;
}

.chat-input-quote__dropdown-list {
  display: flex;
  flex-direction: column;
}

.chat-input-quote__dropdown-item {
  display: flex;
  padding: 6px 8px;
  border-radius: 8px;
  margin-top: 6px;
  background-color: #f8f8f8;
}

.chat-input-quote__dropdown-item:first-child {
  margin-top: 0;
}

.chat-input-quote__dropdown-item:hover {
  color: var(--theme-secondary-color);
  background-color: var(--theme-lighter-color);
}

.chat-input-quote__dropdown-item>p {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 要素式下拉 */
.chat-elementary-panel {
  position: relative;
}

.chat-elementary-panel-modal .modal-body {
  max-height: 400px;
}

.chat-elementary-panel {
  overflow: hidden;
  width: 100%;
  max-height: calc(46vh - 21px);
  flex-direction: column;
  display: flex;
  position: absolute;
  background: #fff;
  z-index: 12;
  top: calc(100% - 10px);
  padding-top: 10px;
  border-radius: 0 0 12px 12px;
  border: 1px solid #fff;
  border-top-color: transparent;
  box-shadow: 0px 25px 25px 0 rgba(0, 0, 0, 0.08);
}

.chat-elementary-panel.hide {
  animation: slideUp 0.3s ease-out forwards;
  pointer-events: none;
}

.chat-elementary-panel:not(.hide) {
  animation: slideDown 0.3s ease-out forwards;
}

.chat-elementary-panel-container {
  position: relative;
  height: 100%;
  overflow: hidden;
  display: flex;
}

.elementary-panel-create {
  display: flex;
  flex: 1;
  flex-direction: column;
  max-width: 100%;
}

.elementary-panel-create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}

.elementary-panel-create-tab {
  margin: 4px 10px 12px 10px;
  padding: 0 4px;
  box-sizing: border-box;
  flex-grow: 1;
  display: flex;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 185, 193, 0.6) transparent;
  transition: none;
}

.elementary-panel-create-tab-item {
  box-sizing: border-box;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
  flex: none;
  cursor: pointer;
  height: 30px;
  padding: 8px 4px;
  font-size: 14px;
  line-height: 14px;
  position: relative;
  justify-content: center;
  align-items: center;
  display: flex;
}

.elementary-panel-create-tab-item:not(:last-child) {
  margin-right: 8px;
}

.elementary-panel-create-tab-item.elementary-panel-create-tab-item-selected {
  color: #4e6ef2;
}

.elementary-panel-create-tab-item.elementary-panel-create-tab-item-selected:after {
  content: "";
  background-color: #4e6ef2;
  border-radius: 30px;
  width: 26px;
  height: 3px;
  position: absolute;
  bottom: 0px;
  z-index: 1;
}

/* 模板搜索 */
.elementary-panel-create-search {
  position: relative;
  width: 184px;
  margin: 4px 18px 12px 18px;
  flex-grow: 1;
}

.elementary-panel-create-search>input {
  width: 100%;
  padding: 0px 40px 0px 12px;
  border: 1px solid #f5f5f8;
  line-height: 26px;
  font-size: 13px;
  transition: all 0.3s;
  border-radius: 8px;
  background: #f5f5f8;
}

.elementary-panel-create-search>input:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.elementary-panel-create-search>i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #333;
}

.elementary-panel-create-search #elementarySearchInput-clear {
  right: 34px;
  font-size: 14px;
  color: #d0d2d8
}

.elementary-panel-create-content {
  padding: 8px 16px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
  min-height: 200px;
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 185, 193, 0.6) transparent;
}

.elementary-panel-create-content-list {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  display: flex;
}

.elementary-panel-create-content-list .empty-content {
  width: 100%;
  text-align: center;
  color: #999;
  padding: 50px 0;
}

.elementary-panel-create-content-item {
  padding: 6px 8px;
  color: #333;
  box-sizing: border-box;
  cursor: pointer;
  flex: 1 1 20%;
  align-items: center;
  display: flex;
  position: relative;
  height: 52px;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-left: 8px;
  margin-bottom: 8px;
  max-width: calc(25% - 6px);
  transition: all 0.2s ease;
}

.elementary-panel-create-content-item:hover {
  background-color: var(--theme-hover-bg-color);
}

.elementary-panel-create-content-item:not([hidden]):not(.hide):nth-of-type(4n + 1) {
  margin-left: 0;
}

@media (max-width: 768px) {
  .elementary-panel-create-content-item {
    flex: 1 1 30%;
    max-width: calc(33.333% - 6px);
  }

  .elementary-panel-create-content-item:not([hidden]):not(.hide):nth-of-type(4n + 1) {
    margin-left: 8px;
  }

  .elementary-panel-create-content-item:not([hidden]):not(.hide):nth-of-type(3n + 1) {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .elementary-panel-create-content-item {
    flex: 1 1 45%;
    max-width: calc(50% - 6px);
  }

  .elementary-panel-create-content-item:not([hidden]):not(.hide):nth-of-type(3n + 1) {
    margin-left: 8px;
  }

  .elementary-panel-create-content-item:not([hidden]):not(.hide):nth-of-type(2n + 1) {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .elementary-panel-create-content-item {
    flex: 1 1 45%;
    max-width: calc(50% - 4px);
    margin-left: 8px;
    margin-bottom: 8px;
  }

  .elementary-panel-create-content-item:not([hidden]):not(.hide):nth-of-type(2n + 1) {
    margin-left: 0;
  }
}

.elementary-panel-create-content-item .item-icon {
  border-radius: 30px;
  width: 32px;
  height: 32px;
  margin-right: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  color: white;
}

.elementary-panel-create-content-item .item-icon.is-blue {
  background-color: #3874f6;
}

.elementary-panel-create-content-item .item-icon.is-orange {
  background-color: #f9843f;
}

.elementary-panel-create-content-item .item-icon.is-cyan {
  background-color: #47c5ee;
}

.elementary-panel-create-content-item .item-icon.is-green {
  background-color: #3cbe72;
}

.elementary-panel-create-content-item .item-icon.is-red {
  background-color: #f46363;
}

.elementary-panel-create-content-item .item-text {
  flex: 1;
  text-align: left;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
}

.elementary-panel-empty {
  display: flex;
  line-height: 8;
  color: var(--theme-light-text-color);
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}