/* TipTap Rich Text Editor Styles */

.tiptap-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    overflow: hidden;
}

.tiptap-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.tiptap-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.15s;
}

.tiptap-toolbar button:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.tiptap-toolbar button.is-active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.tiptap-toolbar .separator {
    width: 1px;
    height: 1.5rem;
    background: #d1d5db;
    margin: 0 0.25rem;
    align-self: center;
}

/* ProseMirror editor area */
.tiptap-editor {
    min-height: 150px;
    padding: 0.75rem 1rem;
}

.tiptap-editor .ProseMirror {
    outline: none;
    min-height: 120px;
}

.tiptap-editor .ProseMirror > * + * {
    margin-top: 0.75em;
}

.tiptap-editor .ProseMirror p {
    margin-bottom: 0.5rem;
}

.tiptap-editor .ProseMirror h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tiptap-editor .ProseMirror h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tiptap-editor .ProseMirror h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tiptap-editor .ProseMirror ul,
.tiptap-editor .ProseMirror ol {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.tiptap-editor .ProseMirror ul {
    list-style-type: disc;
}

.tiptap-editor .ProseMirror ol {
    list-style-type: decimal;
}

.tiptap-editor .ProseMirror a {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
}

.tiptap-editor .ProseMirror blockquote {
    border-left: 3px solid #d1d5db;
    padding-left: 1rem;
    color: #6b7280;
    font-style: italic;
}

.tiptap-editor .ProseMirror hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

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