.comment {
  margin: 0 0 0.5em;
  padding: 0 1rem;
  transition: background-color 0.3s;
  position: relative;
  list-style: none;

  @include media-breakpoint-down(sm) {
    padding-right: 0;
  }

  &.isNew {
    border-radius: 6px;
    background: rgb(38 56 217 / 5%);
  }

  .comment {
    margin-right: -1rem;

    &::before,
    &::after {
      content: '';
      left: -14px;
      position: absolute;
    }

    &::before {
      border-bottom: 2px solid #ccc;
      border-left: 2px solid #ccc;
      border-radius: 0 0 0 1.2rem;
      top: -24px;
      height: 50px;
      width: 12px;
    }

    &::after {
      background: #ccc;
      height: 100%;
      top: 0;
      width: 2px;
    }

    &:last-child::after {
      display: none;
    }
  }

  .shout-body {
    @include font-size(1.5rem);

    margin-bottom: 1em;

    *:last-child {
      margin-bottom: 0;
    }
  }

  .author {
    align-items: center;
    margin-bottom: 1.4rem;
  }

  .commentControl:not(.commentControlReply) {
    opacity: 0;
  }
}

.commentContent {
  padding: 0 1rem 1rem 0;

  &:hover {
    .commentControlReply,
    .commentControlShare,
    .commentControlDelete,
    .commentControlEdit,
    .commentControlComplain,
    .commentControl {
      opacity: 1;
    }
  }

  p:last-child {
    margin-bottom: 0;
  }
}

.commentControlReply,
.commentControlShare,
.commentControlDelete,
.commentControlEdit,
.commentControlComplain {
  @include media-breakpoint-up(md) {
    // opacity: 0;
    transition: opacity 0.3s;
  }
}

.commentControlReply,
.commentControlShare,
.commentControlDelete,
.commentControlEdit {
  .icon {
    line-height: 1.2;
    width: 1.2rem;
  }
}

.commentControlDelete {
  align-items: center;
}

.commentControl {
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  display: inline-flex;
  line-height: 1.2;
  margin-right: 0.8rem;
  padding: 0.2em 0.3em;
  transition:
    opacity 0.2s,
    color 0.3s,
    background-color 0.3s;
  vertical-align: top;

  &:hover {
    background: var(--background-color-invert);
    color: var(--default-color-invert);

    .icon {
      filter: invert(1);
      opacity: 1;
    }
  }

  .icon {
    filter: invert(0);
    margin-right: 0.3em;
    opacity: 0.6;
    transition:
      filter 0.3s,
      opacity 0.2s;

    img {
      margin-bottom: -0.1em;
    }
  }
}

.commentControlReply {
  .icon {
    height: 1.2em;
    width: 1.2em;
  }
}

.commentBody {
  @include font-size(1.5rem);

  line-height: 1.47;

  blockquote {
    margin-left: 0;
    padding-left: 10px;
    font-style: italic;
    font-weight: 400;
    color: #9fa1a7;
    border-left: 2px solid #696969;

    p,
    .paragraph {
      margin-bottom: 0;
    }
  }
}

.commentAuthor,
.commentRating {
  @include font-size(1.2rem);
}

.articleAuthor {
  @include font-size(1.2rem);

  color: var(--blue-500);
  margin: 0.3rem 1rem 0;
}

.articleLink {
  @include font-size(1.2rem);

  flex: 0 0 50%;
  margin-right: 2em;

  @include media-breakpoint-down(md) {
    margin: 0.3em 0 0.5em;
  }

  @include media-breakpoint-up(md) {
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
}

.articleLinkIcon {
  display: inline-block;
  margin-right: 1em;
  vertical-align: middle;
  width: 1em;

  @include media-breakpoint-up(md) {
    margin-left: 1em;
  }
}

.commentDates {
  flex: 1;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
  font-size: 1.2rem;
  margin: 0 1em 4px 0;
  color: rgb(0 0 0 / 30%);

  @include font-size(1.2rem);

  .date {
    .icon {
      line-height: 1;
      width: 1rem;
      display: inline-block;
      opacity: 0.6;
      margin-right: 0.5rem;
      vertical-align: middle;
    }
  }
}

.commentDetails {
  padding: 1rem 0.2rem 0;
  margin-bottom: 1.2rem;

  @include media-breakpoint-up(md) {
    align-items: center;
    display: flex;
  }
}

.compactUserpic {
  height: 28px;
  width: 28px;
  min-width: 28px;
  display: inline-block;
  vertical-align: bottom;
}
