.comment-thread {
  margin-top: 1rem;
}

.comment-thread__list {
  display: grid;
  gap: 0.75rem;
}

.comment-thread__item {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}

.comment-thread__item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.35rem;
}

.comment-thread__item-actions summary,
.comment-thread__item-actions .cast-inline-action-form button {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

/* Overrides catalog.css's global `details > summary` spacing (sized for
   a section-heading disclosure, not a compact inline "Reply" toggle),
   and forces the reply form onto its own line once opened, rather than
   squeezing it into the actions row alongside Delete. */
.comment-thread__item-actions summary {
  margin: 0;
}

.comment-thread__item-actions details[open] {
  flex-basis: 100%;
}

.comment-thread__item-actions details[open] summary {
  margin-bottom: 0.5rem;
}

/* One nested reply level's worth of indentation, repeating naturally as
   shared/_comment.html.erb recurses — a left border rather than a full
   card background keeps a deep thread from getting visually noisy. */
.comment-thread__replies {
  margin: 0.75rem 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 0.75rem;
}
