/* ===== Agent 14: bbPress Community (2026-04-20) ===== */
/* Namespace: .bbp-forum-override wraps bbPress content; standalone .community-* classes for sidebar/hot-topics */

/* -- Container wrapper -- */
.bbp-forum-override {
    max-width: 1200px;
    margin: 40px auto;
    padding: 24px;
    color: #e5e7eb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.bbp-forum-override .bbp-breadcrumb {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    border-left: 3px solid #D4A843;
}

.bbp-forum-override .bbp-breadcrumb a {
    color: #D4A843;
    text-decoration: none;
}

.bbp-forum-override .bbp-breadcrumb a:hover {
    color: #e5b86a;
    text-decoration: underline;
}

/* -- Two-column layout: main + sidebar -- */
.bbp-forum-override .bbp-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: flex-start;
}

/* -- Forum archive list -- */
.bbp-forum-override #bbpress-forums,
body.forum-archive #bbpress-forums,
body.single-forum #bbpress-forums,
body.single-topic #bbpress-forums {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 20px;
    color: #e5e7eb;
}

#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-lead-topic {
    background: transparent;
    border: 1px solid #1e293b;
    border-radius: 6px;
    overflow: hidden;
}

#bbpress-forums li.bbp-header {
    background: #1e293b !important;
    color: #D4A843 !important;
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid #334155;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

#bbpress-forums li.bbp-footer {
    background: #0f172a !important;
    color: #94a3b8 !important;
    padding: 10px 14px;
    border-top: 1px solid #1e293b;
}

#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    padding: 16px 14px;
    transition: background 0.2s ease;
}

#bbpress-forums li.bbp-body ul.forum:hover,
#bbpress-forums li.bbp-body ul.topic:hover {
    background: #131c2f;
}

#bbpress-forums li.bbp-body ul.forum:last-child,
#bbpress-forums li.bbp-body ul.topic:last-child {
    border-bottom: none;
}

/* -- Forum / Topic titles -- */
#bbpress-forums a.bbp-forum-title,
#bbpress-forums a.bbp-topic-permalink {
    color: #f1f5f9 !important;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.02rem;
}

#bbpress-forums a.bbp-forum-title:hover,
#bbpress-forums a.bbp-topic-permalink:hover {
    color: #D4A843 !important;
}

#bbpress-forums .bbp-forum-content,
#bbpress-forums .bbp-topic-content {
    color: #cbd5e1;
    font-size: 0.92rem;
    margin-top: 6px;
    line-height: 1.6;
}

/* -- Author meta -- */
#bbpress-forums .bbp-author-avatar img,
#bbpress-forums img.avatar {
    border-radius: 50%;
    border: 2px solid #334155;
    margin-right: 8px;
}

#bbpress-forums .bbp-author-name,
#bbpress-forums .bbp-reply-author a {
    color: #60a5fa !important;
    font-weight: 500;
    font-size: 0.88rem;
}

#bbpress-forums .bbp-meta,
#bbpress-forums .bbp-topic-meta,
#bbpress-forums .bbp-topic-freshness a,
#bbpress-forums .bbp-reply-meta {
    color: #94a3b8;
    font-size: 0.82rem;
}

#bbpress-forums .bbp-topic-freshness a,
#bbpress-forums .bbp-reply-ip,
#bbpress-forums .bbp-topic-freshness-author a {
    color: #60a5fa !important;
}

/* -- Single topic / reply bubbles -- */
#bbpress-forums div.reply,
#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header,
#bbpress-forums .bbp-reply-content {
    background: #131c2f !important;
    border: 1px solid #1e293b !important;
    color: #e5e7eb !important;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

#bbpress-forums .bbp-reply-content,
#bbpress-forums .bbp-topic-content {
    background: transparent !important;
    border: none !important;
    padding: 0;
    margin-bottom: 0;
    font-size: 0.96rem;
    line-height: 1.7;
}

#bbpress-forums .bbp-reply-content p,
#bbpress-forums .bbp-topic-content p {
    color: #e5e7eb;
    margin-bottom: 10px;
}

#bbpress-forums .bbp-body div.even {
    background: #0f172a !important;
}

#bbpress-forums .bbp-body div.odd {
    background: #131c2f !important;
}

/* -- Reply form -- */
#bbpress-forums #new-reply-title h3,
#bbpress-forums #new-topic-title h3 {
    background: #1e293b !important;
    color: #D4A843 !important;
    padding: 14px 16px;
    border: 1px solid #334155 !important;
    border-radius: 6px 6px 0 0;
    margin: 0;
    font-size: 1.05rem;
}

#bbpress-forums fieldset.bbp-form {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 0 0 6px 6px;
    padding: 20px;
    color: #e5e7eb;
}

#bbpress-forums fieldset.bbp-form label {
    color: #cbd5e1;
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

#bbpress-forums fieldset.bbp-form input[type="text"],
#bbpress-forums fieldset.bbp-form input[type="password"],
#bbpress-forums fieldset.bbp-form input[type="email"],
#bbpress-forums fieldset.bbp-form select,
#bbpress-forums fieldset.bbp-form textarea {
    background: #020617 !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}

#bbpress-forums fieldset.bbp-form input:focus,
#bbpress-forums fieldset.bbp-form textarea:focus,
#bbpress-forums fieldset.bbp-form select:focus {
    border-color: #D4A843 !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 168, 67, 0.15);
}

#bbpress-forums button,
#bbpress-forums input[type="submit"] {
    background: #D4A843 !important;
    color: #0f172a !important;
    border: none !important;
    padding: 10px 22px !important;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.95rem;
}

#bbpress-forums button:hover,
#bbpress-forums input[type="submit"]:hover {
    background: #e5b86a !important;
}

/* -- TinyMCE/WP editor in reply form -- */
#bbpress-forums .wp-editor-container,
#bbpress-forums .wp-editor-tools {
    background: #020617 !important;
    border: 1px solid #334155 !important;
}

#bbpress-forums .mce-panel,
#bbpress-forums .mce-toolbar-grp {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* -- Pagination -- */
#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span {
    background: #1e293b;
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 4px;
    margin: 0 3px;
    text-decoration: none;
    border: 1px solid #334155;
    font-size: 0.88rem;
}

#bbpress-forums .bbp-pagination-links a:hover,
#bbpress-forums .bbp-pagination-links span.current {
    background: #D4A843;
    color: #0f172a;
    border-color: #D4A843;
}

/* -- Admin/Moderator badge -- */
#bbpress-forums li.bbp-body ul.forum .bbp-author-role,
#bbpress-forums li.bbp-body ul.topic .bbp-author-role,
#bbpress-forums div.reply .bbp-author-role {
    display: inline-block;
    background: #D4A843;
    color: #0f172a;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 6px;
}

/* -- Sidebar widgets -- */
.community-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.community-sidebar-widget {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 18px;
    color: #e5e7eb;
}

.community-sidebar-widget h3 {
    color: #D4A843;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-sidebar-widget h3 .widget-icon {
    color: #D4A843;
    font-size: 1.1rem;
}

/* -- Hot topics list -- */
.community-hot-topics {
    list-style: none;
    padding: 0;
    margin: 0;
}

.community-hot-topics li {
    padding: 10px 0;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.community-hot-topics li:last-child {
    border-bottom: none;
}

.community-hot-topics .rank {
    display: inline-block;
    min-width: 22px;
    height: 22px;
    text-align: center;
    line-height: 22px;
    background: #1e293b;
    color: #94a3b8;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.community-hot-topics li:nth-child(1) .rank {
    background: #D4A843;
    color: #0f172a;
}

.community-hot-topics li:nth-child(2) .rank {
    background: #cbd5e1;
    color: #0f172a;
}

.community-hot-topics li:nth-child(3) .rank {
    background: #a16207;
    color: #fff;
}

.community-hot-topics a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.community-hot-topics a:hover {
    color: #D4A843;
}

.community-hot-topics .reply-count {
    color: #60a5fa;
    font-size: 0.76rem;
    margin-left: 4px;
}

/* -- Latest replies -- */
.community-latest-replies {
    list-style: none;
    padding: 0;
    margin: 0;
}

.community-latest-replies li {
    padding: 12px 0;
    border-bottom: 1px solid #1e293b;
}

.community-latest-replies li:last-child {
    border-bottom: none;
}

.community-latest-replies .reply-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.community-latest-replies .reply-author {
    color: #60a5fa;
    font-weight: 500;
}

.community-latest-replies .reply-topic-link {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.5;
    display: block;
}

.community-latest-replies .reply-topic-link:hover {
    color: #D4A843;
}

/* -- Rules box -- */
.community-rules-mini {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: rule-counter;
}

.community-rules-mini li {
    counter-increment: rule-counter;
    padding: 8px 0 8px 28px;
    position: relative;
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.5;
    border-bottom: 1px dashed #1e293b;
}

.community-rules-mini li:last-child {
    border-bottom: none;
}

.community-rules-mini li::before {
    content: counter(rule-counter);
    position: absolute;
    left: 0;
    top: 8px;
    width: 20px;
    height: 20px;
    background: #D4A843;
    color: #0f172a;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}

.community-sidebar-widget .rules-link {
    display: block;
    margin-top: 12px;
    padding: 8px 12px;
    background: #1e293b;
    color: #D4A843;
    text-decoration: none;
    text-align: center;
    border-radius: 4px;
    font-size: 0.84rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.community-sidebar-widget .rules-link:hover {
    background: #334155;
}

/* -- Community rules page -- */
.community-rules-box {
    max-width: 820px;
    margin: 40px auto;
    padding: 32px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    color: #e5e7eb;
    font-family: 'Inter', sans-serif;
}

.community-rules-box h2 {
    color: #D4A843;
    font-size: 1.6rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin: 0 0 14px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid #1e293b;
    text-align: center;
}

.community-rules-box .rules-intro {
    color: #cbd5e1;
    font-size: 0.96rem;
    text-align: center;
    margin-bottom: 24px;
    padding: 14px;
    background: rgba(212, 168, 67, 0.08);
    border-left: 3px solid #D4A843;
    border-radius: 4px;
}

.community-rules-box .rules-list {
    list-style: none;
    padding: 0;
    counter-reset: rule-counter;
    margin: 0 0 20px 0;
}

.community-rules-box .rules-list li {
    counter-increment: rule-counter;
    padding: 16px 16px 16px 60px;
    position: relative;
    margin-bottom: 12px;
    background: #131c2f;
    border: 1px solid #1e293b;
    border-radius: 6px;
    line-height: 1.7;
    color: #cbd5e1;
    font-size: 0.96rem;
}

.community-rules-box .rules-list li::before {
    content: counter(rule-counter);
    position: absolute;
    left: 16px;
    top: 16px;
    width: 32px;
    height: 32px;
    background: #D4A843;
    color: #0f172a;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-size: 0.95rem;
    font-weight: 700;
}

.community-rules-box .rules-list li strong {
    color: #D4A843;
    font-size: 1.02rem;
    display: inline-block;
    margin-right: 4px;
}

.community-rules-box .rules-footer {
    padding: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #1e293b;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.86rem;
    text-align: center;
    margin: 0;
}

/* -- Responsive -- */
@media (max-width: 960px) {
    .bbp-forum-override .bbp-layout-grid {
        grid-template-columns: 1fr;
    }
    .community-sidebar {
        order: 2;
    }
}

@media (max-width: 640px) {
    .bbp-forum-override {
        padding: 14px;
        margin: 20px auto;
    }
    #bbpress-forums li.bbp-header {
        font-size: 0.82rem;
        padding: 10px;
    }
    #bbpress-forums a.bbp-forum-title,
    #bbpress-forums a.bbp-topic-permalink {
        font-size: 0.94rem;
    }
    .community-rules-box {
        padding: 20px;
    }
    .community-rules-box .rules-list li {
        padding: 14px 14px 14px 56px;
        font-size: 0.9rem;
    }
    .community-rules-box h2 {
        font-size: 1.3rem;
    }
}
/* ===== end Agent 14 ===== */
