/**
 * Esup-Pod comments styles
 */

:root {
  /* --content-primary-color: rgb(6 14 29 / 75%); */
  --primary-background-color: #f8f9fa;
  --third-background-color: rgb(255 255 255);
  --content-secondary-color: rgb(54 56 58 / 65%);
  --content-third-color: #696969;
  --padding-comment-content: 25px;
  --margin-between-comment: 1em;
  --voted-color: rgb(249 165 6);
}

[data-theme="dark"] {
  --content-third-color: #b6b4b4;
}

.comment_disable {
  text-align: center;
  padding: 0.4em 0.8em;
  color: #386066;
  background: #afe0e8;
  margin-top: 0.8em;
  display: flex;
  justify-content: center;
  align-items: center;
}

.comment_label,
.comment_main h3 {
  font-weight: 600;
  font-size: 16px;
}

.comment_main .icon {
  width: 18px;
}

.reply_to {
  letter-spacing: 1.1px;
  color: var(--content-third-color);
  margin-bottom: 0.8em;
  margin-left: 0.8em;
}

.reply_to svg {
  width: 16px;
}

.reply_author {
  font-weight: 600;
}

.comment_main .icon.comments_icon {
  width: var(--padding-comment-content);
  margin-right: 3px;
}

.comment_main .inline_flex_space {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.comment_main .comment_disable::before {
  content: "";
  display: block;
  height: 1px;
  background-color: var(--pod-background);
  width: 100%;
  margin-bottom: 2em;
}

.comment_main .comment_disable {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-weight: 400;
  color: var(--pod-primary);
  padding-top: 2em;
}

.comment_main {
  margin-top: 1em;
  overflow-y: auto;
  border: 1px solid var(--color-alto);
}

.comment_main .comment_container {
  width: 100%;
}

/* Confirm Modal */
.comment_main .confirm_delete {
  display: none;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  z-index: 99;
  position: fixed;
  inset: 0;
  min-height: 100vh;
  background-color: rgb(54 56 58 / 50%);
}

.comment_main .confirm_delete.show {
  display: flex;
}

/* End Confirm Modal */

.comment_content {
  padding: 1em;
}

.comment_main .add_comment {
  width: 100%;
  position: relative;
}

.comment_main .form-wrapper {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.comment_main .comment {
  position: relative;
  display: flex;
  padding-bottom: var(--margin-between-comment);
}

.comment_element .comment_container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  width: calc(100% - 37px);
}

.comment_main .comment .comment_content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid var(--pod-primary);
  padding: 0.4em;
  box-shadow: 2px 2px 12px #e6e2e2;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  background-color: var(--pod-background-neutre2-bloc);
}

.comment_main
  .comment_element
  .comment_container
  > .comments_children_container {
  height: 0;
  overflow: hidden;
  transition: 0.5s height;
}

.comment_main
  .comment_element.show
  .comment_container
  > .comments_children_container {
  height: auto;
}

.comment_main
  .comment_element
  .comment_container
  .comment_element
  > .comment_child_container {
  display: flex;
  margin-top: calc(var(--margin-between-comment) - 0.2em);
  padding-right: 0.8em;
}

.comment_main .comment_element > .comment.onDelete,
.comment_main
  .comment_element
  .comment_container
  .comment_element
  > .comment_child_container.onDelete {
  animation-name: deletecomment;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

.comment_main
  .comment_element
  .comment_container
  .comment_element
  > .comment_child_container
  .comments_icon {
  margin-left: 0;
  flex: none;
  align-self: center;
}

.comment_main .comment .comment_content_child {
  border-radius: 5px;
  border-top: 1px solid var(--primary-background-color);
  border-right: 1px solid var(--primary-background-color);
  border-bottom: 1px solid var(--primary-background-color);
  border-left: 4px solid var(--content-secondary-color);
  flex-grow: 1;

  /* width reduced by "re" svg width */
  max-width: calc(100% - 21px);
}

.comment_main .comment .comment_content_header .comment_since {
  color: var(--content-third-color);
  font-size: 14px;
}

.comment_main .comment .comment_content_body {
  margin: 0 0 2em;
  word-break: break-all;
  font-size: 14px;
}

.comment_main .comment .comment_content_body a {
  display: block;
  width: 500px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.8em;
}

.comment_main .comment .comment_content_body .comment_text {
  font-weight: 500;
}

.comment_main .comment .comment_content_footer {
  display: flex;
  flex-flow: column wrap;
  color: var(--content-secondary-color);
}

.comment_main .comment .comment_content_footer > * {
  display: flex;
  align-items: center;
  font-size: 13px;
}

.comment_main .comment .comment_content_footer > * .icon {
  margin-right: 4px;
}

.comment_main .actions.inline_flex_space {
  justify-content: space-around;
}

.comment_main .comment .comment_content_footer .comment_actions {
  display: flex;
  color: var(--pod-font-color);
}

.comment_main .comment .comment_content_footer .comment_actions:hover {
  color: var(--pod-primary);
}

.comment_main
  .comment
  .comment_content_footer
  .comment_actions.voting
  .comment_vote_icon {
  display: none;
}

.comment_main .comment_vote_action.voted .unvoted,
.comment_main .comment_vote_action .voted,
.comment_main .comment_element .comment-hide,
.comment_main .comment_element.show .comment-show {
  display: none;
}

.comment_main .comment_vote_action .unvoted,
.comment_main .comment_vote_action.voted .voted,
.comment_main .comment_element.show .comment-hide,
.comment_main .comment_element .comment-show {
  display: inline-block;
}

.comment_main .comment_vote_action.voted:hover .voted,
.comment_main .comment_vote_action.voted .voted {
  color: var(--voted-color);
}

.comment_main .comment_element .comment_content_footer .form {
  height: 0;
  overflow: hidden;
  transition: 0.5s height;
}

.comment_main .comment_element .comment_content_footer .form.show {
  height: 60px;
}

.comment_main .comment .comment_content_footer .add_comment {
  margin: 0.8em 0.2em 0;
}

.comment_main .add_comment .new_comment {
  resize: none;
  padding-right: 3em;
}

.comment_main .send_reply {
  width: 1.5em;
  position: absolute;
  right: 1rem;
  top: 0;
  height: 100%;
  padding: 0;
}

.comment_main .send_reply i {
  width: 100%;
  height: 100%;
}

@media only screen and (max-width: 650px) {
  .comment_main .comment_actions:not(.comment_vote_action) span {
    display: none;
  }
}

/* ***** on scroll to comment background */
.scroll_to {
  animation-name: scrolltocomment;
  animation-duration: 5s;
  animation-fill-mode: forwards;
}

@keyframes scrolltocomment {
  0% {
    background-color: #f9f99b;

    /* rgb(255 234 59) */
  }

  100% {
    background-color: var(--third-background-color);
  }
}

/* ******* on delete comment ******* */
@keyframes deletecomment {
  0% {
    position: relative;
    box-shadow: 0 0 8px 8px rgb(255 0 0 / 30%) !important;
    z-index: 9999;
    transform: translateX(0);
  }

  100% {
    transform: translateX(110%);
  }
}
