/* TipTap / ProseMirror + toolbar spacing (legacy toolbar class names in markup) */
.tiptap-root {
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.tiptap-root .tiptap.ProseMirror {
    min-height: 120px;
    padding: 12px 15px;
    outline: none;
}

.tiptap-root .tiptap.ProseMirror p {
    margin: 0 0 0.5em;
}

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

.tiptap-root .tiptap.ProseMirror img {
    max-width: 100%;
    height: auto;
}

.tiptap-root .tiptap.ProseMirror a {
    color: #06c;
}

/* Placeholder (TipTap Placeholder extension) */
.tiptap-root .tiptap.ProseMirror p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: #adb5bd;
    pointer-events: none;
    height: 0;
}

/* Toolbar rows (reuse .ql-formats from existing markup) */
#toolbar.ql-toolbar,
.ql-toolbar {
    border: 1px solid #ccc;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 4px 4px 0 0;
    background: #fafafa;
}

.ql-toolbar + .tiptap-root,
.ql-toolbar + #editor.tiptap-root {
    border-top: 0;
    border-radius: 0 0 4px 4px;
}

.ql-toolbar .ql-formats {
    margin-right: 15px;
}

.ql-toolbar button {
    width: 28px;
    height: 24px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.ql-toolbar button .fa-solid {
    font-size: 0.95rem;
    line-height: 1;
}

.ql-toolbar button:hover {
    border-color: #ccc;
    border-radius: 3px;
}
