@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;
  }

  &-extra-right {
    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}-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;
  }
}