.version {
  display: grid;
  grid-template-columns: 48px 3px auto auto auto;
  grid-template-rows: 24px auto auto;
  grid-template-areas:
    "preview . text status status"
    "preview . avatars . buttons";
  align-items: center;
  border: 3px solid #757575;
  margin-top: 5px;
  background-color: #4b4949;
  line-height: 1.5;
  font-size: 14px;
  min-height: 54px;
  position: relative;

  &-selected {
    border-color: #00BCD4;
  }

  &-selected > &__status {
    color: #00BCD4;
  }

  &-merge-target {
    border-color: #FF9800;
  }

  &-merge-target > &__status {
    color: #FF9800;
  }

  &-new {
    display: flex;
    cursor: pointer;
    justify-content: center;
    opacity: 0.7;
    border-style: dashed;

    &:hover {
      color: #000;
      opacity: 1;
    }
  }

  &__badge {
    position: absolute;
    top: 0;
    right: 0;
    margin: -7px -10px;
    background-color: red;
    color: white;
    font-size: 11px;
    line-height: 1;
    border-radius: 99px;
    padding: 5px 4px 1px 5px;
  }

  &__preview {
    grid-area: preview;
    height: 100%;
    background-color: #313131;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;

    > .Canvas {
      position: absolute;
      width: 100%;
    }
  }

  &__avatars {
    grid-area: avatars;
    display: flex;
    flex-wrap: wrap;
    height: 100%;
  }

  &__avatar {
    height: 23px;
    width: 23px;
    overflow: hidden;
    display: flex;
    flex-shrink: 0;
    flex-grow: 0;
    color: black;
    background-color: currentColor;
    border: 2px solid currentColor;
    justify-self: start;
    margin-right: 2px;
    margin-bottom: 2px;

    > .Canvas {
      height: 100%;
      width: auto;
    }
  }

  &__text {
    grid-area: text;
    position: relative;
    top: 3px;
    margin-left: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &__status {
    grid-area: status;
    font-size: 11px;
    color: #333;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    justify-self: end;
    margin-right: 2px;
  }

  &__buttons {
    grid-area: buttons;
    display: flex;
    font-size: 13px;
    align-self: end;
    justify-self: end;
    z-index: 1;
    position: relative;
  }

  &__list {
    position: relative;
    margin-left: 5px;
    padding-left: 8px;

    &::before {
      content: '';
      position: absolute;
      width: 3px;
      top: -5px;
      bottom: -5px;
      left: 0;
      background-color: #222;
    }

    .version + &::before {
      bottom: 26px;
    }

    & > .version::before {
      content: '';
      display: block;
      position: absolute;
      height: 3px;
      width: 8px;
      top: 50%;
      transform: translateY(-50%);
      right: 100%;
      margin-right: 3px;
      background-color: #222;
    }
  }
}
