.ht-single-comments {
  margin-top: 16px;
}

.ht-single-comments .ht-sec-head {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ht-single-comments .ht-sec-head__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0 8px;
  height: 22px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
}

#comments {
  margin: 0;
  padding: 0;
  border: 0;
}

.comments-area {
  margin: 0;
}

.comments-area .comment-list,
.comments-area .comment-list .children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comments-area .comment-list > li,
.comments-area .comment-list .children > li {
  list-style: none;
  margin: 0;
}

.comments-area .comment-list li::marker,
.comments-area .comment-list .children li::marker {
  content: "";
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ht-li-wrap {
  list-style: none;
}

.ht-comment {
  position: relative;
}

.ht-comment .children {
  margin-top: 20px;
  padding-inline-start: 16px;
  border-inline-start: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ht-comment-box {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 10px 12px 12px 12px;
  background: var(--bg);
  margin-top: 6px;
}

html[data-theme="dark"] .ht-comment-box {
  background: var(--surface);
}

.ht-comment-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: calc(var(--radius) - 4px);
  background: var(--brand-100);
  border: 1px solid color-mix(in oklab, var(--brand-600), transparent 45%);
}

html[data-theme="dark"] .ht-comment-header {
  background: var(--surface-2);
  border-color: color-mix(in oklab, var(--brand-300), transparent 30%);
}

.ht-comment-author {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}

.ht-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.ht-comment-author-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ht-comment-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.ht-comment--reply .ht-comment-author-name {
  color: var(--brand-700);
}

html[data-theme="dark"] .ht-comment--reply .ht-comment-author-name {
  color: var(--brand-300);
}

.ht-comment-parent-label {
  font-size: 11px;
  color: var(--muted);
}

.ht-comment-date {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--fg);
}

.ht-comment-date-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.ht-comment-date-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.ht-comment-date-text {
  white-space: nowrap;
}

.ht-comment-pending {
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, #f97316, transparent 45%);
  background: color-mix(in oklab, #fed7aa, transparent 40%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9a3412;
}

html[data-theme="dark"] .ht-comment-pending {
  background: color-mix(in oklab, var(--surface-2), #f97316 16%);
  border-color: color-mix(in oklab, #f97316, transparent 20%);
  color: #fed7aa;
}

.ht-comment-pending-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.ht-comment-pending-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.ht-comment-content {
  font-size: 14px;
  color: var(--fg);
  padding: 8px 2px 0 2px;
}

.ht-comment-content p {
  margin: 0 0 6px;
}

.ht-comment-content p:last-child {
  margin-bottom: 0;
}

.ht-comment-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ht-comment-footer a {
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-700);
  padding: 2px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--brand-700), transparent 40%);
  background: transparent;
  text-decoration: none;
}

.ht-comment-footer a:hover {
  background: var(--brand-100);
  color: var(--brand-800);
}

html[data-theme="dark"] .ht-comment-footer a {
  color: var(--brand-300);
  border-color: color-mix(in oklab, var(--brand-300), transparent 40%);
}

html[data-theme="dark"] .ht-comment-footer a:hover {
  background: color-mix(in oklab, var(--surface-2), var(--brand-300) 20%);
  color: var(--fg);
}

.ht-comment-footer-votes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ht-vote {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .12s ease;
}

.ht-vote-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.ht-vote-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ht-vote--like {
  border-color: color-mix(in oklab, var(--brand-600), transparent 55%);
}

.ht-vote--dislike {
  border-color: color-mix(in oklab, #ef4444, transparent 55%);
}

.ht-vote:hover {
  transform: translateY(-1px);
}

.ht-vote--like:hover {
  background: color-mix(in oklab, var(--surface), var(--brand-100) 30%);
  border-color: var(--brand-500);
  color: var(--fg);
}

.ht-vote--dislike:hover {
  background: color-mix(in oklab, var(--surface), #fee2e2 30%);
  border-color: #ef4444;
  color: var(--fg);
}

.ht-vote.is-active.ht-vote--like {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.ht-vote.is-active.ht-vote--dislike {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

html[data-theme="dark"] .ht-vote {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--fg-muted);
}

html[data-theme="dark"] .ht-vote--like:hover {
  background: color-mix(in oklab, var(--surface-2), var(--brand-400) 30%);
  border-color: var(--brand-300);
  color: var(--fg);
}

html[data-theme="dark"] .ht-vote--dislike:hover {
  background: color-mix(in oklab, var(--surface-2), #b91c1c 30%);
  border-color: #f97373;
  color: var(--fg);
}

html[data-theme="dark"] .ht-vote.is-active.ht-vote--like {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #ffffff;
}

html[data-theme="dark"] .ht-vote.is-active.ht-vote--dislike {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

@media (max-width: 600px) {
  .ht-comment-box {
    padding: 10px;
  }

  .ht-comment-header {
    flex-direction: row;
    align-items: center;
  }

  .ht-comment-date {
    margin-top: 0;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .ht-comment-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.comment-respond {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.comment-reply-title {
  display: inline-flex;
  align-items: center;
  font-size: var(--h4);
  margin: 0 0 10px;
}

.comment-notes {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--fg);
  margin: 0 0 6px;
}

.comment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 4px;
}

.comment-form p {
  margin: 0;
}

.comment-form-author,
.comment-form-email {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-form-comment {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-form-cookies-consent {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.comment-form label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  padding: 6px 8px;
  outline: none;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
  border-color: var(--brand-400);
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.form-submit .submit {
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font: inherit;
  font-weight: 600;
  background: var(--brand-700);
  color: #ffffff;
  cursor: pointer;
}

.form-submit .submit:hover {
  background: var(--brand-800);
  color: #ffffff;
}

html[data-theme="dark"] .form-submit .submit {
  background: var(--brand-600);
  color: #ffffff;
}

html[data-theme="dark"] .form-submit .submit:hover {
  background: var(--brand-500);
  color: #ffffff;
}

.comments-area .comment-navigation {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.comments-area .comment-navigation .nav-links {
  display: inline-flex;
  gap: 6px;
}

.comments-area .comment-navigation .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
}

.comments-area .comment-navigation .page-numbers.current {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #ffffff;
}

.comments-area .comment-navigation .page-numbers:hover:not(.current) {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #ffffff;
}

html[data-theme="dark"] .comments-area .comment-navigation .page-numbers {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--fg);
}

html[data-theme="dark"] .comments-area .comment-navigation .page-numbers.current {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

html[data-theme="dark"] .comments-area .comment-navigation .page-numbers:hover:not(.current) {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #ffffff;
}

.ht-cmt-toast-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(15,23,42,.35);
  z-index: 9999;
}

.ht-cmt-toast {
  max-width: 480px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-md);
}

.ht-cmt-toast[data-type="warn"] {
  border-color: color-mix(in oklab, #f97316, transparent 50%);
}

.ht-cmt-toast[data-type="info"] {
  border-color: color-mix(in oklab, var(--brand-600), transparent 55%);
}

.ht-cmt-toast p {
  margin: 0;
  flex: 1 1 auto;
}

.ht-cmt-toast-close {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--fg-muted);
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.ht-cmt-toast-close:hover {
  color: var(--fg);
}
