/* Lightweight forum module styles */
.forum-hero {
    background: #f0f9ff;
    border-bottom: 1px solid #bae6fd
}

.forum-hero .wrap {
    padding-top: 22px;
    padding-bottom: 20px
}

.forum-hero h1 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: clamp(1.6rem, 4vw, 2.4rem)
}

.forum-hero p {
    max-width: 820px;
    margin: 0;
    color: #334155
}

.forum-flash {
    margin-top: 14px;
    padding: 12px;
    border-radius: 8px;
    background: #ecfdf5;
    border-left: 4px solid #16a34a;
    font-weight: 700
}

.forum-flash.error {
    background: #fef2f2;
    border-left-color: #dc2626
}

.forum-shell {
    display: grid;
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 22px
}

.forum-grid {
    display: grid;
    gap: 14px
}

.forum-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr))
}

.forum-toolbar, .forum-panel, .forum-card, .forum-form, .forum-profile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06)
}

.forum-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px
}

.forum-toolbar .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.forum-btn, .forum-share a, .forum-share button, .forum-comment-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #0f172a;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none
}

.forum-btn.light {
    background: #e0f2fe;
    color: #075985
}

.forum-btn.warn {
    background: #b91c1c
}

.forum-btn:hover, .forum-share a:hover {
    text-decoration: none;
    filter: brightness(.96)
}

.forum-panel {
    padding: 14px
}

.forum-panel h2, .forum-panel h3 {
    margin-top: 0;
    color: #0f172a
}

.forum-categories {
    display: grid;
    gap: 10px
}

.forum-category-link {
    display: block;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #0f172a
}

.forum-category-link strong {
    display: block
}

.forum-category-link small {
    color: #475569
}

.forum-card {
    overflow: hidden
}

.forum-card-img, .forum-post-image {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    background: #f8fafc
}

.forum-card-body {
    padding: 14px
}

.forum-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: .88rem;
    flex-wrap: wrap
}

.forum-meta a {
    color: #b91c1c;
    font-weight: 800
}

.forum-card h2 {
    margin: 8px 0;
    font-size: 1.18rem;
    line-height: 1.25
}

.forum-card h2 a {
    color: #0f172a
}

.forum-card-foot {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: #475569;
    font-size: .9rem
}

.forum-author {
    font-weight: 900
}

.forum-form {
    padding: 14px
}

.forum-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 900;
    color: #0f172a
}

.forum-form input, .forum-form select, .forum-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px;
    margin-top: 5px;
    font: inherit;
    background: #fff
}

.forum-form textarea {
    min-height: 150px
}

.forum-form .help {
    color: #64748b;
    font-size: .88rem;
    margin: 4px 0 12px
}

.forum-post {
    background: #fff;
    border-bottom: 1px solid #e2e8f0
}

.forum-post .wrap {
    padding-top: 18px;
    padding-bottom: 18px
}

.forum-post h1 {
    margin: 8px 0;
    font-size: clamp(1.55rem, 4vw, 2.3rem);
    color: #0f172a
}

.forum-post-body {
    font-size: 1.04rem;
    color: #111827
}

.forum-post-body p {
    margin: 0 0 14px
}

.forum-share {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0
}

.forum-share a, .forum-share button {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1
}

.forum-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px
}

.forum-comments {
    display: grid;
    gap: 10px
}

.forum-comment {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px
}

.forum-comment.reply {
    margin-left: 18px;
    background: #f8fafc
}

.forum-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    color: #475569;
    font-size: .9rem
}

.forum-comment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px
}

.forum-comment-actions form {
    display: inline
}

.forum-comment-actions button {
    min-height: 32px;
    padding: 6px 10px;
    background: #e2e8f0;
    color: #0f172a
}

.forum-comment-edit {
    display: inline-block
}

.forum-comment-edit textarea {
    display: block;
    width: min(520px, 82vw);
    min-height: 90px;
    margin: 8px 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px;
    font: inherit
}

.forum-empty {
    padding: 16px;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569
}

.forum-profile-card {
    padding: 14px;
    display: flex;
    gap: 14px;
    align-items: center
}

.forum-avatar {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    background: #e2e8f0
}

.forum-status {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: .78rem;
    font-weight: 900
}

.forum-status.pending {
    background: #fef3c7;
    color: #92400e
}

.forum-status.hidden, .forum-status.blocked, .forum-status.deleted {
    background: #fee2e2;
    color: #991b1b
}

@media (min-width: 860px) {
    .forum-shell.has-sidebar {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start
    }
}

@media (max-width: 640px) {
    .forum-toolbar {
        align-items: flex-start;
        flex-direction: column
    }

    .forum-profile-card {
        align-items: flex-start
    }

    .forum-comment.reply {
        margin-left: 8px
    }

    .forum-btn, .forum-share a, .forum-share button {
        min-height: 36px;
        padding: 7px 10px
    }
}
