.query-history {
  height: 100%;
  .list-item {
    border-bottom: 1px solid $color-gray-3;
  }

  .entry {
    @extend .text-14;
    @extend .bg-white-1;
    font-family: 'Source Code Pro';
    border: 2px solid transparent;
    margin-left: 1px;
    padding: 0 8px 0 5px;

    .other-info {
      @extend .text-13;
      @extend .font-gray-4;
      font-family: 'Source Code Pro';
      display: flex;
      flex-direction: row;
      justify-content: space-between;

      .timestamp {
        align-self: flex-start;
      }
    }

    .query {
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      user-select: initial;
    }
  }

  .date-label {
    font-family: 'Source Code Pro';
    background: #e8e8e8;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: bold;
    color: #888888;
    border-bottom: 1px solid #cccccc;
  }

  .entry.error {
    @extend .bg-red-1;
  }

  .entry.selected.error {
    background-color: #d7d0d9;
  }

  .entry.selected {
    @extend .font-primary-blue;
    @extend .border-primary-blue;
    @extend .bg-blue-1;
    font-weight: bold;
    border: 2px solid;

    .other-info {
      @extend .font-primary-blue;
      font-weight: bold;
    }
  }
}

.header-label {
  @extend .text-12;
  @extend .font-gray-4;
  display: block;
}

.query-detail {
  width: 100%;
  display: flex;
  flex-direction: column;

  .error-message-block {
    @extend .bg-red-1;
    flex: 0.3;
    padding-left: 20px;

    .history-error-text {
      @extend .text-12;
      padding: 7px 0;

      span {
        @extend .font-red-3;
        font-weight: 500;
        margin-right: 8px;
      }
    }
  }

  .metadata-block {
    flex: 0.4;
    padding: 10px 20px;

    .metadata {
      display: flex;
      flex-wrap: wrap;

      .item {
        flex: 1;
        min-width: 130px;

        .value {
          @extend .text-14;
          display: block;
        }

        .description {
          @extend .header-label;
        }
      }

    }
  }

  .query-statement-block {
    flex: 5;
    margin-left: 10px;
    margin-right: 10px;
    height: 0;
    position: relative;

    .copy-all, .was-copied {
      float: left;
      position: relative;
      z-index: 10;
      border: 1px solid $color-gray-3;
      color: $primary-blue;
      font-size: 12px;
      box-shadow: 1px 2px 4px 0px $color-gray-3;
      padding: 3px 12px 3px 10px;
      font-weight: 500;
      min-width: 75px;
    }

    .copy-all {
      background-color: #ffffff;
    }

    .was-copied {
      background-color: $color-blue-1;
      border-color: $color-blue-2;
    }

    .CodeMirror-scroll {
      padding-top: 25px;
    }
  }

  .block-divider {
    @extend .border-gray-3;
    margin-top: 11px;
    margin-bottom: 8px;
  }

  .message-block {
    flex: 2;
    display: flex;
    padding: 0 20px;

    .message {
      flex: 2 2 0%;
      flex-direction: column;
      display: flex;

      .message-header {
        @extend .header-label;
        @extend .not-selectable;
        flex: 0 0 auto;
      }

      .content {
        flex: 0 1 auto;
        overflow: auto;
        position: relative;
        height: 100%;

        .content-value {
          @extend .bg-white-1;
          @extend .text-13;
          font-family: 'Source Code Pro';
          border: 0;
          padding-left: 0;
          position: absolute;
        }
      }
    }
  }
}
