/* feed.css — slice of the former style.css (see also: sibling css/ files) */
/* Compact activity list — still used by club "Recent activity" + trade detail. */
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item {
  display: flex;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-side {
  flex: 0 0 56px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 4px 0;
  text-align: center;
  border-radius: 6px;
  align-self: flex-start;
  background: var(--panel-2);
}
.feed-side.side-buy { background: rgba(63,185,80,0.15); color: var(--pos); }
.feed-side.side-sell { background: rgba(248,81,73,0.15); color: var(--neg); }
.feed-body { flex: 1; min-width: 0; }
.feed-headline { font-size: 0.98rem; line-height: 1.5; }
.feed-headline .actor { font-weight: 600; }
.feed-meta { font-size: 0.82rem; margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.feed-meta .pill { font-size: 0.72rem; padding: 1px 8px; }
.feed-submeta { font-size: 0.72rem; margin-top: 2px; }
.feed-note {
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--panel-2);
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ===== Card-based activity feed (/feed page) =====
   Every event (trade, post, video, challenge, join) renders as a uniform
   card: avatar + actor header, type-specific content, action footer. */
.feed-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feed-loader { list-style: none; text-align: center; padding: 18px 0; font-size: 0.9em; }
.feed-loader .muted { opacity: 0.7; }
.feed-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.12s;
}
.feed-card:hover { border-color: #3a4250; }

/* Header: avatar, actor + action, sub-line, type chip */
.feed-card-head { display: flex; align-items: flex-start; gap: 10px; }
.feed-card-head-text { flex: 1; min-width: 0; }
.feed-card-actor { font-size: 0.96rem; line-height: 1.4; }
.feed-card-actor .actor { font-weight: 600; }
.feed-card-sub {
  font-size: 0.78rem;
  margin-top: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.feed-card-sub .pill { font-size: 0.72rem; padding: 1px 8px; }
.feed-card-badge { flex: 0 0 auto; align-self: flex-start; }

/* Content block (posts, challenges) */
.feed-card-content { display: flex; flex-direction: column; gap: 8px; }
.feed-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  text-decoration: none;
}
.feed-card-title:hover { color: var(--accent); text-decoration: none; }
.feed-card-meta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.82rem; }

/* Footer: comment count, votes, secondary meta */
.feed-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Trade summary block inside a trade card */
.trade-card-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--panel-2);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s;
}
.trade-card-block:hover { background: #262e3a; text-decoration: none; }
.trade-card-side {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 6px;
}
.trade-card-side.side-buy { background: rgba(63,185,80,0.15); color: var(--pos); }
.trade-card-side.side-sell { background: rgba(248,81,73,0.15); color: var(--neg); }
.trade-card-detail { flex: 1; min-width: 0; font-size: 1.0rem; }
.trade-card-pills { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Badge-earned feed card */
.badge-feed-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(245,197,66,0.10), rgba(121,192,255,0.05));
  border: 1px solid rgba(245,197,66,0.22);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s;
}
.badge-feed-block:hover { background: linear-gradient(135deg, rgba(245,197,66,0.16), rgba(121,192,255,0.08)); text-decoration: none; }
.badge-feed-emoji { font-size: 2.2rem; line-height: 1; flex: 0 0 auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }
.badge-feed-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.badge-feed-name { font-weight: 700; font-size: 0.98rem; }
.badge-feed-desc { font-size: 0.84rem; }
/* Badge event detail page hero */
.badge-detail-hero { display: flex; align-items: center; gap: 16px; }
.badge-detail-emoji { font-size: 3.2rem; line-height: 1; flex: 0 0 auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }

/* Media (video thumbnail / image) inside a post card */
.feed-media { display: block; line-height: 0; }
.feed-video-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: #000;
}
.feed-video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.12s; }
.feed-video-thumb:hover img { opacity: 0.88; }

/* Type chips reused as feed-card badges */
.kind-trade { color: var(--accent); background: rgba(121,192,255,0.10); border-color: rgba(121,192,255,0.22); }
.kind-buy  { color: var(--pos); background: rgba(63,185,80,0.12); border-color: rgba(63,185,80,0.25); }
.kind-sell { color: var(--neg); background: rgba(248,81,73,0.12); border-color: rgba(248,81,73,0.25); }
.kind-challenge { color: var(--accent-2); background: rgba(210,168,255,0.10); border-color: rgba(210,168,255,0.22); }
.kind-join { color: var(--pos); background: rgba(63,185,80,0.12); border-color: rgba(63,185,80,0.25); }
.kind-newuser { color: #ffc457; background: rgba(255,196,87,0.12); border-color: rgba(255,196,87,0.25); }
.kind-badge { color: #f5c542; background: rgba(245,197,66,0.12); border-color: rgba(245,197,66,0.28); }
/* (?) help icon with hover/focus popover */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 8px;
  outline: none;
}
.help-icon:hover, .help-icon:focus { color: var(--accent); border-color: var(--accent); }
.help-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: -8px;
  width: 280px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.5;
  z-index: 50;
  text-align: left;
  font-weight: 400;
  cursor: default;
}
.help-icon:hover .help-popover,
.help-icon:focus .help-popover,
.help-icon:focus-within .help-popover { display: block; }
.help-popover .help-row { display: block; margin: 4px 0; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.help-popover strong {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--panel-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.78rem;
  margin-right: 4px;
}

/* @mention links + $TICKER pills inside rendered comment bodies */
.mention {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  background: rgba(121,192,255,0.10);
  padding: 1px 4px;
  border-radius: 4px;
}
.mention:hover { background: rgba(121,192,255,0.20); text-decoration: none; }

.ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
  margin: 0 1px;
}
.ticker-pill .ticker-sym {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.ticker-pill .ticker-sym:hover { text-decoration: underline; }
.ticker-pill .ticker-price { color: var(--text); }
.ticker-pill .ticker-change { font-weight: 600; }

.ticker-pill.locked {
  background: rgba(139,148,158,0.10);
  border-color: rgba(139,148,158,0.30);
}
.ticker-pill.locked .ticker-sym { color: var(--text); }
.ticker-pill .ticker-lock {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-right: -2px;
}

/* Mention autocomplete dropdown */
.mention-autocomplete {
  position: absolute;
  z-index: 50;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  min-width: 220px;
  max-width: 320px;
  padding: 4px;
  font-size: 0.9rem;
}
.mention-autocomplete-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}
.mention-autocomplete-item.active,
.mention-autocomplete-item:hover {
  background: var(--panel-2);
}
.mention-autocomplete-item .mac-name { font-weight: 600; }
.mention-autocomplete-item .mac-hint { color: var(--muted); font-size: 0.78rem; }

/* Inline comment form inside feed items */
details.inline-comment {
  margin-top: 8px;
}
details.inline-comment > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  user-select: none;
}
details.inline-comment > summary::-webkit-details-marker { display: none; }
details.inline-comment > summary:hover { color: var(--accent); background: rgba(121,192,255,0.06); }
details.inline-comment > summary .icon-comment { color: var(--accent); }
details.inline-comment[open] > summary { color: var(--accent); }

details.inline-comment > form {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--panel-2);
  border-radius: 8px;
}
details.inline-comment > form textarea { margin-top: 0; }
.inline-comment-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

/* Message board list */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list-item { border-bottom: 1px solid var(--border); }
.post-list-item:last-child { border-bottom: none; }
.post-list-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  color: var(--text);
  text-decoration: none;
}
.post-list-link:hover { background: var(--panel-2); text-decoration: none; }
.post-list-body { flex: 1; min-width: 0; }
.post-list-title { font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.post-list-meta { display: flex; gap: 6px; align-items: center; font-size: 0.82rem; }

.post-body { white-space: pre-wrap; word-wrap: break-word; line-height: 1.55; }

/* Feed filter pills */
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.feed-head h1 { margin: 0; }

/* Trades-only switch — sits at the right of the feed header */
.feed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
}
.feed-toggle:hover { color: var(--text); text-decoration: none; }
.feed-toggle.on { color: var(--text); }
.feed-toggle-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
  flex: none;
}
.feed-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, background 0.15s;
}
.feed-toggle.on .feed-toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.feed-toggle.on .feed-toggle-knob {
  transform: translateX(16px);
  background: #0b0f15;
}

.feed-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}
.feed-filter-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.12s;
}
.feed-filter-pill:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}
.feed-filter-pill.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f15;
  border-color: transparent;
  font-weight: 600;
}
.feed-filter-pill.active:hover { color: #0b0f15; }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.badge {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.badge-icon { font-size: 1.6rem; line-height: 1; }
.badge-body { flex: 1; min-width: 0; }
.badge-name { font-weight: 600; font-size: 0.95rem; }
.badge-count { color: var(--accent); font-weight: 700; }
.badge-sub { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.title-badge { background: linear-gradient(135deg, rgba(121,192,255,0.08), rgba(210,168,255,0.06)); border-color: rgba(121,192,255,0.3); }
.earned-badge { background: linear-gradient(135deg, rgba(86,211,100,0.10), rgba(121,192,255,0.06)); border-color: rgba(86,211,100,0.30); }
.earned-badge .badge-count { margin-left: 6px; font-size: 0.85rem; }
