@use '../../../styles/variate.scss' as *;

// $border-color: #f0f2f5;
$border-radius: 4px;
$border-color: rgb(240 242 245 / 90%);
$fz: 16px;
$family: inherit;
$title-family: inherit;
$color: #4b4b68;

$header_bg: #ccefff; //#a0fcf8;
$row_selected_bg: #ebf9ff; // #ffebbc;

.mj-table {
  height: 100% !important;

  :deep(.vxe-grid) {
    height: 100% !important;
    padding: 0;
    background-color: transparent;

    // 被选中的行
    .row--checked {
      .vxe-body--column {
        background-color: $row_selected_bg;
      }
    }

    .vxe-table--render-default {
      color: #333332;
    }

    .vxe-table--border-line {
      display: none;
    }

    .vxe-grid--layout-header-wrapper {
      padding: 0 8px;
      overflow: hidden;
      background-color: #fff;
      border-radius: $border-radius;

      .vxe-form {
        background-color: transparent !important;
      }
    }

    .vxe-grid--layout-body-content-wrapper {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100% !important;

      .vxe-grid--toolbar-wrapper {
        .vxe-toolbar {
          padding: 15px 0;
          background-color: transparent !important;
        }
      }

      .vxe-grid--table-container {
        flex: 1;
        // border-top-right-radius: $border-radius;
        overflow: hidden;
        border-radius: $border-radius;

        .vxe-table {
          .vxe-cell {
            font-size: 16px;
            text-align: center;
          }

          .vxe-table--header-inner-wrapper,
          .vxe-header--column,
          .vxe-table--scroll-y-top-corner {
            color: #323233;
            background-color: $header_bg;
          }

          .vxe-header--column {
            background-image: none;
          }

          .vxe-table--scroll-y-top-corner::before,
          .vxe-table--scroll-y-wrapper::after {
            // border-color: $border-color !important;
            border: none !important;
          }

          .vxe-body--column {
            /* stylelint-disable declaration-property-value-no-unknown */
            background-image:
              linear-gradient($border-color, $border-color),
              linear-gradient($border-color, $border-color) !important;
            /* stylelint-enable declaration-property-value-no-unknown */
          }
        }
      }

      // .vxe-grid--pager-wrapper {
      //   border-bottom-left-radius: $border-radius;
      //   border-bottom-right-radius: $border-radius;
      //   background-color: #fff !important;
      //   padding: 10px 8px;

      //   .vxe-pager {
      //     padding: 0;

      //     .vxe-pager--wrapper {
      //       display: flex;
      //       align-items: center;
      //       justify-content: flex-end;

      //       .vxe-pager--sizes {
      //         width: 9em !important;
      //       }
      //     }

      //     button:not(.is--disabled) {
      //       background-color: $primary-color;
      //       color: #fff;
      //     }
      //   }
      // }
    }
  }
}

.hide-toolbar {
  :deep(.vxe-grid--layout-body-wrapper) {
    // margin-top: 15px;
  }

  :deep(.vxe-toolbar) {
    display: none !important;
  }

  &.hide-search:not(.selectable) {
    :deep(.vxe-toolbar) {
      padding-bottom: 0 !important;
    }
  }
}

.hide-search {
  :deep(.vxe-grid--layout-header-wrapper) {
    display: none;
  }
}

.hide-check-all {
  :deep(.vxe-header--column) {
    .custom-checkbox {
      display: none;
    }
  }
}
