@root-entry-name: 'default';
@import (reference) '~antd/es/style/themes/index.less';
@history-view: ~'@{ant-prefix}-history-view';

.@{history-view} {
  height: 100%;
  padding: @padding-md;

  &-label {
    position: relative;
    width: 80px;

    &::after {
      position: absolute;
      top: 0;
      right: 7px;
      content: '：';
    }
  }

  .@{ant-prefix}-tabs-extra-content {
    width: 82px;
    white-space: nowrap;
  }

  .@{ant-prefix}-table-thead > tr > th {
    background: rgba(224, 234, 251, 0.4) !important;
  }

  &-extra-right {
    position: absolute;
    top: 10px;
    right: 20px;
    // width: 82px;
  }

  .@{history-view}-spin,
  .@{history-view}-spin > .@{ant-prefix}-spin-container,
  .@{ant-prefix}-tabs,
  .@{ant-prefix}-tabs-content,
  .@{ant-prefix}-tabs-tabpane {
    height: 100%;
  }

  .@{history-view}-progressWrapper {
    z-index: 1000;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;


    .@{history-view}-header {
      flex: none;
      width: 100%;
      height: 160px;
    }

    .@{history-view}-contentWrapper {
      width: 100%;
      z-index: 100;
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      background: rgba(255, 255, 255, 0.9);

      .@{history-view}-progress {
        display: inline-flex;
      }
    }

    .@{history-view}-tip {
      display: inline-block;
      margin-top: 10px;
      color: #1890ff;
    }
  }


  .@{history-view}-single-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .@{ant-prefix}-tabs-tabpane-active {
    display: flex;
    flex-direction: column;
  }

}

.@{history-view}-date {
  display: flex;
  align-items: center;
  white-space: nowrap;

  .@{ant-prefix}-radio-group,
  .@{ant-prefix}-select {
    margin-right: 16px;
  }

  .anticon-plus-circle {
    margin-left: 10px;
    color: @primary-color;
    font-size: 16px;
    cursor: pointer;
  }
}

.@{history-view}-contrast {
  &-wrap {
    position: relative;
    cursor: pointer;
  }

  &-list {
    display: flex;
    align-items: center;
  }

  &-delete {
    position: absolute;
    top: -12px;
    right: -8px;

    .anticon.anticon-close-circle {
      color: #d9d9d9;
      background: white;
    }

    &:hover {
      .anticon.anticon-close-circle {
        color: rgba(0, 0, 0, 0.45);
        background: white;
      }
    }
  }

  &-connect {
    margin: 0 10px;
  }
}

.@{history-view}-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 10px;
  column-gap: 20px;
  row-gap: 10px;
}

.@{history-view}-cover {
  display: flex;
  align-items: center;
  white-space: nowrap;

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

.@{history-view}-content {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.@{history-view}-grid {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  height: 100%;
  padding: 4px;
  overflow-y: auto;
  background-color: #f0f2f5;

  &-item {
    width: 50%;
    height: 50%;
    padding: 4px;

    &-title {
      position: absolute;
      top: 16px;
      left: 20px;
      z-index: 2;
      max-width: 200px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;

      &::before {
        display: inline-block;
        width: 5px;
        height: 16px;
        vertical-align: -0.2em;
        background-color: @primary-color;
        content: '';
      }

      &_text {
        padding-left: 10px;
        color: #333333;
        font-weight: bold;
        font-size: 15px;
        font-family: 'Microsoft YaHei';
      }

      &_unit {
        padding-left: 5px;
        color: #999999;
        font-size: 12px;
      }
    }
  }

  &-item-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    overflow: hidden;
    background-color: #fff;
    border-radius: 4px;
  }
}

.@{history-view}-question {
  color: @primary-color;
  cursor: pointer;
  opacity: 0.8;

  &:hover {
    opacity: 1;
  }
}

.@{history-view}-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.3rem;
}


.@{history-view}-blink-2 {
  -webkit-animation: blink-2 3s infinite both;
  animation: blink-2 3s infinite both;
}

/**
 * ----------------------------------------
 * animation blink-2
 * ----------------------------------------
 */
@-webkit-keyframes blink-2 {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes blink-2 {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}
