/**
 * Forum Styles - Black and White Minimalist Design
 */

/* Container */
.we-forum-container {
    margin-top: 30px;
    background: #ffffff;
}

/* Sidebar - 增加特异性防止被全局CSS覆盖 */
.we-forum-container .we-sidebar {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.we-forum-container .sidebar-header {
    background: #000000;
    color: #ffffff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.we-forum-container .sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.we-forum-container .sidebar-menu {
    padding: 10px 0;
}

.we-forum-container .menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333333 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff !important;
}

.we-forum-container .menu-item:hover {
    background: #f5f5f5 !important;
    color: #000000 !important;
}

.we-forum-container .menu-item.active {
    background: #000000 !important;
    color: #ffffff !important;
    border-left: 3px solid #ffffff;
}

.we-forum-container .menu-item i {
    width: 24px;
    margin-right: 10px;
    color: inherit !important;
}

.we-forum-container .menu-item .badge {
    margin-left: auto;
    background: #000000;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* TinyMCE Editor Styles */
textarea.tinyMCE {
    min-height: 500px;
    font-size: 14px;
    line-height: 1.6;
}

.mce-tinymce {
    box-sizing: border-box;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
}

.mce-edit-area iframe {
    min-height: 500px !important;
}

/* Form Styles for Create Post */
.create-post-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8e8e8;
    margin-top: 0;
}

.create-post-form .form-group {
    margin-bottom: 20px;
}

.create-post-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.create-post-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.create-post-form .form-control:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

.create-post-form .form-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8e8e8;
}

.create-post-form .form-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* Content Area */
.forum-content {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #000000;
}

.section-title i {
    margin-right: 10px;
    color: #000000;
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.post-item:hover {
    border-color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-info {
    flex: 1;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
}

.post-title:hover {
    color: #666666;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #888888;
}

.post-meta span {
    display: flex;
    align-items: center;
}

.post-meta i {
    margin-right: 5px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.badge-pinned {
    background: #000000;
    color: #ffffff;
}

.badge-locked {
    background: #333333;
    color: #ffffff;
}

/* Forum Actions */
.forum-actions {
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
}

.btn-primary:hover {
    background: #333333;
    color: #ffffff;
}

.btn-default {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

.btn-default:hover {
    background: #000000;
    color: #ffffff;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-danger {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.btn-danger:hover {
    background: #333333;
}

/* Breadcrumb */
.forum-breadcrumb {
    display: flex;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #888888;
    border-bottom: 1px solid #e0e0e0;
}

.forum-breadcrumb a {
    color: #000000;
    text-decoration: none;
}

.forum-breadcrumb a:hover {
    color: #666666;
}

.forum-breadcrumb i {
    margin: 0 10px;
    font-size: 12px;
}

.forum-breadcrumb span {
    color: #000000;
    font-weight: 600;
}

/* Category Header */
.category-header {
    margin-bottom: 30px;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.category-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 10px 0;
}

.category-info h1 i {
    margin-right: 10px;
}

.category-actions {
    display: flex;
    gap: 10px;
}

.category-description {
    color: #666666;
    font-size: 15px;
    line-height: 1.6;
}

/* Post Styles */
.post-detail {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
}

.post-header {
    padding: 25px;
    border-bottom: 2px solid #000000;
}

.post-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.post-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-author {
    display: flex;
    align-items: center;
}

.post-author .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
}

.post-author .author-name {
    font-weight: 600;
    color: #000000;
}

.post-author .post-time {
    display: block;
    font-size: 13px;
    color: #888888;
    margin-top: 4px;
}

.post-stats {
    display: flex;
    gap: 20px;
    color: #888888;
    font-size: 14px;
}

.post-stats span {
    display: flex;
    align-items: center;
}

.post-stats i {
    margin-right: 5px;
}

.post-body {
    padding: 30px;
    line-height: 1.8;
    color: #333333;
    font-size: 16px;
}

/* Reply Form */
.reply-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.reply-form h3 {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    color: #333333;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Replies List */
.replies-list {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

.replies-list h3 {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.reply-item {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.reply-item:last-child {
    border-bottom: none;
}

.reply-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.reply-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reply-content {
    flex: 1;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.reply-author {
    display: flex;
    flex-direction: column;
}

.reply-author .author-name {
    font-weight: 600;
    color: #000000;
}

.reply-time {
    font-size: 13px;
    color: #888888;
}

.reply-actions {
    display: flex;
    gap: 8px;
}

.reply-body {
    line-height: 1.6;
    color: #333333;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.page-link.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888888;
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 20px;
    color: #000000;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Form Styles */
.create-post-form,
.edit-post-form,
.create-category-form,
.edit-category-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.form-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000000;
}

.form-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 10px 0;
}

.form-header p {
    color: #666666;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-info {
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 20px;
}

.form-info p {
    margin: 5px 0;
    color: #666666;
}

/* Locked Notice */
.locked-notice {
    text-align: center;
    padding: 40px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 30px;
}

.locked-notice i {
    font-size: 48px;
    color: #000000;
    margin-bottom: 15px;
}

.locked-notice p {
    color: #666666;
    font-size: 16px;
}

/* Login Notice */
.login-notice {
    text-align: center;
    padding: 40px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Small Utilities */
.avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.text-muted {
    color: #888888;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .we-forum-container {
        padding: 10px 0;
    }
    
    .forum-content {
        padding: 20px;
    }
    
    .post-item {
        flex-direction: column;
    }
    
    .post-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .category-header {
        text-align: center;
    }
    
    .category-info {
        flex-direction: column;
        align-items: center;
    }
    
    .category-actions {
        margin-top: 15px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
