/* Extracted from templates/community.html style block 1. */
/* 提问（主留言） */
.post-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-item.is-pinned {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.post-item .post-badge.post-badge-pin {
    background: #f59e0b;
}

.post-item .post-badge {
    display: inline-block;
    background: #2563eb;
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    font-weight: 500;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.post-author {
    font-weight: 600;
    color: #111827;
}

.post-time {
    font-size: 0.875rem;
    color: #6b7280;
}

.post-content {
    color: #374151;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 回答（回复） */
.post-replies {
    margin-top: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e5e7eb;
}

.reply-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #10b981;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.reply-item .reply-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    font-weight: 500;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reply-author { font-weight: 600; color: #065f46; font-size: 0.9rem; }
.reply-time { font-size: 0.8rem; color: #6b7280; }
.reply-content {
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
}

.reply-form {
    margin-top: 1rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
}

.post-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.post-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-form textarea {
    min-height: 120px;
    resize: vertical;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* 项目展示卡片 */
.community-projects-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}
.community-projects-section h5 {
    font-weight: 600;
    color: #334155;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}
.project-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    color: inherit;
}
.project-card {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    background: #fff;
    height: 100%;
}
.project-card .card-body {
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.project-card .project-title {
    font-weight: 500;
    color: #1e293b;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-card .project-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.project-card .badge {
    font-size: 0.75rem;
}

/* 分页 */
.community-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}
.community-pagination .page-link {
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
    border-radius: 6px;
}
.community-pagination .page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
}
.community-pagination .page-item.disabled .page-link {
    color: #94a3b8;
}
.pagination-info {
    font-size: 0.875rem;
    color: #64748b;
    margin-right: 0.5rem;
}

.community-hot-panel {
    display: none;
}
.community-hot-panel.is-visible {
    display: block;
}
