/*
* Filename: forum.css
* Directory: /www/css/
* Description: Forum-spesifikk frontendstil for fase 2.
* Language: Norwegian
* Copyright: Webmasterinfo.no
*/

.forum-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.forum-hero,
.forum-thread-hero,
.forum-compose-card,
.forum-list-card,
.forum-empty-panel,
.forum-post-card,
.forum-overview-grid .forum-category-card {
    background: linear-gradient(180deg, rgba(44, 62, 80, 0.96) 0%, rgba(31, 44, 58, 0.98) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

.forum-hero,
.forum-thread-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem;
    align-items: flex-start;
}

.forum-hero.compact {
    padding: 1.6rem 1.8rem;
}

.forum-eyebrow,
.forum-category-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f4b264;
}

.forum-hero h1,
.forum-thread-hero h1 {
    margin: 0.35rem 0 0.55rem 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
}

.forum-hero p,
.forum-thread-hero p,
.forum-category-card p,
.forum-empty-panel p,
.forum-post-meta,
.thread-meta-line,
.thread-last-author,
.forum-breadcrumb {
    color: var(--text-muted);
}

.forum-hero-actions,
.forum-thread-topbar-actions,
.forum-compose-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.forum-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.forum-category-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.forum-category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(223, 121, 2, 0.65);
    text-decoration: none;
}

.forum-category-topline {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.forum-category-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(223, 121, 2, 0.12);
    color: #f4b264;
    font-weight: 700;
}

.forum-category-card h2 {
    margin: 0;
    font-size: 1.35rem;
}

.forum-category-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
    color: #f2f4f7;
}

.forum-category-lastpost {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.forum-list-card {
    overflow: hidden;
}

.forum-list-head,
.forum-thread-row {
    display: grid;
    grid-template-columns: minmax(0, 2.6fr) minmax(120px, 1fr) minmax(120px, 0.9fr) minmax(160px, 1.1fr);
    gap: 1rem;
    align-items: center;
}

.forum-list-head {
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.05);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f4b264;
}

.forum-thread-row {
    padding: 1.2rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.thread-title-cell,
.thread-author-cell,
.thread-stats-cell,
.thread-last-cell {
    min-width: 0;
}

.thread-title-link {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.thread-title-link:hover {
    color: #f4b264;
    text-decoration: none;
}

.thread-stats-cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: #ecf0f1;
    font-size: 0.95rem;
}

.thread-last-cell {
    font-size: 0.92rem;
}

.thread-badges {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.thread-badges.big {
    margin-bottom: 0.8rem;
}

.thread-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-pinned {
    background: rgba(223, 121, 2, 0.18);
    color: #f7c27a;
}

.badge-locked {
    background: rgba(231, 76, 60, 0.16);
    color: #f39b8f;
}

.forum-breadcrumb {
    display: inline-block;
    margin-bottom: 0.45rem;
    text-decoration: none;
}

.forum-breadcrumb:hover {
    text-decoration: underline;
}

.forum-empty-panel {
    padding: 2rem;
    text-align: center;
}

.forum-empty-panel.inside-list {
    border-radius: 0;
    background: rgba(255,255,255,0.02);
    box-shadow: none;
}

.forum-thread-topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.forum-thread-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 0.75rem;
    min-width: 280px;
}

.forum-thread-hero-stats div {
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    text-align: center;
}

.forum-thread-hero-stats strong {
    display: block;
    font-size: 1.4rem;
    color: #fff;
}

.forum-thread-hero-stats span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.forum-post-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

.forum-post-card-main {
    border-left: 4px solid rgba(223, 121, 2, 0.8);
}

.forum-post-card-reply {
    margin-top: 1rem;
}

.forum-post-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-align: center;
}

.forum-post-user.compact {
    align-items: flex-start;
    text-align: left;
}

.forum-post-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
}

.forum-post-avatar.small {
    width: 72px;
    height: 72px;
}

.forum-post-author {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.forum-post-meta {
    margin-bottom: 0.8rem;
    font-size: 0.86rem;
}

.forum-post-body {
    font-size: 1rem;
    line-height: 1.8;
    color: #ecf0f1;
    word-break: break-word;
}

.thread-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.thread-role-badge.member { background: rgba(255,255,255,0.06); color: #dfe6e9; }
.thread-role-badge.moderator { background: rgba(52, 152, 219, 0.2); color: #8fd0ff; }
.thread-role-badge.admin { background: rgba(46, 204, 113, 0.18); color: #8cf0b4; }
.thread-role-badge.premium { background: rgba(241, 196, 15, 0.18); color: #f8dd7a; }

.forum-compose-card {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
    gap: 1.4rem;
    padding: 1.6rem;
}

.forum-compose-card.single-column {
    grid-template-columns: 1fr;
}

.forum-compose-sidebar {
    padding: 1rem 1.2rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
}

.forum-compose-sidebar h2,
.reply-box h2,
.forum-replies-section h2 {
    margin-top: 0;
}

.forum-compose-sidebar ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.forum-form-message {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.92rem;
}

.forum-form-message.success {
    background: rgba(46, 204, 113, 0.16);
    color: #91f0b8;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.forum-form-message.error {
    background: rgba(231, 76, 60, 0.14);
    color: #ffb3a7;
    border: 1px solid rgba(231, 76, 60, 0.28);
}

.forum-login-panel,
.forum-locked-panel {
    margin-top: 1rem;
}

@media (max-width: 980px) {
    .forum-hero,
    .forum-thread-hero,
    .forum-compose-card,
    .forum-post-card,
    .forum-thread-topbar {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .forum-thread-hero-stats,
    .forum-compose-card {
        width: 100%;
        min-width: 0;
    }

    .forum-post-card {
        grid-template-columns: 1fr;
    }

    .forum-post-user,
    .forum-post-user.compact {
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 760px) {
    .forum-list-head {
        display: none;
    }

    .forum-thread-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .forum-thread-hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}
