/* TipTap Editor Styles */

.ProseMirror {
    outline: none;
}

.ProseMirror p {
    margin: 0.5em 0;
}

.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3,
.ProseMirror h4,
.ProseMirror h5,
.ProseMirror h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

.ProseMirror h1 {
    font-size: 2em;
}

.ProseMirror h2 {
    font-size: 1.5em;
}

.ProseMirror h3 {
    font-size: 1.25em;
}

.ProseMirror ul,
.ProseMirror ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

.ProseMirror li {
    margin: 0.25em 0;
}

.ProseMirror a {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
}

.ProseMirror a:hover {
    color: #1d4ed8;
}

.ProseMirror img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1em 0;
}

.ProseMirror blockquote {
    padding-left: 1em;
    border-left: 3px solid #e5e7eb;
    margin: 1em 0;
    color: #6b7280;
}

.ProseMirror code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.ProseMirror pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1em 0;
}

.ProseMirror pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.ProseMirror hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2em 0;
}

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

/* Image wrapper styles */
.ProseMirror .node-resizableImage {
    display: inline-block;
    max-width: 100%;
    position: relative;
}

/* Prevent image dragging interfering with resize */
.ProseMirror img {
    user-select: none;
    -webkit-user-drag: none;
}

/* Selection */
.ProseMirror ::selection {
    background-color: #dbeafe;
}

/* Tables */
.ProseMirror table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    margin: 1em 0;
    overflow: hidden;
}

.ProseMirror table td,
.ProseMirror table th {
    min-width: 1em;
    border: 1px solid #d1d5db;
    padding: 0.5em 1em;
    vertical-align: top;
    box-sizing: border-box;
    position: relative;
}

.ProseMirror table th {
    font-weight: 600;
    text-align: left;
    background-color: #f3f4f6;
}

.ProseMirror table .selectedCell {
    background-color: #dbeafe;
}

.ProseMirror table .column-resize-handle {
    position: absolute;
    right: -2px;
    top: 0;
    bottom: -2px;
    width: 4px;
    background-color: #3b82f6;
    pointer-events: none;
}
