/* Forums page (forums.html): page-only styles. Load after site.css.
   Everything else comes from the shared classes in site.css (see STYLEGUIDE.md).

   Sections
    1 page head        2 without script     3 layout           4 category and thread rows
    5 toolbar          6 posts              7 report box       8 composers and notes */

/* 1. Page head ---------------------------------------------------------------- */

/* The h1 names the view. A thread's title is player text of up to 120 characters, so the
   thread view sets its h1 one step smaller and wider than a page title. */
.forum-head[data-view="thread"] h1 {
  max-width: 34ch;
  font-size: clamp(var(--step-2), 1.1rem + 2vw, var(--step-3));
  line-height: 1.15;
}

.forum-head-meta { display: grid; gap: 0.55rem; }
.forum-head-meta .meta { font-size: var(--step--1); }
.forum-badges { --cluster-gap: 0.4rem; max-width: none; }

/* 2. Without script ------------------------------------------------------------ */

.forum-nojs { display: none; }
#app:not(.js) .forum-nojs { display: grid; }
#app:not(.js) .forum-loading { display: none; }

/* 3. Layout --------------------------------------------------------------------- */

.forum-main,
.forum-side { --stack-gap: 1.5rem; }

.forum-side .panel-body p,
.forum-side .panel-body li { font-size: var(--step--1); }

/* 4. Category and thread rows ---------------------------------------------------- */

/* Rows sit in a flush panel under its title strip: round only the last row's corners. */
.forum-rows > .row:last-child {
  border-bottom-left-radius: calc(var(--radius-panel) - 1px);
  border-bottom-right-radius: calc(var(--radius-panel) - 1px);
}

.forum-desc { max-width: 62ch; color: var(--mist); font-size: var(--step--1); }

/* Pinned threads carry a slim sakura stripe, like a lower-third's edge. */
.forum-thread.is-pinned { box-shadow: inset 3px 0 0 var(--sakura); }

.panel-flush .forum-empty { margin: 1rem; }

/* 5. Toolbar: search and New thread ---------------------------------------------- */

.forum-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.forum-toolbar > * { min-width: 0; }

.forum-search { display: grid; gap: 0.35rem; flex: 1 1 16rem; max-width: 30rem; }

.forum-start { flex: none; max-width: 100%; }
.forum-start-note { max-width: 36ch; color: var(--mist); font-size: var(--step--1); }

.forum-more .actions { justify-content: center; }

/* 6. Posts ------------------------------------------------------------------------ */

.forum-posts { gap: 1.25rem; }

.forum-post-by {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  line-height: 1.4;
}

.forum-edited { color: var(--mist); font-size: var(--step--2); }

/* Team posts: a sakura stripe on the post's title strip. */
.forum-post.is-team .post-head { box-shadow: inset 4px 0 0 var(--sakura); }

/* The reply that was just posted. */
.forum-post.is-new { border-color: var(--sakura); box-shadow: 0 0 0 1px var(--sakura); }

.forum-report-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.25rem;
  color: var(--mist);
  font-size: var(--step--1);
}
.forum-report-toggle:hover,
.forum-report-toggle[aria-expanded="true"] { color: var(--sakura); }

/* 7. Report box ------------------------------------------------------------------- */

.forum-report { padding: 0 1rem 1rem; }

.forum-report-inner {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--haze);
  border-radius: var(--radius-control);
  background: var(--night);
}
.forum-report-title { font-weight: 800; }
.forum-report .form { max-width: none; gap: 1rem; }
.forum-report textarea { min-height: 5.5rem; }
.forum-report .notice { gap: 0.6rem; }
.forum-report .notice .actions { padding-top: 0.25rem; }

/* 8. Composers (reply, new thread) and notes -------------------------------------- */

.forum-composer .form { max-width: none; }

.forum-posting-as { color: var(--mist); font-size: var(--step--1); }
.forum-posting-as strong { color: var(--moon); }
.forum-change {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.2rem;
  font-size: inherit;
}

.forum-rules-list { display: grid; gap: 0.35rem; margin: 0; padding-left: 1.2rem; }
.forum-rules-list li::marker { color: var(--sakura); }

.forum-pick-list { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; list-style: none; }
.forum-pick-list a { display: inline-flex; align-items: center; min-height: 2.75rem; }
