/* forum.css — The forum: its boards in groups, a board's threads, a thread's posts
   with their authors' column, the editor, the search and the moderators' queue. */

.forum-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.forum-top .page-title { margin-bottom: 0; }
.forum-top-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.forum-search { display: flex; gap: 0.4rem; }
.forum-search .input { width: 16rem; padding: 0.4rem 0.6rem; }

.forum-breadcrumb { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; font-size: 0.9rem; margin-bottom: 0.8rem; color: var(--text-muted); }
.forum-breadcrumb-sep { color: var(--text-dim); }

/* ===== BOARDS AND THREADS ===== */
.forum-group { padding: 0; margin-bottom: 1.25rem; overflow: hidden; }
.forum-group .panel-head { margin: 0; }
.forum-table-wrap { overflow-x: auto; }
.forum-boards .forum-board-name { min-width: 15rem; }
.forum-board-name a { font-weight: 700; font-size: 1.04rem; color: var(--gold-bright); }
.forum-board-name p { color: var(--text-muted); font-size: 0.88rem; }
.forum-boards td.num, .forum-boards th.r { width: 5.2rem; }
.forum-latest { width: 34%; min-width: 14rem; line-height: 1.4; }
.forum-latest a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26rem; }
.forum-latest span { display: block; color: var(--text-dim); font-size: 0.82rem; }

.forum-thread-title { min-width: 16rem; }
.forum-thread-title a { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.forum-thread-title a:hover { color: var(--gold-bright); }
.forum-thread-title .badge { margin-right: 0.3rem; }
.is-unread .forum-thread-title a { color: var(--gold-bright); }
.forum-unread-dot { display: inline-block; width: 8px; height: 8px; margin-right: 0.45rem; background: var(--gold-bright); box-shadow: 0 0 6px rgba(242, 220, 158, 0.7); vertical-align: 1px; }
.forum-threads .is-hidden td { opacity: 0.6; }

/* ===== POSTS ===== */
.forum-posts { display: grid; gap: 0.9rem; margin-bottom: 1.25rem; }
.forum-post {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(242, 220, 158, 0.05);
}
.forum-post:target { border-color: var(--gold); }
.forum-post.is-hidden { opacity: 0.65; border-color: rgba(217, 109, 102, 0.5); }

.forum-author { padding: 1rem; background: var(--surface-2); border-right: 1px solid var(--line); text-align: center; }
.forum-figure { width: 84px; height: 84px; margin: 0 auto 0.6rem; }
.forum-author-text { display: grid; gap: 0.15rem; justify-items: center; font-size: 0.86rem; color: var(--text-muted); overflow-wrap: anywhere; }
.forum-author-name { color: var(--gold-bright); font-size: 1rem; }
.forum-author-character { font-weight: 700; margin-top: 0.35rem; }
.forum-author-meta { color: var(--text-dim); font-size: 0.8rem; }
.forum-author-meta:first-of-type { margin-top: 0.35rem; }
.forum-author .badge { margin: 0.1rem 0; }

.forum-post-body { display: flex; flex-direction: column; min-width: 0; padding: 0.9rem 1.2rem; }
.forum-post-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; padding-bottom: 0.5rem; margin-bottom: 0.7rem; border-bottom: 1px solid var(--line); color: var(--text-dim); font-size: 0.84rem; }
.forum-post-edited { font-style: italic; }
.forum-post-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.9rem; }

/* What a player wrote, as forumtext makes it. */
.forum-text { line-height: 1.7; overflow-wrap: anywhere; }
.forum-text ul { margin: 0.4rem 0 0.4rem 1.3rem; }
.forum-text a { text-decoration: underline; text-underline-offset: 3px; }
.forum-quote {
    margin: 0.4rem 0 0.7rem;
    padding: 0.6rem 0.9rem;
    color: var(--text-muted);
    background: var(--well);
    border-left: 3px solid var(--gold-deep);
    font-size: 0.95em;
}
.forum-quote cite { display: block; margin-bottom: 0.25rem; color: var(--gold); font-style: normal; font-weight: 700; font-size: 0.9em; }

/* ===== THE EDITOR ===== */
.forum-reply, .forum-new-thread { margin: 1.25rem 0; }
.forum-toolbar { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.4rem; }
.forum-textarea { display: block; resize: vertical; font-family: inherit; line-height: 1.6; }
.forum-preview { margin-top: 0.6rem; padding: 0.8rem 1rem; background: var(--well); border: 1px dashed var(--line-strong); }
.forum-locked-admin { margin-bottom: 0.8rem; }
.forum-reply .alert, .forum-new-thread .alert { margin-top: 0.8rem; margin-bottom: 0; }

.forum-notice {
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    text-align: center;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px dashed var(--line-strong);
}

/* ===== THE REST ===== */
.forum-thread-badges { display: flex; gap: 0.5rem; }
.forum-admin-actions { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.forum-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.25rem 0; }
.forum-pagination-info { color: var(--text-muted); font-size: 0.9rem; }

.forum-hits { list-style: none; }
.forum-hits li { padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--line); }
.forum-hits li:last-child { border-bottom: none; }
.forum-hits h2 { font-family: var(--font-text); font-weight: 700; font-size: 1.05rem; margin-bottom: 0.2rem; }
.forum-hit-text { color: var(--text-muted); overflow-wrap: anywhere; }
.forum-hit-meta { color: var(--text-dim); font-size: 0.82rem; margin-top: 0.25rem; }

.forum-report-card { padding: 0.9rem 1rem; margin-bottom: 0.7rem; background: var(--surface); border: 1px solid var(--line-strong); }
.forum-report-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; color: var(--text-muted); font-size: 0.86rem; margin-bottom: 0.5rem; }
.forum-report-reason { margin-bottom: 0.5rem; }
.forum-report-text { padding: 0.6rem 0.8rem; background: var(--well); border: 1px solid var(--line); }

@media (max-width: 760px) {
    .forum-top { align-items: stretch; flex-direction: column; }
    .forum-search .input { width: 100%; flex: 1; }
    .forum-post { grid-template-columns: 1fr; }
    .forum-author { display: flex; gap: 0.8rem; align-items: center; text-align: left; border-right: none; border-bottom: 1px solid var(--line); padding: 0.7rem 0.9rem; }
    .forum-figure { width: 56px; height: 56px; margin: 0; flex: none; }
    .forum-author-text { justify-items: start; }
    .forum-author-meta:first-of-type, .forum-author-character { margin-top: 0; }
    .forum-post-body { padding: 0.8rem 0.9rem; }
    /* The lists stack: a row is its name, then its counts and last post. */
    .forum-boards thead, .forum-threads thead { display: none; }
    .forum-boards tr, .forum-threads tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.8rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
    .forum-boards td, .forum-threads td { padding: 0; border: none; background: none !important; min-width: 0; width: auto; }
    .forum-boards .forum-board-name, .forum-thread-title { grid-column: 1 / -1; min-width: 0; }
    .forum-boards td:nth-child(2) { display: none; }
    .forum-boards td:nth-child(3) { grid-row: 2; grid-column: 2; color: var(--text-dim); font-size: 0.82rem; }
    .forum-boards .forum-latest { grid-row: 2; grid-column: 1; min-width: 0; margin-top: 0.3rem; }
    .forum-threads td:nth-child(2) { display: none; }
    .forum-threads td:nth-child(3) { grid-row: 2; grid-column: 2; font-size: 0.82rem; }
    .forum-threads .forum-latest { grid-row: 2; grid-column: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 0.6rem; margin-top: 0.2rem; }
    .forum-latest a { max-width: none; }
}
}
