.tip-forum {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(99, 102, 241, 0.13);
}

.tip-comments-title {
  margin: 0 0 14px;
  color: #5f59dd;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

.tip-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.tip-comment-form:not(.is-reply) { margin-top: 18px; }

.tip-comment-form textarea {
  min-height: 48px;
  max-height: 160px;
  padding: 13px 14px;
  resize: vertical;
  border: 1px solid rgba(17, 19, 29, 0.12);
  border-radius: 24px;
  color: #191c27;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
}

.tip-comment-form textarea:focus {
  border-color: rgba(91, 82, 232, 0.58);
  box-shadow: 0 0 0 4px rgba(91, 82, 232, 0.09);
}

.tip-comment-form button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #11131d;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.tip-comment-form button:disabled { opacity: 0.55; cursor: wait; }
.tip-comment-form button.is-secondary { color: #555967; background: #eef0f7; }
.tip-comment-form.is-reply { margin-top: 12px; grid-template-columns: 1fr; }
.tip-comment-form.is-reply > div { display: flex; justify-content: flex-end; gap: 8px; }

.tip-comments-empty {
  margin: 18px 0 0;
  color: #858997;
  font-size: 12px;
}
.tip-comments-empty.is-error { color: #a83e4a; }
.tip-comments-error { grid-column: 1 / -1; margin: 0; color: #b43d4c; font-size: 11px; }

.tip-comment-list { display: grid; gap: 4px; margin-top: 6px; }
.tip-comment-item { position: relative; padding: 14px 0 8px; }
.tip-comment-item + .tip-comment-item { border-top: 1px solid rgba(17, 19, 29, 0.055); }
.tip-comment-item.has-branch::before {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 12px;
  left: 18px;
  width: 1px;
  background: rgba(75, 81, 95, 0.18);
}
.tip-comment-node { position: relative; }
.tip-comment-content { margin-left: 46px; }
.tip-comment-content > p {
  margin: 8px 0 0;
  color: #4f5462;
  font-size: 14.5px;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tip-comment-author { display: flex; align-items: center; gap: 10px; }
.tip-comment-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #eef0ff;
}
.tip-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tip-comment-avatar.is-fallback {
  color: #ffffff;
  background: linear-gradient(135deg, #7770f6, #4d49d8);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.tip-comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.tip-comment-meta strong { color: #222531; font-size: 13px; }
.tip-comment-meta time { color: #979aa5; font-size: 11px; font-weight: 600; }
.forum-role {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  color: #5f59dd;
  background: rgba(105, 92, 246, 0.1);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.forum-role.is-local { color: #047857; background: rgba(16, 185, 129, 0.11); }
.forum-sample {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(105, 92, 246, 0.14);
  border-radius: 999px;
  color: #727684;
  background: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.035em;
  white-space: nowrap;
}
.tip-comment-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.tip-comment-actions button,
.tip-delete-reply {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: #625ce0;
  background: transparent;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.tip-replies { margin: 4px 0 0 46px; }
.tip-reply-item { position: relative; padding: 12px 0 8px; }
.tip-reply-item + .tip-reply-item { border-top: 1px solid rgba(17, 19, 29, 0.05); }
.tip-reply-item.has-branch::before {
  content: "";
  position: absolute;
  top: 43px;
  bottom: 8px;
  left: 15px;
  width: 1px;
  background: rgba(75, 81, 95, 0.16);
}
.tip-reply-item .tip-comment-avatar { width: 32px; height: 32px; flex-basis: 32px; }
.tip-reply-item .tip-comment-content { margin-left: 42px; }
.tip-reply-children { margin: 4px 0 0 42px; }
.tip-reply-children .tip-reply-children { margin-left: 28px; }
.tip-replies .tip-comment-form.is-reply { margin-left: 40px; }

@media (max-width: 640px) {
  .tip-forum { margin-top: 22px; padding-top: 18px; }
  .tip-comment-form { grid-template-columns: 1fr; }
  .tip-comment-form > button { justify-self: end; }
  .tip-comment-content { margin-left: 42px; }
  .tip-replies { margin-left: 30px; }
  .tip-reply-children,
  .tip-reply-children .tip-reply-children { margin-left: 22px; }
  .tip-replies .tip-comment-form.is-reply { margin-left: 32px; }
}
