/* 设置 notification、message 层级在 loading 之上 */
.el-message,
.el-notification {
  z-index: 2058 !important;
}

/* el-alert */
.el-alert {
  border: 1px solid;
}

/* 当前页面最大化 css */
.main-maximize {
  .aside-split,
  .el-aside,
  .el-header,
  .el-footer,
  .tabs-box {
    display: none !important;
  }
}

/* custom card */
.card {
  box-sizing: border-box;
  padding: 20px;
  overflow-x: hidden;
  background-color: var(--el-bg-color);
  border: 1px solid var(--el-border-color-light);
  border-radius: 6px;
  box-shadow: 0 0 12px rgb(0 0 0 / 5%);
}

/* ProTable 不需要 card 样式（在组件内使用 ProTable 会使用到） */
.no-card {
  .card {
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .table-search {
    padding: 18px 0 0 !important;
    margin-bottom: 0 !important;
  }
}

/* content-box (常用内容盒子) */
.content-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  .text {
    margin: 20px 0 30px;
    font-size: 23px;
    font-weight: bold;
    color: var(--el-text-color-regular);
  }
  .el-descriptions {
    width: 100%;
    padding: 40px 0 0;
    .el-descriptions__title {
      font-size: 18px;
    }
    .el-descriptions__label {
      width: 200px;
    }
  }
}

/* main-box (树形表格 treeFilter 页面会使用，左右布局 flex) */
.main-box {
  display: flex;
  width: 100%;
  height: 100%;
  .table-box {
    // 这里减去的是 treeFilter 组件宽度
    width: calc(100% - 230px);
  }
}

.table-box {
  width: 100%;
  height: 100%;
}
/* proTable */
.table-box,
.table-main {
  display: flex;
  flex-direction: column;
  // flex: 1;
  // width: 100%;
  // height: 100%;

  // table-search 表格搜索样式
  .table-search {
    padding: 18px 18px 0;
    // margin-bottom: 10px;
    .el-form {
      .el-form-item__content > * {
        width: 100%;
      }

      // 去除时间选择器上下 padding
      .el-range-editor.el-input__wrapper {
        padding: 0 10px;
      }
    }
    .operation {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      // justify-content: flex-start;
      margin-bottom: 18px;
    }
  }

  // 表格 header 样式
  .table-header {
    display: flex;
    .header-button-lf {
      // float: left;
      flex: 1;
    }
    .header-button-ri {
      // float: right;
      flex-shrink: 0;
      margin-left: $space-a2;

      .el-dropdown + .el-button {
        margin-left: 12px;
      }
      .el-button + .el-dropdown {
        margin-left: 12px;
      }
    }
    .el-button {
      margin-bottom: $space-b2;
    }
  }

  // el-table 表格样式
  .el-table,
  .el-table-v2 {
    flex: 1;

    // 修复 safari 浏览器表格错位 https://github.com/HalseySpicy/Geeker-Admin/issues/83
    table {
      width: 100%;
    }
    .el-table__header th,
    .el-table-v2__header-cell,
    .el-table-v2__header-row {
      height: 45px;
      font-size: 15px;
      font-weight: bold;
      color: var(--el-text-color-primary);
      background: var(--el-fill-color-light);
    }
    .el-table__row {
      height: 45px;
      font-size: 14px;
      .el-table__placeholder {
        display: inline;
      }
    }

    // 设置 el-table 中 header 文字不换行，并省略
    .el-table__header .el-table__cell > .cell {
      white-space: nowrap;
    }

    // 解决表格数据为空时样式不居中问题(仅在element-plus中)
    .el-table__empty-block {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      .table-empty {
        line-height: 30px;
      }
    }

    // table 中 image 图片样式
    .table-image {
      width: 50px;
      height: 50px;
      border-radius: 50%;
    }
  }

  // 表格 pagination 样式
  .el-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
  }
}

/* el-table 组件大小 */
.el-table--small {
  .el-table__header th {
    height: 40px !important;
    font-size: 14px !important;
  }
  .el-table__row {
    height: 40px !important;
    font-size: 13px !important;
  }
}
.el-table--large {
  .el-table__header th {
    height: 50px !important;
    font-size: 16px !important;
  }
  .el-table__row {
    height: 50px !important;
    font-size: 15px !important;
  }
}

/* el-drawer */
.el-drawer {
  .el-drawer__header {
    padding: 16px 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--el-border-color-lighter);
    // span {
    //   font-size: 17px;
    //   line-height: 17px;
    //   color: var(--el-text-color-primary) !important;
    // }
  }
  .el-drawer__footer {
    border-top: 1px solid var(--el-border-color-lighter);
  }

  // select 样式
  .el-select {
    width: 100%;
  }

  // drawer-form 中存在两列 form-item 样式
  .drawer-multiColumn-form {
    display: flex;
    flex-wrap: wrap;
    .el-form-item {
      width: 47%;
      &:nth-child(2n-1) {
        margin-right: 5%;
      }
    }
  }
}

/* el-dialog */
.el-dialog {
  .el-dialog__header {
    padding: 15px 20px;
    margin: 0;
    border-bottom: 1px solid var(--el-border-color-lighter);
    .el-dialog__title {
      font-size: 17px;
    }
  }
}

/* LOGO BG*/
.logo-img-box {
  position: relative;
  margin-right: 2px;

  // &::before {
  //   content: "";
  //   position: absolute;
  //   top: -2px;
  //   left: -2px;
  //   right: -2px;
  //   bottom: -2px;
  //   filter: blur(8px);
  //   background: #ffffff;
  //   z-index: 0;
  //   transform: scale(0.6);
  //   border-radius: 50%;
  //   opacity: 0.5;
  // }
}

/* table col setting: dialog */
// .#{$namespace}-table-col-setting {
//   .el-dialog__body {
//     background-color: $color-gray-2;
//     // padding: $space-b2 $space-a2;
//     padding: 0;
//   }
// }

.el-descriptions__body {
  background-color: unset;
}

.el-message {
  background-color: var(--el-bg-color) !important;
  .el-message__content {
    color: var(--lj-color-text-title);
  }
}

.el-notification {
  max-height: 96vh;
  overflow: auto;
}

// .vxe-table--render-default .vxe-table--body-wrapper,
// .vxe-table--render-default .vxe-table--footer-wrapper {
//   background-color: var(--el-bg-color) !important;
// }

.el-checkbox__disabled-checked {
  .el-checkbox__inner {
    background-color: var(--lj-color-primary-300) !important;
    border-color: var(--lj-color-primary-300) !important;

    &::after {
      border-color: var(--lj-color-primary-600);
    }
  }
}
.vxe-body--row.row--current.row--hover {
  .el-checkbox__disabled-checked {
    .el-checkbox__inner {
      background-color: var(--lj-color-primary-200) !important;
      border-color: var(--lj-color-primary-200) !important;

      &::after {
        border-color: var(--lj-color-primary-600) !important;
      }
    }
  }
}

.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after,
.is-disabled.el-checkbox__disabled-checked .el-checkbox__inner:after {
  border-color: var(--lj-color-gray-8) !important;
}

.is-disabled,
.is-disabled:focus,
.is-disabled:hover {
  // opacity: 0.8;
  color: $color-text-disable !important;
}

.input-with-select {
  .el-input-group__prepend {
    padding: 0;
  }
}

.el-notification--upload {
  padding: $space-b2;
  .el-notification__group {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
}

.col--filter {
  &:not(.is--filter-active) {
    .vxe-cell--filter {
      display: none;
      opacity: 0;
    }
  }
  &:hover {
    .vxe-cell--filter {
      opacity: 1;
      display: inline-block;
    }
  }
}

/**el-tabs弹性布局重写*/
.lj-tabs-flex-full {
  height: 100%;
  display: flex;
  flex-direction: column;

  .el-tabs__content {
    flex: 1;
  }
  .el-tab-pane {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}

/**el-tabs弹性布局重写*/
.lj-van-tabs-flex-full {
  height: 100%;
  display: flex;
  flex-direction: column;

  .van-tabs__content {
    flex: 1;
  }
  .van-tab__panel {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}

.layout-search-menu-input {
  display: flex;
  align-items: center;
  height: var(--el-menu-item-height);
  line-height: var(--el-menu-item-height);
  font-size: var(--el-menu-item-font-size);
  color: var(--el-menu-text-color);
  padding: 0 var(--el-menu-base-level-padding);
  list-style: none;
  cursor: pointer;
  position: relative;
  // transition: border-color var(--el-transition-duration), background-color var(--el-transition-duration), color var(--el-transition-duration);
  // box-sizing: border-box;
  // white-space: nowrap;

  &.is-before {
    > * {
      z-index: 1;
    }
    &::before {
      content: "";
      position: absolute;
      right: var(--el-menu-base-level-padding);
      left: var(--el-menu-base-level-padding);
      top: $space-b1;
      bottom: $space-b1;
      background-color: $color-gray-3;
      z-index: 0;
      border-radius: $br-sm;
    }
    &:hover {
      &::before {
        background-color: $color-primary-000;
      }
    }
  }
  &:not(.is-before):hover {
    color: $color-primary-500;
    background-color: $color-primary-000;
  }
}

/* 在全局样式文件中 */
.el-message,
.el-notification {
  z-index: 9999 !important; /* 确保通知总是在最顶层 */
}

/* vxe-table header、footer强制居中 */
.vxe-table--render-default .vxe-header--column,
.vxe-table--render-default .vxe-footer--column {
  text-align: center !important;
}
.vxe-table--render-default .vxe-header--column .vxe-cell,
.vxe-table--render-default .vxe-footer--column .vxe-cell {
  justify-content: center !important;
}
