@use './var.css';
@use './FormCreate/index.scss';
@use './theme.scss';
@use 'element-plus/theme-chalk/dark/css-vars.css';

.reset-margin [class*='el-icon'] + span {
  margin-left: 2px !important;
}

// 解决抽屉弹出时，body宽度变化的问题
.el-popup-parent--hidden {
  width: 100% !important;
}

// 解决表格内容超过表格总宽度后，横向滚动条前端顶不到表格边缘的问题
.el-scrollbar__bar {
  display: flex;
  justify-content: flex-start;
}

/* nprogress 适配 element-plus 的主题色 */
#nprogress {
  & .bar {
    background-color: var(--el-color-primary) !important;
  }

  & .peg {
    box-shadow:
      0 0 10px var(--el-color-primary),
      0 0 5px var(--el-color-primary) !important;
  }

  & .spinner-icon {
    border-top-color: var(--el-color-primary);
    border-left-color: var(--el-color-primary);
  }
}

/* 全屏模式样式 */
.app-fullscreen {
  /* 隐藏所有布局相关元素 */
  .layout-aside,
  .sidebar-container,
  .el-aside,
  .app-header,
  .layout-header,
  .el-header,
  .tags-view-container,
  .app-footer,
  .el-footer,
  .layout-border__right,
  .layout-border__top,
  .layout-border__bottom,
  .fixed.top-0.left-0.z-10,
  .bg-\[var\(--top-header-bg-color\)\] {
    display: none !important;
  }

  /* 调整主应用容器 */
  .app-wrapper,
  .layout-container,
  .layout-content,
  .app-main,
  .main-container,
  .layout-app-main {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
  }

  /* 确保内容区域完全填充 */
  .content-container,
  .p-\[var\(--app-content-padding\)\].w-full {
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .min-h-screen {
    height: 100vh !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;

    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    overflow: hidden !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
  }
}
