/* Оболочка редактора форума (Tiptap) — тёмная панель в духе бывшего Quill Snow */

.forum-tiptap-wrap {
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(22, 20, 18, 0.96);
    overflow: hidden;
}

.forum-tiptap-toolbar-host {
    border-bottom: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(30, 28, 26, 0.98);
}

.forum-tiptap-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
}

.forum-tiptap-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.forum-tiptap-toolbar__btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(44, 42, 40, 0.95);
    color: #e8e4dc;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
}

.forum-tiptap-toolbar__btn:hover {
    border-color: rgba(212, 175, 55, 0.45);
    color: #fff;
}

.forum-tiptap-toolbar__btn.is-active {
    background: rgba(212, 175, 55, 0.22);
    border-color: rgba(212, 175, 55, 0.55);
    color: #ffe9a8;
}

.forum-tiptap-toolbar__sep {
    width: 1px;
    height: 22px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.forum-tiptap-toolbar__select {
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(44, 42, 40, 0.95);
    color: #e8e4dc;
    font-size: 0.82rem;
    padding: 0 8px;
}

.forum-tiptap-root {
    min-height: 220px;
}

.forum-tiptap-root--small {
    min-height: 140px;
}

.forum-tiptap-root .tiptap {
    min-height: inherit;
    padding: 14px 16px 18px;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #ebe6dc;
}

.forum-tiptap-root .tiptap.forum-tiptap-is-empty > p:first-child::before {
    content: attr(data-placeholder);
    float: left;
    height: 0;
    pointer-events: none;
    color: rgba(180, 172, 160, 0.45);
}

.forum-tiptap-root .tiptap p {
    margin: 0 0 0.6em;
}

.forum-tiptap-root .tiptap p:last-child {
    margin-bottom: 0;
}

.forum-tiptap-root .tiptap h1,
.forum-tiptap-root .tiptap h2,
.forum-tiptap-root .tiptap h3,
.forum-tiptap-root .tiptap h4 {
    color: #f0e6d2;
    margin: 0.6em 0 0.35em;
    font-weight: 700;
}

.forum-tiptap-root .tiptap a {
    color: #d4af37;
    text-decoration: underline;
}

.forum-tiptap-root .tiptap img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.forum-tiptap-root .tiptap pre {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    padding: 10px 12px;
    overflow-x: auto;
}

.forum-tiptap-root .tiptap blockquote {
    border-left: 3px solid rgba(212, 175, 55, 0.45);
    margin: 0.5em 0;
    padding-left: 12px;
    color: #cfc7bc;
}
