@import "../../../styles/base.less";

@prefix: dcloud;

.hash-menu-container {
  position: relative;

  .kanban-form {
    position: absolute;
    top: -3px;
    right: 0px;
  }

  .hash-detail-wrapper {
    background-color: transparent;
  }

  .@{prefix}-menu {
    background-color: transparent;
  }

  .@{prefix}-menu-horizontal {
    line-height: 31px;
    font-family: PingFangSC-Semibold;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.6);
    letter-spacing: 0;
    font-weight: 600;
    border-bottom: 0px;
    width: 100%;
  }

  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-item:hover,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-submenu:hover,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-item-active,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-submenu-active,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-item-open,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-submenu-open,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-item-selected,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-submenu-selected {
    color: rgba(0, 0, 0, 0.87);
  }

  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-item:hover::after,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-submenu:hover::after,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-item-active::after,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-submenu-active::after,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-item-open::after,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-submenu-open::after,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-item-selected::after,
  .@{prefix}-menu-horizontal:not(.@{prefix}-menu-dark) > .@{prefix}-menu-submenu-selected::after {
    border-bottom: 4px solid @primary-color;
    bottom: -5px;
    border-radius: 8px;
  }

  .hash-menu {
    background-color: transparent;

    .hash-table-content {
      padding: 16px 20px 24px;

      .@{prefix}-menu-item {
        margin: 0 24px 0 0;
        padding: 0px;
      }
    }
  }

  .hash-detail-wrapper {
    background-color: #fff;
    border-radius: 8px;
    margin: 0px 20px;
    padding: 16px 20px;
  }

  .refresh-time {
    position: absolute;
    top: 0;
    right: 20px;
  }
  .gateway-refresh {
    top: 98px;
    left: 40px;
    display: inline-block;
    width: 140px;
  }
}
.cluster .refresh-time {
  top: 87px;
  left: 40px;
  right: auto;
}

.monitor-overview-search {
  display: flex;
  align-items: center;
  justify-content: space-between;

  &-reload {
    .dcloud-divider-vertical {
      border-left: 1px solid #ced4da;
    }

    .divider {
      margin: 0px 16px 0px 156px;
      width: 1px;
      height: 20px;
    }

    .reload {
      line-height: 30px;
      // width: 16px;
      // height: 16px;
      margin-right: 6px;
      color: rgba(0, 0, 0, 0.6);
    }

    .text {
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: rgba(0, 0, 0, 0.6);
      line-height: 22px;
      font-weight: 400;
    }

    .reload:hover {
      color: @primary-color;
    }
  }

  &-filter {
    &-item {
      margin-right: 8px;
    }
  }
}

.monitor-overview-content {
  .ant-collapse-content > .ant-collapse-content-box {
    padding: 0 20px !important;
  }

  &-config {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0 20px 0;

    &-box {
      min-width: 1024px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      height: 437px;

      &-view {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 68%;
        min-width: 777px;

        &-state-config {
          border: 1px solid #dcdfe6;
          margin-bottom: 20px;
        }

        &-memory-map {
          display: flex;
          justify-content: space-between;
          align-items: center;
          height: 268px;
          border: 1px solid #dcdfe6;

          .vertical-line {
            width: 1px;
            height: 228px;
            background: #d8d8d8;
          }

          &-view {
            flex: 1;
          }
        }
      }

      &-node-distribution {
        display: flex;
        flex-direction: column;
        width: calc(32% - 20px);
        min-width: 360px;
        height: 437px;
        border: 1px solid #dcdfe6;

        .cross-line {
          width: 100%;
          height: 1px;
          background: #dcdfe6;
          align-self: center;
          margin: 0 0 15px 0;
        }
      }
    }
  }

  &-line {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 20px;

    &-container {
      // width: calc(50% - 10px);
      margin: 0 0 20px 0;
      height: 305px;
      border: 1px solid #dcdfe6;
      border-radius: 2px;
      background: #fff;
    }

    &-item {
      width: 100%;
      height: 305px;

      // 覆盖 echarts tooltip 的 z-index
      div {
        // z-index: 100!important;
      }

      &-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;

        &-title {
          .max-title();
        }

        &-time {
          .min-title();
        }
      }
    }

    &-bigPicture {
      width: 100%;
      height: 50vh;
    }

    &-enlarge {
      position: absolute;
      cursor: pointer;
      top: 17.5px;
      right: 20px;
      width: 15px;
      height: 15px;
      z-index: 100;

      ::selection {
        color: none;
        background: none;
      }

      img {
        width: 100%;
        height: 100%;
      }
    }

    &-legend {
      position: absolute;
      cursor: pointer;
      top: 14.5px;
      right: 45px;
      width: 20px;
      height: 20px;
      line-height: 22px;
      z-index: 100;
      font-size: 18px;
      color: rgb(180, 180, 180);
    }
  }

  &-shard {
    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td,
    .ant-table tfoot > tr > th,
    .ant-table tfoot > tr > td {
      padding: 0;
    }

    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td {
      padding: 6px;
    }
  }
}

.index-view-line-container {
  margin-top: 20px;
}

.content-margin-top-20 {
  margin-top: 20px;
}

.indicators-kanban-loading-container {
  border: 1px solid #dcdfe6;
  border-radius: 2px;
  margin: 0 0 20px 0;
}

.common-loading-container {
  position: relative;

  .center-center-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .center-center-empty-box-title {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: PingFangSC-Medium;
    font-size: 16px;
    color: #303a51;
    line-height: 24px;
  }

  .center-center-empty-box-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

@media screen and (max-width: 1000px) {
  .monitor-overview-content-line-container {
    width: 100%;
  }
}

.indicators-header {
  min-width: 800px;
  border-radius: 4px 4px 0 0;
}
