/* ===========================================================================
   Community Forum — component styles.
   Builds on base.css (variables, .panel, .btn, .data-table, etc.). Only
   forum-specific components live here; everything inherits the dark-first,
   high-contrast palette and Bricolage Grotesque display type from the base.
   =========================================================================== */

/* ---- Community guidelines (forum index) ---- */
.guidelines { margin: 0 0 1.5rem; padding: 1rem 1.25rem; }
.guidelines > summary {
  cursor: pointer; font-size: 1.1rem; padding: 0.25rem 0;
}
.guidelines > summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
.guidelines-body { margin-top: 0.75rem; }
.guidelines-body ul { margin: 0.5rem 0; padding-left: 1.5rem; }
.guidelines-body li { margin: 0.3rem 0; }

/* ---- Board listing (forum index) ---- */
.board-card { display: flex; flex-direction: column; gap: 0.4rem; }
.board-card-title { margin: 0; font-size: 1.4rem; }
.board-card-title a { color: var(--text); text-decoration: none; }
.board-card-title a:hover { color: var(--accent); text-decoration: underline; }
.board-meta { margin: auto 0 0; font-size: 1rem; }
.board-status { margin: 0; font-size: 1rem; color: var(--accent); }

/* ---- Thread listing (board page) ----
   Each thread is its own heading + preview so the board can be browsed by
   heading with a screen reader, rather than tabbed through as a table. */
.thread-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; }
.thread-listing { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.thread-summary { margin: 0; }
.thread-summary-title { margin: 0; font-size: 1.35rem; }
.thread-summary-title a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.thread-summary-title a:hover { color: var(--accent); }
.thread-summary-meta { margin: 0.4rem 0 0.75rem; font-size: 1rem; }
.thread-summary-preview { margin: 0; }
.thread-summary-preview p:last-child { margin-bottom: 0; }

/* Pinned / Locked rendered as readable text chips, never colour-only. */
.thread-flags { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; margin-left: 0.4rem; }
.thread-flag {
  display: inline-block; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.12rem 0.55rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--accent); color: var(--accent);
}

/* ---- Thread page ---- */
.thread-status { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }

.mod-bar { margin: 1.25rem 0 1.5rem; padding: 1.25rem clamp(1.25rem, 3vw, 1.75rem); }
.mod-bar-h { margin: 0; font-size: 1.2rem; }
.mod-bar .btn-row { margin-top: 1rem; }
.mod-bar form { display: inline; margin: 0; }

.post-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.post { margin: 0; }
.post-header { margin-bottom: 0.75rem; }
.post-author { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
/* The timestamp lives inside the heading so each H2 is unique, but reads as
   secondary text rather than a second name. */
.post-author-time { font-family: var(--body); font-weight: 400; font-size: 1rem; color: var(--muted); }
.post-badge {
  display: inline-block; margin-left: 0.5rem; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; vertical-align: middle;
  padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.post-meta { margin: 0.15rem 0 0; font-size: 1rem; }
.post-edited { font-style: italic; }
.post-body { margin: 0; }
.post-body p:last-child { margin-bottom: 0; }
.post-removed { color: var(--muted); margin: 0; }
.post-actions { margin-top: 1.25rem; }
.post-actions form { display: inline; margin: 0; }

/* Reply area + delete-confirm preview */
.reply-area { margin-top: 2.5rem; }
.post-preview { margin: 1.5rem 0; border-left: 4px solid var(--accent); }
.post-preview p:last-child { margin-bottom: 0; }

/* ---- Pagination ---- */
.pagination { margin: 2rem 0 0; }
.pagination ul {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0; padding: 0; align-items: center;
}
.pagination a,
.pagination .pagination-disabled {
  display: inline-block; padding: 0.5rem 0.85rem; border-radius: 8px;
  border: 1px solid var(--border); text-decoration: none; font-weight: 600;
  color: var(--text);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination a[aria-current="page"] {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.pagination .pagination-disabled { color: var(--muted); opacity: 0.6; }
