/* forum/css/forum.css */

/* ── Category list ─────────────────────────────────────────────────────────── */

.forum_category_list { display: flex; flex-direction: column; gap: 0.5rem; }

.forum_category_row { padding: 1rem 1.25rem !important; }
.forum_category_row_locked { opacity: 0.6; }

.forum_category_main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.forum_category_icon .material-symbols-outlined {
    font-size: 1.75rem;
    color: var(--btn_primary_bg);
    flex-shrink: 0;
}

.forum_category_info { flex: 1; min-width: 0; }

.forum_category_name {
    font-weight: 600;
    font-size: 1rem;
    color: inherit;
    text-decoration: none;
}
.forum_category_name:hover { text-decoration: underline; }
.forum_category_name_locked { font-weight: 600; font-size: 1rem; color: var(--text_muted, #888); }

.forum_category_desc {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
}

.forum_category_stats {
    flex-shrink: 0;
    text-align: right;
    font-size: 0.82rem;
    line-height: 1.6;
    min-width: 80px;
}

.forum_category_last {
    flex-shrink: 0;
    min-width: 160px;
    max-width: 220px;
    font-size: 0.82rem;
    text-align: right;
}

.forum_last_link {
    color: inherit;
    text-decoration: none;
    font-size: 0.82rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forum_last_link:hover { text-decoration: underline; }

@media (max-width: 680px) {
    .forum_category_stats,
    .forum_category_last { display: none; }
}

/* ── Thread table ───────────────────────────────────────────────────────────── */

.forum_thread_table { border-collapse: collapse; }

.forum_thread_row td { vertical-align: top; padding: 0.6rem 0.5rem; }
.forum_thread_row + .forum_thread_row td { border-top: 1px solid var(--border_color, rgba(255,255,255,0.08)); }

.forum_thread_pinned td { background: rgba(255,255,255,0.03); }

.forum_thread_title_cell { min-width: 0; }

.forum_thread_link {
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    font-size: 0.93rem;
}
.forum_thread_link:hover { text-decoration: underline; }

.forum_thread_icon { font-size: 14px; vertical-align: middle; flex-shrink: 0; }
.forum_icon_pinned  { color: var(--btn_primary_bg); }
.forum_icon_locked  { color: var(--text_muted, #888); }

.forum_col_replies,
.forum_col_views { width: 70px; text-align: center; font-size: 0.85rem; }

.forum_col_last { width: 130px; font-size: 0.82rem; }

@media (max-width: 600px) {
    .forum_col_views { display: none; }
    .forum_col_last  { display: none; }
}

/* ── Thread view ────────────────────────────────────────────────────────────── */

.forum_badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: 99px;
    color: #fff;
    vertical-align: middle;
}
.forum_badge_pinned { background: var(--btn_primary_bg); }
.forum_badge_locked { background: var(--text_muted, #888); }

/* Post card */
.forum_post { padding: 0 !important; overflow: hidden; }

.forum_post_inner {
    display: flex;
    gap: 0;
}

.forum_post_author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 0.75rem;
    min-width: 90px;
    max-width: 90px;
    border-right: 1px solid var(--border_color, rgba(255,255,255,0.08));
    text-align: center;
}

.forum_post_avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--btn_primary_bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    flex-shrink: 0;
}
.forum_post_avatar:hover { opacity: 0.85; }

.forum_post_username {
    font-size: 0.75rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    word-break: break-all;
}
.forum_post_username:hover { text-decoration: underline; }

.forum_post_num { font-size: 0.7rem; }

.forum_post_body_wrap {
    flex: 1;
    min-width: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.forum_post_body {
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.65;
    word-break: break-word;
}

.forum_post_footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border_color, rgba(255,255,255,0.08));
    gap: 0.5rem;
    flex-wrap: wrap;
}

.forum_post_actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

@media (max-width: 500px) {
    .forum_post_author { min-width: 64px; max-width: 64px; }
    .forum_post_avatar { width: 36px; height: 36px; font-size: 0.85rem; }
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */

.forum_pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.forum_page_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    border-radius: var(--border_radius, 6px);
    border: 1px solid var(--border_color, rgba(255,255,255,0.12));
    font-size: 0.85rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.forum_page_btn:hover      { background: rgba(255,255,255,0.07); }
.forum_page_btn.is_active  { background: var(--btn_primary_bg); color: #fff; border-color: var(--btn_primary_bg); }

/* ── Modals ──────────────────────────────────────────────────────────────── */

.modal_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
