/* Thread pages (/t/123) and the New Thread page. The page frame below repeats the few forum.css rules
   these pages use, so they don't have to download all of forum.css. */

.Forum {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}
.ForumTop {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.Breadcrumb span:not([id]) {
    margin: 0 4px;
    color: var(--muted);
}
.IconBtn {
    display: inline-grid;
    place-items: center;
    font-size: 15px;
    line-height: 1;
}
.ThreadTag {
    margin-right: 6px;
    padding: 0 6px;
    background: var(--header);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ForumPost {
    display: grid;
    grid-template-columns: 150px 1fr;
    margin-bottom: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}
/* Author block: picture, then username, then rank. */
.PostAuthor {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 6px;
    padding: 16px 10px;
    background: var(--panel-alt);
    border-right: 1px solid var(--border);
    text-align: center;
}
.PostAvatar {
    width: 72px;
    height: 72px;
    overflow: hidden;
    background: var(--header);
    border-radius: 50%;
}
.PostAvatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.PostAuthor .User {
    overflow-wrap: anywhere;
}
.PostAuthor .User:not([data-rank]) {
    color: var(--text);
}
.RoleBadge {
    --rank: var(--muted);
    padding: 1px 8px;
    background: color-mix(in srgb, var(--rank) 15%, var(--header));
    border: 1px solid color-mix(in srgb, var(--rank) 60%, transparent);
    border-radius: 10px;
    color: color-mix(in srgb, var(--rank), var(--text) 25%);
    font-size: 12px;
    font-weight: 600;
}
.RoleBadge.Staff {
    --fill: color-mix(in srgb, var(--rank) 15%, var(--header));
    padding: 0 7px;
    background:
        linear-gradient(var(--fill), var(--fill)) padding-box,
        linear-gradient(90deg, var(--rank), color-mix(in srgb, var(--rank), white 55%), var(--rank),
            color-mix(in srgb, var(--rank), black 40%), var(--rank)) border-box;
    background-size: 100% 100%, 200% 100%;
    border: 2px solid transparent;
    animation: rankBorder 3s linear infinite;
}
@keyframes rankBorder {
    to {
        background-position: 0 0, 200% 0;
    }
}

.PostBody {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding: 14px 16px;
}
.PostText {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.PostMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}
.PostMeta button {
    padding: 0;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 12px;
}
.PostMeta button:hover {
    color: var(--accent);
}
.PostAura {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.PostMeta .AuraVote {
    opacity: 0.5;
}
.PostMeta .AuraVote:hover:not(:disabled),
.PostMeta .AuraVote[aria-pressed="true"] {
    opacity: 1;
}
.PostMeta .AuraVote:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.EditActions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.ReplyForm,
.NewThread,
.PostEdit {
    display: grid;
    gap: 10px;
}
.ReplyForm,
.NewThread {
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: 4px;
}
.NewThread h1 {
    margin: 0;
    font-size: 22px;
}
.Field {
    display: grid;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}
textarea {
    resize: vertical;
}
.ReplyForm > .Btn,
.NewThread > .Btn {
    justify-self: end;
    font-weight: 600;
}
.ThreadNote {
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 700px) {
    .ForumPost {
        grid-template-columns: 1fr;
    }
    .PostAuthor {
        grid-template-columns: auto auto 1fr;
        align-items: center;
        justify-items: start;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .PostAvatar {
        width: 40px;
        height: 40px;
    }
}
