.report-popover {
    position: relative;
    display: inline-flex;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1;
}

.report-popover[open] {
    z-index: 40;
}

.report-popover-trigger {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-button);
    background: var(--color-surface-strong);
    color: var(--color-muted);
    padding: 0 12px;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.report-popover-trigger::-webkit-details-marker {
    display: none;
}

.report-popover-trigger:hover,
.report-popover[open] .report-popover-trigger {
    color: var(--color-ink);
}

.report-popover-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    width: min(320px, calc(100vw - 24px));
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    background: var(--panel-bg);
    padding: 12px;
    box-shadow: var(--panel-shadow);
}

.report-popover-form {
    display: grid;
    max-width: none;
    gap: 10px;
    margin: 0;
}

.report-popover-form label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.report-popover-form label span {
    color: var(--color-muted);
    font-size: 12px;
}

.report-popover-form select,
.report-popover-form input {
    width: 100%;
    min-height: 38px;
    font-size: 13px;
}

.report-popover-actions {
    display: flex;
    justify-content: flex-end;
}

.report-popover-actions .button-primary {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

.theme-topic-detail-side-meta .report-popover-trigger,
.theme-reply-corner-actions .report-popover-trigger {
    min-height: 28px;
    background: transparent;
    padding: 0;
}

.theme-reply-corner-actions .report-popover-panel {
    width: min(320px, calc(100vw - 48px));
}

@media (max-width: 720px) {
    .report-popover-panel {
        position: fixed;
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
    }

    .report-popover-actions .button-primary {
        width: 100%;
    }
}
