/* QGabarito | Comunidade compacta premium | 2026-09-11 */

.comment-community-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 14px 0 16px;
}

.comment-sort-control {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .86rem;
}

.comment-sort-control > span {
    color: var(--muted, #667085);
    margin-right: 2px;
}

.comment-sort-control a,
.comment-moderation-mode-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--border, #d8dee7);
    border-radius: 999px;
    color: var(--text, #18324f);
    text-decoration: none;
    background: var(--surface, #fff);
    font-weight: 650;
    line-height: 1.2;
}

.comment-sort-control a:hover,
.comment-moderation-mode-toggle:hover {
    border-color: var(--brand, #173f6f);
}

.comment-sort-control a.is-active,
.comment-moderation-mode-toggle.is-active {
    border-color: var(--brand, #173f6f);
    box-shadow: inset 0 0 0 1px var(--brand, #173f6f);
}

.comment-moderation-mode-toggle {
    font-size: .82rem;
}

.comment-moderation-mode-banner {
    display: flex;
    gap: 8px 12px;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px dashed var(--border, #d8dee7);
    border-radius: 10px;
    color: var(--muted, #667085);
    font-size: .84rem;
}

.comment-moderation-mode-banner strong {
    color: var(--text, #18324f);
}

.comment-thread-replies {
    margin-top: 10px;
    border-top: 1px solid var(--border, #e1e6ec);
    padding-top: 8px;
}

.comment-thread-replies > summary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    cursor: pointer;
    list-style: none;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 9px;
    color: var(--brand, #173f6f);
    font-size: .84rem;
    font-weight: 700;
    user-select: none;
}

.comment-thread-replies > summary::-webkit-details-marker {
    display: none;
}

.comment-thread-replies > summary:hover {
    background: var(--surface-soft, rgba(15, 23, 42, .04));
}

.comment-thread-chevron {
    display: inline-block;
    transform: rotate(0deg);
    transition: transform .16s ease;
    font-size: 1.05em;
}

.comment-thread-replies[open] .comment-thread-chevron {
    transform: rotate(90deg);
}

.comment-thread-label-open {
    display: none;
}

.comment-thread-replies[open] .comment-thread-label-closed {
    display: none;
}

.comment-thread-replies[open] .comment-thread-label-open {
    display: inline;
}

.comment-thread-professor-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid var(--border, #d8dee7);
    border-radius: 999px;
    color: var(--text, #18324f);
    background: var(--surface, #fff);
    font-size: .74rem;
    font-weight: 700;
}

.comment-thread-replies > .public-comment-replies {
    position: relative;
    margin: 8px 0 0 14px;
    padding-left: 17px;
}

.comment-thread-replies > .public-comment-replies::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 3px;
    bottom: 3px;
    width: 1px;
    background: var(--border, #e1e6ec);
}

.comment-thread-item {
    position: relative;
    margin: 0 0 9px;
}

.comment-thread-item::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 24px;
    width: 12px;
    height: 1px;
    background: var(--border, #e1e6ec);
}

.comment-thread-item[hidden] {
    display: none !important;
}

.comment-thread-item .public-comment {
    margin: 0;
}

.comment-thread-item.has-teacher-reply .public-comment {
    box-shadow: inset 3px 0 0 var(--brand, #173f6f);
}

.comment-thread-load-more {
    margin: 4px 0 2px 31px;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: var(--brand, #173f6f);
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}

.comment-thread-load-more:hover {
    text-decoration: underline;
}

.comment-tombstone-minimal {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 2px 0 1px;
    color: var(--muted, #667085);
    font-size: .8rem;
    font-style: italic;
}

.public-comment.is-compact-tombstone {
    padding-top: 10px;
    padding-bottom: 10px;
}

.public-comment.is-compact-tombstone.is-marker-suppressed {
    border-style: dashed;
    background: transparent;
}

.public-comment.is-compact-tombstone.is-marker-suppressed > .comment-thread-replies {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

.public-comment-deleted.is-moderation-view {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--muted, #667085);
    font-size: .82rem;
}

.public-comment-deleted.is-moderation-view strong {
    color: var(--text, #18324f);
}

.public-comment-deleted-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border, #e1e6ec);
}

.comment-moderation-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid var(--border, #d8dee7);
    border-radius: 999px;
    font-size: .7rem;
    color: var(--text, #18324f);
}

.comment-moderation-chip.is-muted {
    color: var(--muted, #667085);
}

@media (max-width: 640px) {
    .comment-community-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-sort-control,
    .comment-moderation-mode-toggle {
        width: 100%;
        box-sizing: border-box;
    }

    .comment-thread-replies > summary {
        width: 100%;
        box-sizing: border-box;
    }

    .comment-thread-replies > .public-comment-replies {
        margin-left: 4px;
        padding-left: 13px;
    }

    .comment-thread-item::before {
        left: -11px;
        width: 8px;
    }

    .comment-thread-load-more {
        margin-left: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .comment-thread-replies > summary,
    .comment-thread-chevron {
        transition: none;
    }
}

.comment-removed-audit-body {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border, #dfe5ec);
    border-radius: 10px;
    background: var(--surface-soft, #f8fafc);
}

.comment-removed-audit-label {
    margin-bottom: 6px;
    color: var(--muted, #667085);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.comment-removed-audit-text {
    color: var(--text, #18324f);
    line-height: 1.55;
    white-space: normal;
}

.comment-removed-audit-meta,
.comment-removed-audit-unavailable {
    margin-top: 7px;
    color: var(--muted, #667085);
    font-size: .78rem;
}
