/* Compact + responsive comment card layout */

body.single-tm_movie #commentsPost li.tm-comment-card,
body.single-tm_series #commentsPost li.tm-comment-card {
  background: rgba(255, 255, 255, 0.025) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  margin: 0 !important;
  overflow: visible !important;
  width: 100% !important;
}

body.single-tm_movie #commentsPost li.tm-comment-card:hover,
body.single-tm_series #commentsPost li.tm-comment-card:hover {
  border-color: rgba(245, 173, 17, 0.28) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14) !important;
}

body.single-tm_movie #commentsPost li.tm-comment-card .inner_item_comment_list,
body.single-tm_series #commentsPost li.tm-comment-card .inner_item_comment_list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  grid-template-columns: none !important;
  padding: clamp(10px, 2vw, 14px) clamp(12px, 2.5vw, 16px) !important;
  width: 100% !important;
}

body.single-tm_movie #commentsPost .head_comment_list,
body.single-tm_series #commentsPost .head_comment_list {
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  justify-content: flex-start !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  width: 100% !important;
}

body.single-tm_movie #commentsPost .avatar_comment_holder img,
body.single-tm_series #commentsPost .avatar_comment_holder img {
  border: 1.5px solid rgba(245, 173, 17, 0.25) !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  display: block;
  height: clamp(32px, 5vw, 38px) !important;
  object-fit: cover !important;
  width: clamp(32px, 5vw, 38px) !important;
}

body.single-tm_movie #commentsPost .comment_meta,
body.single-tm_series #commentsPost .comment_meta {
  align-items: flex-start;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body.single-tm_movie #commentsPost .name_comment,
body.single-tm_series #commentsPost .name_comment {
  color: #fff !important;
  font-size: clamp(0.86rem, 2.2vw, 0.92rem) !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}

body.single-tm_movie #commentsPost .date_comment,
body.single-tm_series #commentsPost .date_comment {
  align-items: center;
  color: rgba(255, 255, 255, 0.42) !important;
  display: inline-flex;
  font-size: clamp(0.72rem, 1.8vw, 0.76rem) !important;
  gap: 4px;
  line-height: 1.3;
}

/* Align text/actions with avatar column on wide screens */
body.single-tm_movie #commentsPost .content_comment_list,
body.single-tm_series #commentsPost .content_comment_list {
  background: transparent !important;
  border: none !important;
  margin: 0 0 10px !important;
  padding: 0 clamp(0px, 2vw, 48px) 0 0 !important;
  position: relative;
  width: 100% !important;
}

body.single-tm_movie #commentsPost .text_comment,
body.single-tm_series #commentsPost .text_comment {
  color: rgba(255, 255, 255, 0.82) !important;
  display: block !important;
  font-size: clamp(0.86rem, 2.1vw, 0.9rem) !important;
  line-height: 1.72 !important;
  margin: 0 !important;
  text-align: right;
  white-space: pre-wrap;
  word-break: break-word;
  width: 100% !important;
}

body.single-tm_movie #commentsPost .text_comment p,
body.single-tm_series #commentsPost .text_comment p {
  margin: 0 0 0.5em !important;
}

body.single-tm_movie #commentsPost .comment_actions,
body.single-tm_series #commentsPost .comment_actions {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: flex-start;
  margin: 0;
  padding: 10px clamp(0px, 2vw, 48px) 0 0;
  width: 100%;
}

body.single-tm_movie #commentsPost .comment_rating,
body.single-tm_series #commentsPost .comment_rating {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

body.single-tm_movie #commentsPost .rating_item,
body.single-tm_series #commentsPost .rating_item {
  align-items: center;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 999px !important;
  display: inline-flex;
  gap: 5px;
  min-height: 28px;
  padding: 4px 10px !important;
}

body.single-tm_movie #commentsPost .rating_item .icon,
body.single-tm_series #commentsPost .rating_item .icon {
  height: 14px;
  width: 14px;
}

body.single-tm_movie #commentsPost .rating_item .count,
body.single-tm_series #commentsPost .rating_item .count {
  font-size: 0.76rem !important;
}

body.single-tm_movie #commentsPost .btn_reply_cm,
body.single-tm_series #commentsPost .btn_reply_cm {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(245, 173, 17, 0.32);
  border-radius: 999px;
  color: #f5ad11;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 5px;
  margin-right: auto;
  min-height: 28px;
  padding: 4px 12px;
}

body.single-tm_movie #commentsPost .tm-reply-form-holder,
body.single-tm_series #commentsPost .tm-reply-form-holder {
  margin-top: 10px;
  padding-right: clamp(0px, 2vw, 48px);
  width: 100%;
}

body.single-tm_movie #commentsPost .children,
body.single-tm_series #commentsPost .children {
  border-right: 2px solid rgba(245, 173, 17, 0.16);
  list-style: none;
  margin: 8px clamp(8px, 2vw, 16px) 0 0;
  padding: 0 clamp(8px, 2vw, 12px) 0 0;
}

body.single-tm_movie #commentsPost .children .content_comment_list,
body.single-tm_series #commentsPost .children .content_comment_list,
body.single-tm_movie #commentsPost .children .comment_actions,
body.single-tm_series #commentsPost .children .comment_actions,
body.single-tm_movie #commentsPost .children .tm-reply-form-holder,
body.single-tm_series #commentsPost .children .tm-reply-form-holder {
  padding-right: 0 !important;
}

body.single-tm_movie #commentsPost .load_more_cm_single,
body.single-tm_series #commentsPost .load_more_cm_single {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body.single-tm_movie #commentsPost .title_comment_list,
body.single-tm_series #commentsPost .title_comment_list {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

body.single-tm_movie #commentsPost .title_comment_list .title_site,
body.single-tm_series #commentsPost .title_comment_list .title_site {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem) !important;
}

body.single-tm_movie #commentsPost .sort_cm_single,
body.single-tm_series #commentsPost .sort_cm_single {
  background: rgba(0, 0, 0, 0.18) !important;
  border-radius: 10px !important;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 6px !important;
  scrollbar-width: none;
}

body.single-tm_movie #commentsPost .sort_cm_single::-webkit-scrollbar,
body.single-tm_series #commentsPost .sort_cm_single::-webkit-scrollbar {
  display: none;
}

body.single-tm_movie #commentsPost .item_sort,
body.single-tm_series #commentsPost .item_sort {
  flex-shrink: 0;
  font-size: 0.78rem !important;
  padding: 6px 11px !important;
  white-space: nowrap;
}

body.single-tm_movie #commentsPost .comments_list,
body.single-tm_series #commentsPost .comments_list {
  padding: clamp(12px, 2.5vw, 18px) !important;
}

/* Tablet */
@media (max-width: 992px) {
  body.single-tm_movie #commentsPost .content_comment_list,
  body.single-tm_series #commentsPost .content_comment_list,
  body.single-tm_movie #commentsPost .comment_actions,
  body.single-tm_series #commentsPost .comment_actions,
  body.single-tm_movie #commentsPost .tm-reply-form-holder,
  body.single-tm_series #commentsPost .tm-reply-form-holder {
    padding-right: clamp(0px, 1vw, 24px) !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  body.single-tm_movie #commentsPost .title_comment_list,
  body.single-tm_series #commentsPost .title_comment_list {
    align-items: stretch;
    flex-direction: column;
  }

  body.single-tm_movie #commentsPost .sort_cm_single,
  body.single-tm_series #commentsPost .sort_cm_single {
    width: 100%;
  }

  body.single-tm_movie #commentsPost .content_comment_list,
  body.single-tm_series #commentsPost .content_comment_list,
  body.single-tm_movie #commentsPost .comment_actions,
  body.single-tm_series #commentsPost .comment_actions,
  body.single-tm_movie #commentsPost .tm-reply-form-holder,
  body.single-tm_series #commentsPost .tm-reply-form-holder {
    padding-right: 0 !important;
  }

  body.single-tm_movie #commentsPost .comment_actions,
  body.single-tm_series #commentsPost .comment_actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  body.single-tm_movie #commentsPost .btn_reply_cm,
  body.single-tm_series #commentsPost .btn_reply_cm {
    margin-right: 0;
    width: auto;
  }

  body.single-tm_movie #commentsPost .children,
  body.single-tm_series #commentsPost .children {
    margin-right: 6px;
    padding-right: 8px;
  }
}

@media (max-width: 400px) {
  body.single-tm_movie #commentsPost .comment_actions,
  body.single-tm_series #commentsPost .comment_actions {
    gap: 6px;
  }

  body.single-tm_movie #commentsPost .btn_reply_cm,
  body.single-tm_series #commentsPost .btn_reply_cm {
    flex: 1 1 100%;
    justify-content: center;
  }
}
