#tm-pb-histories-visualizer-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  content: "";
  z-index: 80;
  /* Should be lower than #tm-pb-histories-visualizer */
  display: none;
}

#tm-pb-histories-visualizer {
  position: absolute;
  right: 0;
  top: 40px;
  background: $dark_color;
  color: white;
  max-width: 340px;
  z-index: 100;
  margin: 0;
  display: none;
  overflow-y: auto;
  border-radius: $border-radius-medium;

  &.active {
    animation: tm_pb_history_slide_in 0.5s;
  }

  &.fadeout {
    animation: tm_pb_history_slide_out 0.5s;
  }

  &::-webkit-scrollbar {
    width: 3px !important;
  }

  &::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.3) !important;
    width: 20px !important;
  }

  &::-webkit-scrollbar-thumb {
    -webkit-border-radius: 0 !important;
    border-radius: 0 !important;
    background: #6b35b6 !important;
  }

  &::-webkit-thumb:window-inactive {
    background: $decoration_control_hover_color !important;
  }
}


#tm-pb-histories-visualizer-overlay.active {
  display: block;
}

#tm-pb-histories-visualizer {
  &.active,
  &.fadeout {
    display: block;
  }

  li {
    list-style: none;
    padding: 13px 30px 13px 50px;
    display: block;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    position: relative;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
  }
}

#tm-pb-histories-visualizer li {
  &:last-child {
    padding-bottom: 20px;
  }

  &:first-child {
    padding-top: 20px;

    &:before {
      top: 22px;
    }
  }

  .datetime {
    font-weight: bold;
    vertical-align: middle;
    display: inline-block;
  }

  .verb,
  .noun,
  .addition {
    text-transform: capitalize;
    display: inline-block;
    vertical-align: middle;
  }

  &:before {
    @include fa-icon();
    font-size: 16px;
    line-height: 1em;
    opacity: 0.5;
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
    position: absolute;
    left: 25px;
    top: 15px;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
  }
}

#tm-pb-histories-visualizer {
  .undo:before {
    content: "\f112";
  }

  .active:before {
    content: "\f00c";
  }

  .redo:before {
    content: "\f064";
  }

  li {
    &:hover {
      background: $button_bg_color;

      &:before {
        opacity: 1;
      }
    }

    &.active {
      color: $white_color;

      &:before {
        opacity: 1;
      }
    }
  }
}
