/* 中文注释：应用宝前端性能补丁，目标是降低点击卡顿和页面切换卡顿。 */
/* 中文注释：保留当前布局，只移除重毛玻璃、固定背景、大阴影和位移动画。 */
html {
  scroll-behavior: auto !important;
}

body {
  background-attachment: scroll !important;
}

/* 中文注释：固定背景和毛玻璃会让滚动、点击、弹窗重绘变慢，这里改成普通半透明背景。 */
.topbar,
.tabbar,
[class*="topbar"],
[class*="tabbar"] {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background-color: rgba(255, 255, 255, .96) !important;
}

/* 中文注释：卡片和弹窗只保留轻阴影，避免每次 hover 都触发较重的绘制。 */
.card,
.el-card,
.el-dialog,
.el-message-box,
.el-popper,
.el-popover,
.st,
[class*="card"],
[class*="panel"] {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 18px rgba(15, 23, 42, .045) !important;
}

/* 中文注释：点击按钮和菜单时不再上下跳动，减少视觉迟滞感。 */
.el-button:hover,
.el-button:active,
.navlink:hover,
.navlink:active,
.card.hover:hover,
.card.hover:active,
.st:hover,
.st:active,
.copyable:hover,
.copyable:active,
[class*="navlink"]:hover,
[class*="navlink"]:active {
  transform: none !important;
}

/* 中文注释：避免 transition: all 带来的布局属性动画，只保留颜色、边框、透明度这些轻量动画。 */
.el-button,
.navlink,
.card,
.card.hover,
.st,
.copyable,
.el-table__row,
.el-input__wrapper,
.el-textarea__inner,
.el-tabs__item,
.el-menu-item,
[class*="navlink"] {
  transition-property: color, background-color, border-color, box-shadow, opacity !important;
  transition-duration: .12s !important;
  transition-timing-function: ease-out !important;
}

/* 中文注释：页面进入动画会让路由切换显得慢，这里改成即时显示。 */
.rise,
.page-enter-active,
.page-leave-active,
.fade-in-linear-enter-active,
.fade-in-linear-leave-active,
.el-fade-in-enter-active,
.el-fade-in-leave-active,
.el-zoom-in-center-enter-active,
.el-zoom-in-center-leave-active,
.el-zoom-in-top-enter-active,
.el-zoom-in-top-leave-active,
.el-zoom-in-bottom-enter-active,
.el-zoom-in-bottom-leave-active {
  animation: none !important;
  transition-duration: .001ms !important;
}

.rise,
.page-enter-from,
.page-leave-to {
  opacity: 1 !important;
  transform: none !important;
}

/* 中文注释：表格区域限制滚动串扰，避免滚动时页面和表格互相抢事件。 */
.el-table__body-wrapper,
.el-scrollbar__wrap {
  overscroll-behavior: contain;
}

/* 中文注释：移动端性能更敏感，进一步去掉重阴影和毛玻璃。 */
@media (max-width: 900px) {
  .card,
  .el-card,
  .el-dialog,
  .el-message-box,
  .el-popper,
  .st,
  [class*="card"],
  [class*="panel"] {
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important;
  }

  .topbar,
  .tabbar,
  [class*="topbar"],
  [class*="tabbar"] {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* 中文注释：v2 专项优化，解决“新增项目”弹窗点击后慢半拍。 */
/* 中文注释：Element Plus 弹窗默认有遮罩、锁滚动、过渡动画，第一次打开时容易让浏览器重绘卡顿。 */
.el-overlay,
.el-overlay-dialog,
.dialog-fade-enter-active,
.dialog-fade-leave-active,
.dialog-fade-enter-from,
.dialog-fade-leave-to,
.dialog-fade-enter-to,
.dialog-fade-leave-from {
  animation: none !important;
  transition: none !important;
}

/* 中文注释：遮罩用轻量纯色，不做复杂透明层和动画，减少点击弹窗瞬间的绘制压力。 */
.el-overlay {
  background: rgba(15, 23, 42, .08) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 中文注释：弹窗容器限制重排范围，让打开弹窗时尽量不要影响整页布局。 */
.el-dialog {
  contain: layout paint !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .10) !important;
}

/* 中文注释：新增项目表单内容比较长，限制内部绘制范围，降低首开成本。 */
.el-dialog__body {
  contain: layout paint style !important;
}

/* 中文注释：弹窗里的表单项取消慢动画，输入框、下拉框点击更干脆。 */
.el-dialog .el-form-item,
.el-dialog .el-input,
.el-dialog .el-input__wrapper,
.el-dialog .el-textarea__inner,
.el-dialog .el-select,
.el-dialog .el-input-number,
.el-dialog .el-switch,
.el-dialog .el-button {
  animation: none !important;
  transition-duration: .001ms !important;
}

/* 中文注释：弹窗按钮点击不做缩放和位移，减少“点了但还没反应”的错觉。 */
.el-dialog .el-button:hover,
.el-dialog .el-button:active {
  transform: none !important;
}

/* 中文注释：下拉菜单浮层也取消动画，避免点提交面板时再次卡顿。 */
.el-select__popper,
.el-popper,
.el-popper.is-light,
.el-popper.is-dark {
  animation: none !important;
  transition: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 中文注释：v3 配合项目管理弹窗 JS 小补丁，彻底取消新增项目弹窗过渡。 */
.yyb-fast-dialog-enter-active,
.yyb-fast-dialog-leave-active,
.yyb-fast-dialog-enter-from,
.yyb-fast-dialog-leave-to,
.yyb-fast-dialog-enter-to,
.yyb-fast-dialog-leave-from {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* 中文注释：新增项目弹窗遮罩专用轻量样式。 */
.yyb-fast-modal {
  background: rgba(15, 23, 42, .08) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  animation: none !important;
  transition: none !important;
}

