@import "./color";
@import "./size";
@import "./fonts";

body, html, #root {
  margin: 0;
  height: 100%;
}

.gwt-main-layout {
  height: 100%;
  .gwt-main-header {
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid $grey-8;
    padding: 0 $width-6;
    .gwt-header-title {
      flex: 0 0 $width-15;
      color: $white;
    }
    .gwt-header-content {
      flex: 1 1 auto;
      text-align: right;
      position: relative;
    }
    .gwt-header-conn-status {
      padding: 0 $padding-normal;
      position: absolute;
      right: 0;
      cursor: pointer;
      transition: background-color 500ms;
      &:hover {
        background: rgba(255, 255, 255, .15);
      }
      &.is-connected {
        color: $green-4;
      }
      &.is-connecting {
        color: $yellow-4 !important;
      }
      &.is-disconnect {
        color: $red-4;
      }
    }
  }
  .gwt-page-layout {
    height: 100%;
    overflow: hidden;
    .ant-layout-sider, .ant-layout-sider-trigger {
      border-right: 1px solid $grey-8;
    }
    .gwt-page-frame {
      display: flex;
      flex-direction: column;
      width: 100%;
      .gwt-page-console {
        height: 100%;
        width: 100%;
        flex: 0 0 $width-17;
        border-top: $width-1 double $grey-8;
        background: $white-2;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        .gwt-page-console-history {
          flex: 1 1 auto;
          border: 0;
          background: $black-1;
        }
        .gwt-page-console-input-group {
          flex: 0 0 auto;
          display: flex;
          flex-direction: row;
        }
        .gwt-page-console-input {
          border-right: 0;
          border-left: 0;
          border-bottom: 0;
          border-radius: 0;
        }
      }
      .gwt-page-content {
        flex: 1 1 auto;
        width: 100%;
        overflow: hidden;
        .gwt-pages-home {
          height: 100%;
          overflow: auto;
          padding: $width-2 $width-4;
          .system-info-layout {
            .ant-col {
              padding: 0 $padding-normal;
            }
            .ant-col:nth-child(2) {
              border-left: 1px solid $grey-10;
            }
          }
        }
      }
    }
  }
}

.common-page-layout {
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
  .main-layout {
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    .ant-form-inline {
      .ant-form-item {
        margin-bottom: $width-4;
      }
    }
    .form-container {
      padding: $padding-normal;
    }
    > .title-bar {
      line-height: $width-10;
      font-size: $font-size-3;
      padding-left: $padding-normal;
      font-weight: $font-weight-border;
      border-bottom: 1px solid $grey-8;
    }
    .command-layout {
      flex: 0 0 $width-8;
      .ant-input {
        border-radius: 0;
      }
      .ant-input {
        border-radius: 0;
      }
    }
  }
  .right-layout {
    flex: 0 0 $width-17;
    border-left: 1px solid $grey-8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    .preview-layout {
      flex: 0 0 $width-16;
      padding: $width-4;
      overflow: auto;
    }
    .fav-layout {
      flex: 1 1 auto;
      border-top: 1px solid $grey-8;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      > .title-bar {
        line-height: $width-10;
        font-size: $font-size-3;
        padding-left: $padding-normal;
        font-weight: $font-weight-border;
        border-bottom: 1px solid $grey-8;
      }
      .list-layout {
        flex: 1 1 auto;
        padding: $width-2;
      }
    }
  }
}

.customized-scroll::-webkit-scrollbar, .customized-scroll .ant-table-body::-webkit-scrollbar {
  width: 10px;
}
.customized-scroll::-webkit-scrollbar-track, .customized-scroll .ant-table-body::-webkit-scrollbar-track {
  background: $black-8;
}
.customized-scroll::-webkit-scrollbar-thumb, .customized-scroll .ant-table-body::-webkit-scrollbar-thumb {
  background: $blue-8;
  border-radius: $width-2;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}
