.comments-section {
  padding: 17px 18px 24px;
  margin-bottom: 0;
  box-shadow: 0 24px 58px rgba(31, 45, 70, 0.075), 0 3px 10px rgba(31, 45, 70, 0.035);
}

.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.comments-head select {
  min-width: 176px;
  height: 42px;
  padding: 0 40px 0 14px;
  color: #526074;
  line-height: 40px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(31, 45, 70, 0.035);
}

.comments-head select:hover {
  border-color: #ced9e6;
}

.comments-head select:focus-visible {
  border-color: #a9c4e9;
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.12);
}

.comment-form {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.comment-fields {
  display: grid;
  gap: 10px;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-fields-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.comment-submit {
  justify-self: start;
  min-height: 38px;
  padding: 0 18px;
  color: #fff;
  background: var(--green-dark);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

.comment-form-status {
  color: #5f6e82;
  font-size: 13px;
  font-weight: 700;
}

.comment-reply-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #314155;
  font-size: 13px;
  font-weight: 700;
}

.comment-reply-state[hidden] {
  display: none !important;
}

.comment-reply-state button {
  padding: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 700;
}

.avatar {
  display: block;
  width: 42px;
  height: 42px;
  font-size: 42px;
  border-radius: 50%;
  background: #edf2ff;
}

.avatar-empty {
  position: relative;
  background: #eef3ff;
}

.avatar-empty::before,
.avatar-empty::after {
  content: "";
  position: absolute;
  left: 50%;
  background: #a8b6f4;
  border-radius: 999px;
  transform: translateX(-50%);
}

.avatar-empty::before {
  top: 9px;
  width: 14px;
  height: 14px;
  font-size: 14px;
}

.avatar-empty::after {
  bottom: 8px;
  width: 26px;
  height: 13px;
}

.avatar-1 {
  background: linear-gradient(135deg, #e8bf85, #182536 58%, #66a7c7);
}

.avatar-2 {
  background: linear-gradient(135deg, #0f172a, #11543a 54%, #d6e7d0);
}

.avatar-3 {
  background: linear-gradient(135deg, #50321d, #101828 52%, #f28543);
}

.comment-form textarea,
.comment-form input {
  width: 100%;
  color: var(--text);
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 9px;
  outline: none;
  font-size: 14px;
  line-height: 1.35;
}

.comment-form textarea {
  min-height: 50px;
  max-height: 140px;
  padding: 15px 18px;
  resize: vertical;
}

.comment-form input {
  height: 42px;
  padding: 0 14px;
}

.comment-form textarea:focus,
.comment-form input:focus {
  border-color: rgba(55, 124, 246, 0.45);
  box-shadow: 0 0 0 4px rgba(55, 124, 246, 0.09);
}

.comment-list {
  display: grid;
}

.comment-thread.is-hidden-thread {
  display: none;
}

.comment {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px 0 15px;
  border-top: 1px solid #ecf1f7;
}

.comment > div {
  min-width: 0;
}

.comment header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  min-width: 0;
}

.comment header b {
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment header time {
  color: #8b97aa;
  font-size: 13px;
  font-weight: 700;
}

.comment header span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  color: #0f9e49;
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.comment p {
  margin-top: 4px;
  color: #233249;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment-children {
  display: grid;
  gap: 0;
  margin-top: 10px;
  margin-left: 18px;
  padding-left: 16px;
  border-left: 2px solid #ecf1f7;
}

.comment footer {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 8px;
  color: #5f6e82;
  font-size: 13px;
  font-weight: 700;
}

.comment footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.comment footer button,
.comment footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5b6b82;
  background: transparent;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment footer button:hover,
.comment footer a:hover {
  color: var(--blue);
}

.comment-like.is-liked,
.comment-like.is-liked .icon {
  color: var(--green);
}

.comment-like:disabled {
  cursor: default;
}

.comment-like:disabled:hover,
.comment-like:disabled:hover .icon {
  color: var(--green);
}

.comments-section.is-expanded .comment-thread.is-hidden-thread {
  display: block;
}

@media (max-width: 560px) {
  .comment-fields-row {
    grid-template-columns: 1fr;
  }

  .comment-form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-children {
    margin-left: 8px;
    padding-left: 10px;
  }
}

.comments-empty {
  margin: 0;
  padding: 10px 0 2px;
  color: #5f6e82;
  font-size: 14px;
  font-weight: 600;
}

.more-comments {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 314px;
  min-height: 46px;
  margin: 10px auto 0;
  padding: 0 24px;
  color: #26364d;
  background: #f2f5fb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

.more-comments .icon {
  width: 14px;
  height: 14px;
  font-size: 14px;
}

.more-comments:hover {
  background: #e9eef7;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .comments-section {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .comments-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .comments-head select {
    width: 100%;
  }

  .comment-form {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
  }

  .comment {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .more-comments {
    min-width: 0;
    width: 100%;
  }
}
