.thread-mod-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 14px;
}

.thread-mod-menu {
    position: relative;
}

.thread-mod-menu > summary {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    list-style: none;
    gap: 8px;
}

.thread-mod-menu > summary::-webkit-details-marker {
    display: none;
}

.thread-mod-menu > summary::after {
    content: "▾";
}

.thread-mod-menu:not([open]) > .thread-mod-dropdown {
    display: none;
}

.thread-mod-menu > .thread-mod-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 100;
    width: min(280px, calc(100vw - 32px));
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.3);
    max-height: 65vh;
    overflow-y: auto;
}

.thread-mod-dropdown > form {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
}

.thread-mod-dropdown .thread-mod-option {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    text-align: left;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.thread-mod-dropdown .thread-mod-option:hover {
    background: rgba(128,128,128,.15);
}

.thread-mod-posts {
    padding: 10px 12px;
    border-top: 1px solid rgba(128,128,128,.2);
    font-size: 13px;
}

.thread-mod-posts form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.thread-mod-posts select,
.thread-mod-posts textarea {
    width: 100%;
    min-width: 0;
}

.thread-mod-posts [hidden] {
    display: none !important;
}
