/* 仅调整首页AI快捷入口，其他检索页签保留原布局。 */
.jufa-search-page #jufaai.active { display: block; width: 100%; }
/* 按MasterGo780:59258原始标注显示，字体与尺寸不随设计工具缩放比例放大。 */
.jufa-workbench-ai-entry { width: 774px; max-width: calc(100vw - 40px); margin: 0 auto; text-align: left; font-family: "Microsoft YaHei", sans-serif; }
.jufa-workbench-ai-box { min-height: 100px; padding: 10px 14px; background: #fff; border: 2px solid rgba(227, 227, 227, .6); border-radius: 16px; box-shadow: 0 10px 13px rgba(0, 0, 0, .01); }
.jufa-workbench-ai-box textarea { display: block; width: 100%; height: 38px; min-height: 38px; margin: 0; padding: 0; border: 0; outline: none; resize: none; color: #333; background: transparent; font: 400 14px/24px "Microsoft YaHei", sans-serif; }
.jufa-workbench-ai-box textarea::placeholder { color: #999; }
.jufa-workbench-ai-box:focus-within { border-color: #b7d0ff; }
.jufa-workbench-ai-toolbar, .jufa-workbench-ai-tools { display: flex; align-items: center; }
.jufa-workbench-ai-toolbar { justify-content: space-between; gap: 12px; margin-top: 6px; }
.jufa-workbench-ai-tools { gap: 8px; }
.jufa-workbench-ai-entry button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 32px; padding: 0 8px; border: 0; background: transparent; color: #666; font: 400 14px/24px "Microsoft YaHei", sans-serif; white-space: nowrap; cursor: pointer; }
.jufa-workbench-ai-entry button:focus-visible, .jufa-workbench-ai-shortcuts a:focus-visible { outline: 2px solid #075beb; outline-offset: 4px; }
.jufa-workbench-ai-entry button:disabled { color: #999; cursor: default; }
.jufa-workbench-ai-entry .iconfont { font-size: 18px; }
.jufa-workbench-ai-tool-icon { width: 16px; height: 16px; object-fit: contain; }
.jufa-workbench-ai-chevron { width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin-left: 5px; margin-top: -4px; }
.jufa-workbench-ai-entry .jufa-workbench-ai-desensitize { font-size: 14px; line-height: 20px; }
.jufa-workbench-ai-switch { width: 22px; height: 14px; border-radius: 8px; background: #0a5de7; position: relative; margin-left: 4px; }
.jufa-workbench-ai-switch::after { content: ""; position: absolute; width: 10px; height: 10px; top: 2px; right: 2px; background: #fff; border-radius: 50%; }
.jufa-workbench-ai-desensitize[aria-checked="false"] .jufa-workbench-ai-switch { background: #c4cad4; }
.jufa-workbench-ai-desensitize[aria-checked="false"] .jufa-workbench-ai-switch::after { right: 10px; }
.jufa-workbench-ai-tools--right { gap: 12px; }
.jufa-workbench-ai-entry .jufa-workbench-ai-polish { padding: 0; }
.jufa-workbench-ai-polish img { width: 16px; height: 16px; opacity: .6; }
.jufa-workbench-ai-divider { height: 20px; width: 1px; background: #e3e6ed; }
.jufa-workbench-ai-entry .jufa-workbench-ai-send { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: rgba(3, 81, 236, .3); color: #fff; }
.jufa-workbench-ai-send img { width: 14.5px; height: 16.5px; }
.jufa-workbench-ai-shortcuts-wrap { margin-top: 8px; position: relative; }
.jufa-workbench-ai-shortcuts { width: calc(100% - var(--workbench-prev-space, 0px) - var(--workbench-next-space, 0px)); margin-left: var(--workbench-prev-space, 0px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 0; }
/* 与原首页一致，仅为仍可滚动的方向预留20px箭头和8px间距，边界释放栏位。 */
.jufa-workbench-ai-shortcuts-wrap.has-scroll-prev { --workbench-prev-space: 28px; }
.jufa-workbench-ai-shortcuts-wrap.has-scroll-next { --workbench-next-space: 28px; }
.jufa-workbench-ai-shortcut-track { display: flex; gap: 8px; width: max-content; height: 32px; }
.jufa-workbench-ai-shortcuts::-webkit-scrollbar { display: none; }
.jufa-workbench-ai-shortcuts a { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 0 10px; height: 32px; color: #333; border: 1px solid #e3e3e3; border-radius: 16px; background: #cedffa; font: 400 13px/16px "Microsoft YaHei", sans-serif; text-decoration: none; white-space: nowrap; }
.jufa-workbench-ai-shortcuts a:hover { background: #e3edff; }
.jufa-workbench-ai-shortcuts img { width: 14px; height: 14px; object-fit: contain; }
/* MasterGo渐变为55px；装饰层与箭头分开，按32px标签行居中且不拦截左侧标签。 */
.jufa-workbench-ai-entry .jufa-workbench-ai-scroll { position: absolute; top: 0; right: 0; z-index: 2; width: 83px; height: 32px; padding: 0; border-radius: 0; background: transparent; }
.jufa-workbench-ai-entry .jufa-workbench-ai-scroll[hidden] { display: none; }
/* 55px渐变完整覆盖列表；右侧28px只承载箭头栏位，不能占用渐变显示宽度。 */
.jufa-workbench-ai-scroll::before { content: ""; position: absolute; top: 0; right: 28px; width: 55px; height: 100%; background: linear-gradient(271deg, #0a59ce 31%, rgba(10, 89, 206, 0) 99%); pointer-events: none; }
.jufa-workbench-ai-scroll::after { content: ""; position: absolute; top: 6px; right: 0; width: 20px; height: 20px; border: 1px solid #e3e3e3; border-radius: 50%; background: #cedffa; pointer-events: none; }
.jufa-workbench-ai-scroll img { position: absolute; top: 11px; right: 5px; z-index: 1; width: 10px; height: 10px; border-radius: 0; background: transparent; }
.jufa-workbench-ai-entry .jufa-workbench-ai-scroll--prev { left: 0; right: auto; }
.jufa-workbench-ai-scroll--prev::before { left: 28px; right: auto; background: linear-gradient(89deg, #0a59ce 31%, rgba(10, 89, 206, 0) 99%); }
.jufa-workbench-ai-scroll--prev::after { left: 0; right: auto; }
.jufa-workbench-ai-scroll--prev img { left: 5px; right: auto; transform: rotate(180deg); }
.jufa-workbench-ai-error { color: #fff; margin: 8px 0; font-size: 14px; }
.jufa-workbench-ai-error[hidden] { display: none; }
/* AI入口不展示检索统计或其空白容器，切换到检索页签后沿用原统计显示。 */
.jufa-search-page[data-workbench-tab="ai"] .searchbuttombox,
.jufa-search-page[data-workbench-tab="ai"] .searchbuttombox_border,
.jufa-search-page[data-workbench-tab="ai"] .searchbuttombox_swiper,
.jufa-search-page[data-workbench-tab="ai"] .searchbuttombox_rz,
.jufa-search-page[data-workbench-tab="ai"] #bgi-main .chooseBtn { display: none !important; }
@media (max-width: 700px) {
  /* 原页面右侧有固定工具条，给新输入区和滚动箭头预留可点击空间。 */
  .jufa-workbench-ai-entry { max-width: calc(100vw - 60px); margin-left: 12px; margin-right: auto; }
  .jufa-workbench-ai-box { padding: 12px; border-radius: 16px; }
  .jufa-workbench-ai-toolbar { flex-wrap: wrap; gap: 8px; }
  .jufa-workbench-ai-tools { flex-wrap: wrap; gap: 8px 12px; }
  .jufa-workbench-ai-entry button, .jufa-workbench-ai-box textarea { font-size: 14px; }
  .jufa-workbench-ai-tools--right { flex-wrap: nowrap; margin-left: auto; }
}
