/* =========================================================
   ABBUC Forum – Compact B&W theme
   Activated by adding class "theme-compact" to <html>.
   forum.js sets/clears it based on the theme switcher and
   persists the choice in localStorage ("abbuc_forum_theme").
   The inline <head> script re-applies it on every page load
   to prevent a flash of the default theme.
   ========================================================= */

/* Override the ABBUC colour palette to greyscale.
   Most colour rules in abbuc.css and forum.css use these
   custom properties, so this block does the bulk of the work. */
html.theme-compact {
    font-size: 13px;
    --primary-dark:   #111;
    --primary-medium: #555;
    --primary-pale:   #bbb;
    --primary-light:  #ddd;
    --primary-hint:   #f4f4f4;
}

/* Remove rounded corners and box-shadows throughout */
html.theme-compact .forum-card,
html.theme-compact .thread-list,
html.theme-compact .post.card,
html.theme-compact .post-body pre,
html.theme-compact .post-body code,
html.theme-compact .post-body blockquote,
html.theme-compact .user-profile-fields {
    border-radius: 0;
}

html.theme-compact .forum-card,
html.theme-compact .thread-list,
html.theme-compact .post.card {
    box-shadow: none;
}

/* ----- Breadcrumb --------------------------------------- */
html.theme-compact .breadcrumb {
    margin-bottom: 0.5rem;
}

/* ----- Forum listing ------------------------------------ */
html.theme-compact .forum-list {
    gap: 0.25rem;
    margin-bottom: 1rem;
}

html.theme-compact .forum-card-main {
    padding: 0.3rem 0.5rem;
}

html.theme-compact .forum-card-title {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

html.theme-compact .forum-card-info {
    font-size: 0.78rem;
}

html.theme-compact .forum-card-stats {
    width: 180px;
    padding: 0.3rem 0.5rem;
    gap: 0.1rem;
}

html.theme-compact .forum-stat-item {
    font-size: 0.78rem;
}

html.theme-compact .forum-stat-item strong {
    font-size: 0.88rem;
}

html.theme-compact .forum-last-post {
    font-size: 0.75rem;
}

/* ----- Thread listing ----------------------------------- */
html.theme-compact .forum-actions-bar {
    margin-bottom: 0.35rem;
}

html.theme-compact .thread-list-heading {
    font-size: 1rem;
}

html.theme-compact .btn-new-topic {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.1rem;
}

html.theme-compact .thread-list {
    margin-bottom: 0.75rem;
}

html.theme-compact .thread-list thead th {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
}

html.theme-compact .thread-list tbody td {
    padding: 0.25rem 0.6rem;
    font-size: 0.82rem;
}

html.theme-compact .thread-date {
    font-size: 0.75rem;
}

/* ----- Post sort bar ------------------------------------ */
html.theme-compact .post-sort-bar {
    margin-bottom: 0.4rem;
}

html.theme-compact .post-sort-label {
    font-size: 0.72rem;
}

html.theme-compact .btn-sort-posts {
    font-size: 0.68rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.1rem;
}

/* ----- Post cards --------------------------------------- */
html.theme-compact .post.card {
    margin-bottom: 0.5rem !important;
}

html.theme-compact .post.card.post-reply {
    margin-left: 1.25rem;
}

html.theme-compact .post .card-header {
    padding: 0.3rem 0.65rem;
}

html.theme-compact .post-title {
    font-size: 0.92rem;
    margin-bottom: 0.1rem;
}

html.theme-compact .post-meta {
    gap: 0.4rem;
}

html.theme-compact .post-author {
    font-size: 0.82rem;
}

html.theme-compact .post-date {
    font-size: 0.72rem;
}

html.theme-compact .post-link {
    font-size: 0.65rem;
    margin-right: 0.25rem;
}

html.theme-compact .post .card-body.post-body {
    padding: 0.4rem 0.65rem;
    line-height: 1.4;
}

html.theme-compact .post-body pre {
    background: #f0f0f0;
    border-color: #ccc;
    padding: 0.35rem 0.6rem;
    margin: 0.25rem 0 0.5rem;
    line-height: 1.35;
}

html.theme-compact .post-body code {
    background: #eeeeee;
}

/* Blockquotes: reduce indentation, greyscale backgrounds */
html.theme-compact .post-body blockquote {
    margin: 0.3rem 0 0.3rem 4vw;
    padding: 0.2rem 0.5rem 0.2rem 0.6rem;
    border-left-color: #666;
    background: #f0f0f0;
    color: #333;
}

html.theme-compact .post-body blockquote blockquote {
    margin-left: 4vw;
    background: #e5e5e5;
}

html.theme-compact .post-body blockquote blockquote blockquote {
    margin-left: 4vw;
    background: #dadada;
    color: #222;
}

html.theme-compact .post-body blockquote blockquote blockquote blockquote {
    margin-left: 4vw;
    background: #cfcfcf;
    color: #111;
}

html.theme-compact .post-body blockquote blockquote blockquote blockquote blockquote {
    margin-left: 4vw;
    background: #c4c4c4;
    color: #000;
}

html.theme-compact .post-body blockquote blockquote blockquote blockquote blockquote blockquote {
    margin-left: 0;
}

html.theme-compact .post-signature {
    padding: 0.2rem 0.65rem 0.25rem;
    background: #f4f4f4;
    border-top-color: #ccc;
    font-size: 0.75rem;
    color: #555;
}

html.theme-compact .post-attachments {
    padding: 0.25rem 0.65rem 0.35rem;
    font-size: 0.78rem;
}

html.theme-compact .post-actions {
    padding: 0.15rem 0.65rem 0.25rem;
    gap: 0.25rem;
}

html.theme-compact .post-actions a {
    font-size: 0.7rem;
    padding: 0.08rem 0.35rem;
    border-radius: 0;
}

html.theme-compact .post-author-avatar {
    width: 20px;
    height: 20px;
    margin-right: 0.25rem;
}

/* ----- User profile ------------------------------------ */
html.theme-compact .user-avatar {
    width: 72px;
    height: 72px;
    border-color: #bbb;
}

html.theme-compact .user-profile-name {
    font-size: 1.3rem;
}

html.theme-compact .user-profile-header {
    gap: 1rem;
    margin-bottom: 1rem;
}

html.theme-compact .user-profile-fields {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    gap: 0.25rem 1rem;
}

/* ----- Theme switcher widget --------------------------- */
/* Base style (both themes) lives in forum.css .select-theme */
html.theme-compact .select-theme {
    border-radius: 0.1rem;
}
