/* TipTap Editor Heading Styles */
.tiptap-content h1,
.ProseMirror h1 {
    font-size: 1.6rem;
    line-height: 1.2;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.tiptap-content h2,
.ProseMirror h2 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-top: 0.875rem;
    margin-bottom: 0.5rem;
}

.tiptap-content h3,
.ProseMirror h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

/* TipTap Editor Table Styles */
.tiptap-content table,
.ProseMirror table {
    border-collapse: collapse;
    margin: 1rem 0;
    overflow: hidden;
    table-layout: fixed;
    width: 100%;
}

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

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

.tiptap-content .selectedCell:after,
.ProseMirror .selectedCell:after {
    background: rgba(59, 130, 246, 0.2);
    content: "";
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

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

.tiptap-content .resize-cursor,
.ProseMirror .resize-cursor {
    cursor: col-resize;
}

/* Table controls */
.tableWrapper {
    overflow-x: auto;
}

/* Additional prose table overrides if needed */
.prose table {
    border-collapse: collapse !important;
}

.prose thead th {
    border-bottom: 2px solid #e5e7eb !important;
}

.prose tbody tr {
    border-bottom: 1px solid #e5e7eb !important;
}

.prose tbody tr:last-child {
    border-bottom: 0 !important;
}

/* AI Suggestion Styles */
.tiptap-ai-suggestion {
    border-bottom: 2px solid var(--tiptap-ai-suggestion-color);
    margin-bottom: -2px;
    cursor: pointer;
    position: relative;
}

.tiptap-ai-suggestion:hover {
    background-color: var(--tiptap-ai-suggestion-background-color, #f0f0f0);
}

/* AI Suggestion Menu */
.tiptap-ai-suggestion-menu {
    position: absolute;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    z-index: 50;
}

.tiptap-ai-suggestion-item {
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tiptap-ai-suggestion-item:hover {
    background-color: #f3f4f6;
}

.tiptap-ai-suggestion-item-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}