.forum-editor [role="toolbar"] button {
    border-radius: .375rem;
    background: #fff;
    padding: .35rem .55rem;
    font-size: .8rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgb(0 0 0 / .08);
}

.forum-editor [role="toolbar"] button:hover,
.forum-editor [role="toolbar"] label:hover {
    background: #eef2ff;
    color: #4338ca;
}

.forum-editor-surface:empty::before {
    color: #9ca3af;
    content: "Напишите сообщение…";
    pointer-events: none;
}

.forum-editor-surface.drag-active {
    background: #eef2ff;
    outline: 2px dashed #6366f1;
}

.forum-post-body p,
.forum-editor-surface p {
    margin: .55rem 0;
}

.forum-post-body h2,
.forum-editor-surface h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 1rem 0 .5rem;
}

.forum-post-body h3,
.forum-editor-surface h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: .9rem 0 .45rem;
}

.forum-post-body ul,
.forum-editor-surface ul {
    list-style: disc;
    margin: .6rem 0 .6rem 1.5rem;
}

.forum-post-body ol,
.forum-editor-surface ol {
    list-style: decimal;
    margin: .6rem 0 .6rem 1.5rem;
}

.forum-post-body blockquote,
.forum-editor-surface blockquote {
    border-left: 4px solid #a5b4fc;
    color: #4b5563;
    margin: .75rem 0;
    padding: .5rem .8rem;
}

.forum-post-body a,
.forum-editor-surface a {
    color: #4338ca;
    text-decoration: underline;
}

.forum-mention-picker {
    position: absolute;
    z-index: 30;
    right: .75rem;
    left: .75rem;
    max-height: 18rem;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: .75rem;
    background: #fff;
    padding: .4rem;
    box-shadow: 0 16px 38px rgb(15 23 42 / 18%);
}

.forum-mention-picker__heading,
.forum-mention-picker__hint {
    padding: .55rem .7rem;
    color: #6b7280;
    font-size: .8rem;
}

.forum-mention-picker__heading {
    color: #374151;
    font-weight: 700;
}

.forum-mention-result {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .75rem;
    border-radius: .55rem;
    padding: .65rem .7rem;
    text-align: left;
}

.forum-mention-result:hover,
.forum-mention-result.is-active {
    background: #eef2ff;
}

.forum-mention-result img {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    border-radius: 9999px;
    object-fit: cover;
}

.forum-mobile-navigation {
    position: relative;
    flex: 0 0 auto;
}

.forum-mobile-navigation > summary {
    display: flex;
    width: 2.75rem;
    height: 2.75rem;
    cursor: pointer;
    list-style: none;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #1f2937;
}

.forum-mobile-navigation > summary::-webkit-details-marker {
    display: none;
}

.forum-mobile-navigation > summary:hover,
.forum-mobile-navigation > summary:focus-visible,
.forum-mobile-navigation[open] > summary {
    background: #eef2ff;
    color: #4338ca;
    outline: none;
}

.forum-mobile-navigation > summary:focus-visible {
    box-shadow: 0 0 0 3px rgb(99 102 241 / 30%);
}

.forum-mobile-navigation > summary svg {
    width: 1.5rem;
    height: 1.5rem;
}

.forum-mobile-navigation__panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + .6rem);
    right: 0;
    width: min(20rem, calc(100vw - 2.5rem));
    max-height: min(32rem, calc(100vh - 11rem));
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
    background: #fff;
    padding: .75rem;
    box-shadow: 0 18px 45px rgb(15 23 42 / 20%);
}

.forum-mobile-navigation__title {
    display: block;
    padding: .3rem .45rem .65rem;
    color: #111827;
    font-size: .9rem;
}

.forum-mobile-navigation__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

.forum-mobile-navigation__link {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    border-radius: .65rem;
    background: #f3f4f6;
    padding: .55rem .65rem;
    color: #1f2937;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
}

.forum-mobile-navigation__link:hover,
.forum-mobile-navigation__link:focus-visible {
    background: #eef2ff;
    color: #4338ca;
    outline: none;
}

.forum-mobile-navigation__link--moderation {
    background: #fef2f2;
    color: #991b1b;
}

.forum-mobile-navigation__link--create {
    background: #4338ca;
    color: #fff;
}

.forum-mobile-navigation__link--create:hover,
.forum-mobile-navigation__link--create:focus-visible {
    background: #3730a3;
    color: #fff;
}

@media (max-width: 767px) {
    .forum-mention-picker {
        right: .4rem;
        left: .4rem;
        max-height: 14rem;
    }
}
