.#{$ns}Page {
  width: 100%;
  height: 100%;
  background: var(--saas-main-bg);
  font-family: system-ui, -apple-system, Helvetica Neue, sans-serif;

  &-header {
    padding: var(--Page-header-paddingY) var(--Page-header-paddingX);
    background-color: var(--saas-main-bg);
  }

  &-main {
    background: var(--saas-main-bg);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    > .#{$ns}Page-body {
      height: 100%;
    }
  }

  &-content {
    padding: var(--Page-content-paddingY) var(--Page-content-paddingX);
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
  }
  &-right {
    height: 100%;
  }
  
  &-main>&-header {
    border-bottom: var(--borderWidth) solid var(--saas-Border-Dividers);
    // background: var(--Page-header-bg);
  }

  &-headerRow {
    // background: var(--Page-header-bg);
    border-bottom: var(--borderWidth) solid var(--saas-Border-Dividers);

    display: flex;
    flex-direction: row;
    align-items: center;

    .#{$ns}Page-header,
    .#{$ns}Page-toolbar {
      flex-grow: 1;
      min-height: 100%;
    }

    .#{$ns}Page-toolbar {
      text-align: right;
      padding-right: var(--gap-base);
      display: flex;
      flex-direction: row;
      justify-content: flex-end;
      align-items: center;
      flex-wrap: wrap;
    }
  }

  &-title {
    margin: 0;
    padding: 0;
    color: var(--Page-title-color);
    line-height: var(--Page-title-lineHeight);
    font-size: var(--Page-title-fontSize);
    font-weight: var(--Page-title-fontWeight);
    text-align: center;
  }

  &-body {
    // padding: var(--Page-body-padding);
    flex: 1 auto;
    background: var(--saas-main-bg);
    // .#{$ns}Panel-body {
    //   padding: 0 var(--Panel-bodyPadding);
    // }
  }

  &-asideTplWrapper {
    padding: var(--gap-xs);
  }

  &-asideResizor {
    position: absolute;
    right: -0.375rem;
    top: 50%;
    cursor: ew-resize;
    writing-mode: vertical-lr;
    width: 0.75rem;
    height: 1.5rem;
    margin-top: -0.75rem;
    border: 0.0625rem solid #dee2e6;
    background-color: #fff;
    border-radius: 0.142rem;
    font-size: 12px;
    line-height: 0.625rem;
    text-align: center;
    user-select: none;
    color: #666;

    &:hover {
      color: #000;
      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12),
        0 2px 4px 0 rgba(0, 0, 0, 0.08);
    }

    &:after {
      content: '···';
    }
  }
}

// "className":'Page-combination',
.#{$ns}Drawer,
.#{$ns}Page {
  .#{$ns}Grid.#{$ns}Combination {
    width: auto;
    background: var(--saas-main-bg);

    .grid-item {
      padding-right: 0;
      // margin-top: 8px;
      margin-bottom: 0px;
      // box-shadow: 0 2px 4px 0 rgba(82, 90, 102, 0.04);

      .#{$ns}Panel {
        border-color: transparent !important;

        .#{$ns}Panel-heading {
          // border-color: transparent !important;
          padding-top: 12px;

          .#{$ns}Panel-title {
            font-size: 15px;
            font-weight: 600;
          }
        }

        // .#{$ns}Panel-body {
        //   padding: 8px;
        //   padding-top: 0;
        // }
      }
    }

    .antd-Grid-col--md12 {
      margin-top: 0px;
    }

    // .antd-Grid-col--md12.grid-item :first-child {
    //   margin-bottom: 0px;
    // }

    .#{$ns}Combination {
      margin: 0;
    }

  }

  .#{$ns}Tabs.#{$ns}Tabs--line.#{$ns}Combination {

    @include media-breakpoint-down(sm) {
      margin: -0rem;
    }
  }

  .#{$ns}Tabs.#{$ns}Tabs--vertical.#{$ns}Combination {

    @include media-breakpoint-down(sm) {
      margin: -0rem;
    }
  }

  .#{$ns}Tabs.#{$ns}Tabs--content-tiled.#{$ns}Combination {

    @include media-breakpoint-down(sm) {
      margin: -0rem;
    }
  }
}

.#{$ns}Page-toolbar {
  >*+* {
    margin-left: var(--gap-xs);
  }
}

// .#{$ns}Page-aside {
// background: var(--Page-aside-bg);
// }

@include media-breakpoint-up(md) {
  .#{$ns}Page-aside {
    &::before {
      content: '';
      position: absolute;
      width: inherit;
      top: 0;
      bottom: 0;
      z-index: -1;
      background: inherit;
      border: inherit;
    }

    width: var(--Page-aside-width);
    border-right: var(--borderWidth) solid var(--saas-Border-Dividers);

    &--withWidth {
      min-width: var(--Page-aside-width);
      max-width: var(--Page-aside-maxWidth);
    }
  }

  .#{$ns}Page--withSidebar {
    display: flex;
    flex-direction: row;
    align-items: stretch;

    >.#{$ns}Page-content {
      width: 0;
      flex-grow: 1;
    }
  }
}

@mixin animate($animateName: slideInUp, $time: 0.4s, $mode: both) {
  animation-name: $animateName;
  animation-duration: $time;
  animation-fill-mode: $mode;
}

@mixin flex($justify-content: center, $align-items: center) {
  display: flex;
  justify-content: $justify-content;
  align-items: $align-items;
}

@keyframes rotate360 {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.scroll-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;

  .scroll-content {
    width: 100%;
    min-height: calc(100% + 5px);
    position: relative;

    .pull-loading {
      font-size: 18px;
      @include animate(rotate360, 1s);
      animation-timing-function: linear;
      animation-iteration-count: infinite;
    }

    .scroll-content-children {
      pointer-events: auto !important;
    }
  }
}

.pull-loading {
  font-size: 18px;
  @include animate(rotate360, 1s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  vertical-align: sub;
}

.pulldown-wrapper {
  position: absolute;
  width: 100%;
  height: 40px;
  @include flex();
  box-sizing: border-box;
  transform: translateY(-100%) translateZ(0);
  text-align: center;
  color: #999;
  font-size: 12px;

  .pulldown-success {
    font-size: 17px;
    @include flex();

    span {
      font-size: 12px;
      line-height: 1;
      padding-left: 6px;
    }
  }
}

.pullup-wrapper {
  width: 100%;
  height: 32px;
  @include flex();
  box-sizing: border-box;
  position: relative;
  bottom: 0;
  text-align: center;
  color: #999;
  font-size: 12px;

  .pulldown-success {
    @include flex();
    font-size: 17px;

    span {
      font-size: 12px;
    }
  }

  span {
    padding: 0 6px;
  }
}