/*
 * Tiptap editor styling for the Xanti admin, used by /js/tiptap-xanti.js.
 * Tiptap ships no CSS (headless): this covers the toolbar, the content
 * area and the minimal ProseMirror requirements, Bootstrap 3/4/5 neutral.
 */

.tiptap-editor {
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.tiptap-toolbar {
    padding: 4px 6px;
    border-bottom: 1px solid #ccc;
    background: #f5f5f5;
    border-radius: 4px 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.tiptap-toolbar button {
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    padding: 4px 6px;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

.tiptap-toolbar button:hover {
    background: #e6e6e6;
    border-color: #ccc;
}

.tiptap-toolbar button:disabled {
    opacity: 0.35;
    cursor: default;
    background: transparent;
    border-color: transparent;
}

.tiptap-toolbar button.active {
    background: #d8d8d8;
    border-color: #bbb;
}

.tiptap-toolbar select {
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    padding: 3px 4px;
    margin: 0 2px;
}

.tiptap-separator {
    display: inline-block;
    width: 1px;
    height: 18px;
    margin: 0 4px;
    background: #ccc;
}

.tiptap-content {
    padding: 8px 12px;
    overflow-y: auto;
}

/* minimal ProseMirror requirements (the bundle ships no CSS): */
.tiptap-content .ProseMirror {
    white-space: pre-wrap;
    outline: none;
    min-height: inherit;
}

.tiptap-content .ProseMirror-selectednode {
    outline: 2px solid #049cdb;
}

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

.tiptap-content table {
    border-collapse: collapse;
    width: 100%;
}

.tiptap-content th,
.tiptap-content td {
    border: 1px solid #ccc;
    padding: 4px 6px;
    vertical-align: top;
}

.tiptap-content th {
    background: #f5f5f5;
}

.tiptap-content blockquote {
    border-left: 3px solid #ccc;
    margin-left: 0;
    padding-left: 12px;
    color: #555;
}
