/* Community Forum add-on styles. Tailwind handles layout; these rules add
   the forum-specific surfaces, focus states, and long-form post typography. */

.community-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .16) 0, transparent 36%),
                      radial-gradient(circle at 82% 76%, rgba(255, 255, 255, .12) 0, transparent 30%);
    pointer-events: none;
}

.forum-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px -18px rgba(17, 24, 39, .28);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.forum-topic-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 14px 26px -20px rgba(79, 70, 229, .45);
}

.forum-topic-link:focus-visible,
.forum-card a:focus-visible,
.forum-pill:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.forum-thread-row {
    transition: background-color .15s ease;
}

.forum-thread-row:hover {
    background: #f8faff;
}

.forum-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 9999px;
    padding: .3rem .7rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: #eef2ff;
    color: #4338ca;
    white-space: nowrap;
}

.forum-pill-amber { background: #fffbeb; color: #b45309; }
.forum-pill-gray { background: #f3f4f6; color: #4b5563; }
.forum-pill-emerald { background: #ecfdf5; color: #047857; }
.forum-pill-indigo { background: #eef2ff; color: #4338ca; }

.forum-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .02em;
    flex: none;
}

.forum-avatar-lg {
    width: 3rem;
    height: 3rem;
    font-size: .95rem;
}

.forum-prose {
    color: #374151;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.forum-prose a {
    color: #4f46e5;
    text-decoration: underline;
}

.forum-prose p + p {
    margin-top: .85rem;
}

#community-poll-title {
    scroll-margin-top: 6rem;
}

@media (prefers-reduced-motion: reduce) {
    .forum-card,
    .forum-topic-link,
    .forum-thread-row {
        transition: none;
    }
    .forum-topic-link:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .forum-card {
        border-radius: .85rem;
    }
    .forum-avatar {
        width: 2.25rem;
        height: 2.25rem;
        font-size: .72rem;
    }
}
