@root-entry-name: 'default';
// @import (reference) '~antd/es/style/themes/dark.less';
@import (reference) '~antd/dist/antd.dark.less';
@history-view: ~'@{ant-prefix}-history-view';
@primaryColor: #1980ff;
@primaryColorOpacity: #1980ff16;
@primaryTextColor: #dcdcf2d9;

.@{history-view}-historyViewComponents {

  --primary-color: @primaryColor;
  --primary-color-opacity: @primaryColorOpacity;
  --primary-color50: rgba(103, 185, 184, 0.5);
  --primary-color20: rgba(103, 185, 184, 0.2);
  --main-background-color: #213853;
  --text-color: @primaryTextColor;
  --date-negative: rgba(220, 220, 242, 0.25);
  --date-border-color: #98bcfc29;
  --text-color65: rgba(255, 255, 255, 0.65);
  --text-color45: rgba(255, 255, 255, 0.45);
  --text-color25: rgba(255, 255, 255, 0.25);
  --text-color10: rgba(255, 255, 255, 0.1);
  --title-text-color: #ffffff;
  --title-text-primary-color: #ffffff;
  --background-color: #282b34;
  --border-color: #38435a;
  --panel-border-color: #38435a;
  --table-head-background-color: #dcdcf214;
  //background-color: var(--background-color);
  :global{}
  .@{ant-prefix}-table-thead > tr > th {
    background: var(--table-head-background-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
  }

  .@{ant-prefix}-table-container {
    background: var(--background-color);
  }

  .virtual-table {
    ::-webkit-scrollbar-thumb {
      background: var(--border-color);
    }
  }

  .virtual-table-cell {
    background-color: var(--background-color);
    border-bottom-color: var(--border-color);
    color: var(--text-color);
  }


  // radio
  :global {
    .@{ant-prefix}-radio-button-wrapper {
      color: var(--text-color);
      background-color: var(--background-color);
      border-color: var(--panel-border-color);
    }

    .@{ant-prefix}-radio-button-wrapper:not(:first-child)::before {
      background-color: unset;
    }

    .@{ant-prefix}-radio-button-wrapper-checked:not(.@{ant-prefix}-radio-button-wrapper-disabled) {
      color: var(--text-color);
      background-color: var(--background-color);
    }

    .@{ant-prefix}-radio-button-wrapper-checked:not([class*=' @{ant-prefix}-radio-button-wrapper-disabled']).@{ant-prefix}-radio-button-wrapper:first-child {
      border-right-color: var(--primary-color);
    }

    .@{ant-prefix}-radio-button-wrapper-checked:not(.@{ant-prefix}-radio-button-wrapper-disabled):first-child {
      color: var(--text-color);
      border-color: var(--primary-color);
    }

    .@{ant-prefix}-radio-button-wrapper:hover {
      color: var(--primary-color);
    }

    .@{ant-prefix}-radio-button-wrapper-checked:not(.@{ant-prefix}-radio-button-wrapper-disabled) {
      background-color: var(--primary-color);
    }

  }

  // tabs
  :global {
    .@{ant-prefix}-tabs-tab.@{ant-prefix}-tabs-tab-active .@{ant-prefix}-tabs-tab-btn {
      color: var(--primary-color);
    }

    .@{ant-prefix}-tabs-tab-btn:focus,
    .@{ant-prefix}-tabs-tab-remove:focus,
    .@{ant-prefix}-tabs-tab-btn:active,
    .@{ant-prefix}-tabs-tab-remove:active {
      color: var(--primary-color);
    }

    .@{ant-prefix}-tabs-tab:hover {
      color: var(--primary-color);
    }

    .@{ant-prefix}-tabs {
      color: var(--text-color);

      h3 {
        color: var(--text-color);
      }
    }

    .@{ant-prefix}-tabs-top > .@{ant-prefix}-tabs-nav::before {
      border-bottom: 1px solid var(--panel-border-color);
    }
  }

  // checkbox
  :global {
    .@{ant-prefix}-checkbox-input {
      border: 1px solid var(--border-color);
    }

    .@{ant-prefix}-checkbox-inner {
      background-color: var(--background-color);
      border: 1px solid var(--border-color);
    }

    .@{ant-prefix}-checkbox-wrapper {
      color: var(--text-color);
    }
  }

  //date-picker
  :global {
    .@{ant-prefix}-picker {
      background-color: var(--background-color);
      border: 1px solid var(--border-color);

      input {
        color: var(--text-color);
      }
      .@{ant-prefix}-picker-clear {
        background-color: var(--background-color);
        color: var(--text-color);
      }
    }

    .@{ant-prefix}-picker-panel {
      border-bottom: 1px solid var(--date-border-color);
    }

    .@{ant-prefix}-picker-datetime-panel .@{ant-prefix}-picker-time-panel,
    .@{ant-prefix}-picker-time-panel-column:not(:first-child) {
      border-left: 1px solid var(--date-border-color);
    }

    .ant-picker-header > button,
    .@{ant-prefix}-picker-cell.@{ant-prefix}-picker-cell-in-view,
    .@{ant-prefix}-picker-content th,
    .@{ant-prefix}-picker-time-panel-column > li.@{ant-prefix}-picker-time-panel-cell .@{ant-prefix}-picker-time-panel-cell-inner {
      color: var(--text-color);
    }

    .@{ant-prefix}-picker-panel-container {
      background-color: var(--background-color) !important;
    }

    .@{ant-prefix}-picker-header {
      color: var(--text-color);
      border-bottom: 1px solid var(--date-border-color);
    }

    .@{ant-prefix}-picker-cell {
      color: var(--date-negative);
    }

    .@{ant-prefix}-picker-time-panel-column > li.@{ant-prefix}-picker-time-panel-cell .@{ant-prefix}-picker-time-panel-cell-inner:hover,
    .@{ant-prefix}-picker-time-panel-column > li.@{ant-prefix}-picker-time-panel-cell-selected .@{ant-prefix}-picker-time-panel-cell-inner,
    .@{ant-prefix}-picker-cell:hover:not(.@{ant-prefix}-picker-cell-in-view) .@{ant-prefix}-picker-cell-inner,
    .@{ant-prefix}-picker-cell:hover:not(.@{ant-prefix}-picker-cell-selected):not(.@{ant-prefix}-picker-cell-range-start):not(.@{ant-prefix}-picker-cell-range-end):not(.@{ant-prefix}-picker-cell-range-hover-start):not(.@{ant-prefix}-picker-cell-range-hover-end) .@{ant-prefix}-picker-cell-inner {
      background-color: var(--primary-color);
    }

    .@{ant-prefix}-btn-primary[disabled] {
      background-color: var(--primary-color-opacity);
      color: var(--text-color);
    }

    .@{ant-prefix}-picker-range-arrow::before {
      background-color: var(--background-color);
    }

    .@{ant-prefix}-picker-panel .@{ant-prefix}-picker-footer {
      border-top: 1px solid var(--border-color);
    }
  }

  // select
  :global {
    .@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector {
      background-color: var(--background-color);
      color: var(--text-color);
      border-color: var(--border-color);
    }

    .@{ant-prefix}-select-item-option-active:not(.@{ant-prefix}-select-item-option-disabled) {
      background-color: var(--primary-color);
      color: var(--text-color);
    }

    .@{ant-prefix}-select-dropdown {
      background-color: var(--background-color);
    }

    .@{ant-prefix}-select-item {
      color: var(--text-color);
    }
  }
}

.@{history-view} {

  height: 100%;
  padding: @padding-md;

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

  &-label {
    position: relative;
    width: 80px;
    //color: @primaryTextColor;

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

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

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