.product-comments-rating-root .comments-block__title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.product-comments-rating-root .comments-block__title .comments-count {
  vertical-align: top;
  margin-left: 0;
  font-size: var(--text-h4);
  line-height: 2rem;
  display: inline-block;
  color: #2d2d2d;
  font-weight: 400;
}

#mg-product-comments-rating {
  font-size: var(--text-md);
}

#mg-product-comments-rating .vote {
  cursor: pointer;
  display: block;
  margin-bottom: 0.5rem;
}

#mg-product-comments-rating .vote input[type="range"],
#mg-product-comments-rating input.backing5,
#mg-product-comments-rating input.backing5-edit {
  display: none !important;
  visibility: hidden;
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

#mg-product-comments-rating form {
  position: relative;
}

#mg-product-comments-rating form.add_new_comment_form {
  margin: 0 0 1.5rem;
  overflow: hidden;
}

#mg-product-comments-rating form.add_new_answer {
  margin-top: 1rem;
}

#mg-product-comments-rating form div.close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

#mg-product-comments-rating form div.close::before,
#mg-product-comments-rating form div.close::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
  background: #8f8f8f;
}

#mg-product-comments-rating form div.close::before {
  transform: rotate(45deg);
}

#mg-product-comments-rating form div.close::after {
  transform: rotate(-45deg);
}

#mg-product-comments-rating .add_new_comment_form .textarea-wrapper .close {
  display: none;
}

#mg-product-comments-rating .textarea-wrapper {
  position: relative;
}

#mg-product-comments-rating form textarea.new-comment,
#edit-comment-form textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  font-size: 15px;
  line-height: 20px;
  padding: 10px;
  display: block;
  overflow: hidden;
  margin: 0 0 8px;
  box-sizing: border-box;
  border: 1px solid #c0c0c0;
  border-radius: 0;
  box-shadow: none;
  outline: none;
}

#mg-product-comments-rating form button {
  border: none;
  display: inline-block;
  cursor: pointer;
  margin: 15px 0 0;
  float: right;
}

#mg-product-comments-rating ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#mg-product-comments-rating ul ul {
  margin-left: 20px;
}

#mg-product-comments-rating ul li div,
#mg-product-comments-rating ul li span,
#mg-product-comments-rating ul li a {
  font-size: 16px;
  line-height: 1.4;
}

#mg-product-comments-rating ul li a {
  color: #000;
  margin: 0 0 0 10px;
}

#mg-product-comments-rating ul li a:hover {
  text-decoration: underline;
}

#mg-product-comments-rating ul li a.delete {
  color: #ff7167;
}

#mg-product-comments-rating ul li a.approve {
  color: #4caf50;
}

#mg-product-comments-rating ul li .top-line {
  margin-bottom: 5px;
}

#mg-product-comments-rating ul li .answer {
  float: right;
  color: #000;
}

#mg-product-comments-rating ul li span.author {
  color: var(--color-text);
  font-size: var(--text);
  font-weight: 700;
}

#mg-product-comments-rating ul li span.date {
  display: inline-block;
  font-size: 11px;
  line-height: 11px;
  font-style: italic;
  color: #8e8e8e;
  margin: 3px 0 0 5px;
}

#mg-product-comments-rating ul li:not(.info) {
  padding: 15px 0 0;
  background: none;
  margin: 0;
  border-top: 1px solid #eee;
}

#mg-product-comments-rating .comment-info {
  overflow: hidden;
  padding: 0 0 10px;
}

#mg-product-comments-rating div.bottom-line {
  margin-top: 5px;
  float: none !important;
}

#mg-product-comments-rating ul li span.answer a {
  text-decoration: none;
  padding: 3px 17px;
  border: 1px solid #eaeaea;
  border-radius: 2px;
  text-transform: capitalize;
  font-weight: 400;
  margin-top: 10px;
  transition: 0.3s;
}

#mg-product-comments-rating ul li span.answer a:hover {
  border-color: #b9b9b9;
  color: #000;
}

#mg-product-comments-rating ul li span.action {
  display: inline-block;
  float: right;
}

.treelike-showImgComments,
#mg-product-comments-rating ul li .treelike-showImgComments {
  margin-top: 10px;
  display: inline-block;
  color: #1585cf;
  border-bottom: 1px dashed #1585cf;
  font-size: 14px;
  font-weight: 400;
}

.treelike-showImgComments:hover,
#mg-product-comments-rating ul li .treelike-showImgComments:hover {
  text-decoration: none;
  border-color: transparent;
}

.mg-product-comments-rating-dropZone,
#mg-product-comments-rating ul li .mg-product-comments-rating-dropZone {
  display: inline-block;
  width: min(100%, 600px);
  height: 100px;
  border: 2px dashed rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  text-align: center;
  line-height: 100px;
  font-size: 20px;
  color: rgba(0, 0, 0, 0.3);
  position: relative;
  margin-top: 10px;
}

#mg-product-comments-rating ul li .mg-product-comments-rating-dropZone span {
  text-align: center;
  line-height: 100px;
  font-size: 20px;
  font-weight: 400;
}

.mg-product-comments-rating-dropZone input {
  width: 100%;
  height: 100%;
  vertical-align: top;
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

#mg-product-comments-rating-ajax-body .commentImage img {
  border-radius: 5px;
  height: auto;
  margin: 5px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #ccc;
  max-width: 100%;
  object-fit: contain;
}

#mg-product-comments-rating .mg-product-comments-rating_img {
  border-radius: 5px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #ccc;
  display: flex;
  align-content: center;
  margin-right: 15px;
  margin-top: 15px;
  justify-content: center;
}

#mg-product-comments-rating .mg-product-comments-rating_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mg-product-comments-rating .mg-product-comments-rating_preview {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
}

.success,
.comment-need-auth,
.comment-need-purchase {
  background: #ecffed;
  width: 100%;
  display: block;
  padding: 20px;
  border: 1px solid #b9e7bc;
  color: #4caf50;
}

#for-button-all-load {
  text-align: center;
}

#load-all-comments {
  cursor: pointer;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 7px 15px;
  display: inline-block;
}

.mg-product-comments-rating-paginator {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.mg-product-comments-rating-paginator .current .linkPage {
  font-weight: 700;
}

#mg-product-comments-rating .checkCapcha {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

#mg-product-comments-rating .checkCapcha .captcha {
  display: block;
  width: 240px;
  background: #f7f8fb;
  border: 1px solid var(--border-color);
  font: 400 1.6rem/2.4rem "Roboto", Arial, Helvetica, sans-serif;
  padding: 1rem 1.6rem;
  color: var(--main-text-color);
  appearance: none;
  margin: 0 0 2rem;
  box-shadow: none;
  border-radius: 5px;
  height: 4.6rem;
}

#mg-product-comments-rating .checkCapcha img {
  margin-bottom: 1rem;
}

.edit-comment-modal-overlay,
.pcr-admin-modal-overlay,
.comment-image-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: none;
}

#edit-comment-modal,
#pcr-admin-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 720px);
  background: #fff;
  border-radius: 12px;
  z-index: 1001;
}

.edit-comment-modal-content,
#pcr-admin-modal {
  padding: 1.5rem;
}

.edit-comment-modal-header,
.edit-comment-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edit-comment-modal-close,
.pcr-admin-modal-close {
  cursor: pointer;
}

#comment-image-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

#comment-image-modal .comment-image-modal-overlay {
  display: block;
}

.comment-image-modal-content {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  max-width: min(92vw, 960px);
  max-height: 88vh;
  z-index: 1101;
}

.comment-image-modal-content img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.comment-image-modal-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.comment-image-modal-close::before,
.comment-image-modal-close::after {
  content: '';
  position: absolute;
  top: 17px;
  left: 9px;
  width: 18px;
  height: 2px;
  background: #111;
}

.comment-image-modal-close::before {
  transform: rotate(45deg);
}

.comment-image-modal-close::after {
  transform: rotate(-45deg);
}

.inline-rating__meta {
  margin-left: 0.6rem;
}

.last-comments__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.last-comments__item {
  background: var(--color-bg, #fff);
  border-radius: 10px;
  padding: 2rem;
}

.last-comment__footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #ececec;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.last-comment__avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(90deg, #02aab0 0%, #00cdac 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
