/* SubForum listings
 =========================================================================== */

.subforum-listings {
    margin: 0;
    padding: 0;
}

.subforum-listings__item:nth-child(odd) {
    background-color: var(--subforum-listing-odd-bg);
    list-style-type: none;
}

.subforum-listings__item:nth-child(even) {
    background-color: var(--subforum-listing-even-bg);
    list-style-type: none;
}

.subforum-listings__item:not(:last-of-type) {
    border-bottom: var(--subforum-listing-border);
}

.subforum-listing {
    display: grid;
    grid-template-areas: 'figure header topics posts latest';
    grid-template-columns: 54px 1fr 72px 72px 360px;
    align-items: center;
    gap: 0 9px;
    padding: 9px;
    color: var(--panel-fg);
}

.subforum-listing__header {
    grid-area: header;
    font-size: 14px;
}

.subforum-listing__heading {
    margin: 0;
}

.subforum-listing__link {
    font-weight: bold;
}

.subforum-listing__description {
    font-size: 14px;
    margin: 0;
}

.subforum-listing__figure {
    grid-area: figure;
    padding: 5px;
    text-align: center;
}

.subforum-listing__icon {
    font-size: 18px;
}

.subforum-listing__topic-stats,
.subforum-listing__post-stats {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
}

.subforum-listing__topic-stats dt,
.subforum-listing__post-stats dt {
    font-weight: normal;
}

.subforum-listing__topic-stats dd,
.subforum-listing__post-stats dd {
    margin: 0;
}

.subforum-listing__topic-stats {
    grid-area: topics;
}

.subforum-listing__post-stats {
    grid-area: posts;
}

.subforum-listing__latest-topic {
    grid-area: latest;
    display: grid;
    grid-template-areas: 'heading heading' 'datetime author';
    grid-template-columns: auto 1fr;
}

.subforum-listing__latest-heading {
    grid-area: heading;
    font-size: 14px;
    white-space: nowrap;
    overflow-x: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.subforum-listing__latest-datetime {
    grid-area: datetime;
    font-size: 14px;
}

.subforum-listing__latest-author {
    grid-area: author;
    margin: 0 0 0 0.5ch;
    font-size: 14px;
    font-style: normal;
}

.subforum-listing__latest-author::before {
    content: '\00B7';
}

@media only screen and (max-width: 1720px) {
    .subforum-listing {
        grid-template-areas:
            'figure header header latest'
            'figure topics posts latest';
        grid-template-columns: 54px auto 1fr 288px;
    }

    .subforum-listing__topic-stats,
    .subforum-listing__post-stats {
        flex-direction: row;
    }

    .subforum-listing__topic-stats dt:after,
    .subforum-listing__post-stats dt:after {
        content: ':';
        margin-right: 0.5ch;
    }
}

@media only screen and (max-width: 767px) {
    .subforum-listing {
        grid-template-areas:
            'figure header header'
            'figure topics posts'
            'figure latest latest';
        grid-template-columns: 54px auto 1fr;
    }

    .subforum-listing__description {
        display: none;
    }

    .subforum-listing__latest-topic {
        margin-top: 5px;
    }
}
