/* ── Comments (activity detail) ── */

.comments-section {
  margin: 16px 16px 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.comments-heading {
  font-size: 0.9rem;
  margin: 0 0 10px;
  color: var(--text-muted);
}

.comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 8px 10px;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.comment-author {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* A follower's comment submitted but not yet republished by the owner. The
   "pending" cue is not typography-only: the badge carries text + an aria-label
   (see docs/invariants/accessibility.md). The italic + muted card is the
   visual reinforcement, not the sole signal. */
.comment-pending {
  opacity: 0.7;
}

.comment-pending .comment-text {
  font-style: italic;
}

.comment-pending-badge {
  font-size: 0.7rem;
  font-style: italic;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 6px;
  line-height: 1.4;
}

/* The owner's Remove control, one per row on her own activity's detail
   (specs/social.allium, OwnerRemovesComment). Pushed to the end of the meta
   line so the author and the date keep their places whether or not the row is
   moderatable. Text, not an icon: the act is destructive and has no undo, and
   the confirm step re-labels this same button. */
.comment-remove {
  margin-left: auto;
  flex: none;
  padding: 0 6px;
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.4;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
}

.comment-remove:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.comment-remove.danger {
  color: var(--danger);
  border-color: var(--danger);
}

/* Block, on a comment's author (specs/social.allium, UserBlocks). Shaped like
   the Remove beside it rather than like the People-screen control it shares a
   class with: this is a meta line, not a row of buttons.

   It takes the `margin-left: auto` when it is alone, which is the followed
   view — there is no Remove there, the conversation being read-only. Where
   Remove is present it has already taken the auto margin, so this one sits
   next to it instead of splitting the free space with it. */
.comment-meta .social-btn.block {
  margin-left: auto;
  flex: none;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.comment-meta .comment-remove + .social-btn.block {
  margin-left: 6px;
}

.comment-meta .social-btn.block:hover {
  background: none;
  color: var(--danger);
  border-color: var(--danger);
}

.comment-meta .social-btn.block.danger {
  background: none;
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: none;
}

.comment-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  color: var(--text);
}

.comments-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* In place of the composer when the owner's conversation is full (#1468). */
.comments-full {
  margin-top: 12px;
}

/* Owner comment input. */

.comment-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-form-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-input {
  display: block;
  width: 100%;
  min-height: 56px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.4;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  resize: vertical;
  box-sizing: border-box;
  background: var(--surface);
  color: var(--text);
}

.comment-input:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-submit {
  align-self: flex-end;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.comment-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Kudos (src/kudos.rs, docs/kudos.md) ── */

.kudos-row {
  margin: 12px 16px 0;
  display: flex;
  align-items: center;
}

.card-kudos {
  margin: 0;
  padding: 0 12px 8px;
}

/* A row's and a postcard's grids name their areas (styles/feed.css); the
   kudos row has none, so it spans the card below them rather than falling
   into the narrow media column. A row card carries its own padding. */
.activity-card.weight-row .card-kudos,
.activity-card.weight-postcard .card-kudos {
  grid-column: 1 / -1;
}

.activity-card.weight-row .card-kudos {
  padding: 0;
}

.kudos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
}

.kudos-button {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: var(--surface);
  cursor: pointer;
}

.kudos-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.kudos-button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Pressed is said by aria-pressed and the filled colours together, never by
   colour alone: the button's accessible name changes too. */
.kudos-button.kudos-given {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.kudos-button.kudos-given .kudos-glyph {
  fill: var(--brand-soft);
}

/* Still on its way to the owner: dimmed, as a pending comment is. */
.kudos-button.kudos-pending {
  opacity: 0.7;
}

.kudos-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.kudos-givers {
  margin: 16px 16px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.kudos-givers-names {
  color: var(--text);
}

/* The pending note beside the button: the press is on its way to the owner.
   Text, not only a fade, so it reads in every mode. */
.kudos-pending-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-inline-start: 0.375rem;
}

.kudos-button:disabled {
  cursor: default;
  opacity: 0.6;
}

.kudos-control {
  display: inline-flex;
  align-items: center;
}
