/* Toolbar */
.wysiwyg-toolbar {
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem;
    background: #f8f8fa;
    border-radius: 6px 6px 0 0; /* Only top corners rounded */
    border: 1px solid #ddd;
    border-bottom: none; /* Remove bottom border to merge with editor */
    margin-bottom: 0; /* ← Critical: remove any bottom margin */
}

.toolbar-group {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

/* Dropdown */
.toolbar-group select {
    padding: 0.3rem 0.6rem;
    border: 1px solid #ccc;
    background: white;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.toolbar-group select:focus {
    outline: none;
    border-color: #00bcd4;
}

/* Buttons */
.toolbar-group button {
    padding: 0.3rem 0.6rem;
    border: 1px solid #ccc;
    background: white;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    line-height: 1;
}

.toolbar-group button:hover {
    background: #f0f0f0;
    border-color: #00bcd4;
}

.toolbar-group button:active {
    background: #e0e0e0;
}

/* Editor */
.wysiwyg-editor {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 1rem;
    min-height: 200px;
    background: white;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.2;
    overflow: auto;
    outline: none;
    cursor: text;
    margin: 0;
}

.wysiwyg-editor:focus {
    border-color: #00bcd4;
    box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

/* Content styles */
.wysiwyg-editor h1 {
    font-size: 2rem;
    margin: 1em 0 0.5em;
    color: #0d2b5a;
}

.wysiwyg-editor h2 {
    font-size: 1.5rem;
    margin: 1em 0 0.5em;
    color: #0d2b5a;
}

.wysiwyg-editor h3 {
    font-size: 1.25rem;
    margin: 1em 0 0.5em;
    color: #0d2b5a;
}

.wysiwyg-editor p {
    margin: 0 0 1em 0;
}

.wysiwyg-editor ul,
.wysiwyg-editor ol {
    padding-left: 1.5em;
    margin: 1em 0;
}

.wysiwyg-editor a {
    color: #00bcd4;
    text-decoration: underline;
}

/* Alignments */
.wysiwyg-editor .ProseMirror {
    text-align: left;
}

.wysiwyg-editor .ProseMirror[data-align="center"] {
    text-align: center;
}

.wysiwyg-editor .ProseMirror[data-align="right"] {
    text-align: right;
}

/* Make sure ProseMirror doesn't add its own outline */
.wysiwyg-editor .ProseMirror {
    outline: none;
    min-height: inherit;
}
