/* =============================================================
   ComposeEditor (mfv-*) - globaler WYSIWYG-Editor für freie Textblöcke
   Eigener Namespace damit kein Konflikt mit .compose-editor aus
   global-compose-window (= das schwebende Compose-Fenster).
   ============================================================= */

.mfv-ce-host {
    display: block;
    width: 100%;
}

.mfv-compose-editor {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Variablen-Chip-Reihe oberhalb der Toolbar */
.mfv-compose-editor .ce-variable-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
}

.mfv-compose-editor .ce-variable-label {
    color: #666;
    font-weight: 500;
    margin-right: 0.25rem;
}

.mfv-compose-editor .ce-variable-chip {
    background: #eef3f7;
    color: #2e7d32;
    border: 1px solid #cfd8dc;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.72rem;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: background 0.15s, border-color 0.15s;
}

.mfv-compose-editor .ce-variable-chip:hover {
    background: #dfe7ed;
    border-color: #2e7d32;
}

.mfv-compose-editor .mfv-ce-toolbar {
    flex-shrink: 0;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.mfv-compose-editor .mfv-ce-content {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cfd8dc;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    font-family: inherit;
    background: #fff;
    outline: none;
    max-height: 400px;
    box-sizing: border-box;
}

.mfv-compose-editor .mfv-ce-content:focus {
    border-color: var(--primary-green, #2e7d32);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.mfv-compose-editor .mfv-ce-content:empty::before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
    display: block;
}

.mfv-compose-editor .mfv-ce-content p {
    margin: 0 0 0.5rem 0;
}

.mfv-compose-editor .mfv-ce-content p:last-child {
    margin-bottom: 0;
}
