.thread {
    padding: 0;
    margin-bottom: 32px;
    contain: content;

    .top-open-button {
        margin: 8px auto 0 8px;
    }

    .bottom-open-button {
        margin: 8px auto 8px 8px;
    }

    .subject {
        flex-grow: 1;

        span[class^="icon-"] {
            font-size: 16px;
            margin-right: 4px;
        }
    }

    .thread-meta {
        overflow: hidden;
        gap: 0 16px;
        font-size: 0.8em;
        color: var(--meta-info-color);
        margin: 8px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        user-select: none;

        .board-link {
            color: var(--meta-info-color);
            margin-right: auto;
            padding: 4px 0;
            display: flex;
            width: 100%;

            &:hover {
                color: var(--link-color);
            }
        }

        .stats,
        .functions {
            display: flex;
            flex-wrap: wrap;
        }

        .stats {
            gap: 8px;
            > span {
                display: flex;
                gap: 4px;
                align-items: center;
                [class*="icon-"] {
                    font-size: 1.2em;
                }
            }
        }

        .functions {
            margin-left: auto;
            gap: 4px;

            [class*="icon-"] {
                font-size: 20px;
            }
        }
    }
}

/* Hidden threads */
.threads,
.thread-stubs {
    .thread.hidden {
        position: relative;
    }

    &:not([data-view="hidden"]) .thread.hidden .thread-buttons {
        display: none;
    }
}

html:is(.page-thread, .page-board) .threads:not([data-view="hidden"]) .thread.hidden,
html:is(.page-thread, .page-board) .thread-stubs:not([data-view="hidden"]) .thread.hidden {
    width: 100%;

    &:not(:hover) {
        opacity: 0.4;
    }
    > *:not(button):not(.thread-buttons),
    > .post-form {
        display: none;
    }
}