/**
 * vtkcWysiwyg - WYSIWYG-Editor Styling (v3.11)
 * Pfad: system/wysiwyg.css
 *
 * Verwendet als Wrapper um eine bestehende <textarea>. Wenn der Editor
 * .vtkc-mailpopup-body-row's flex:1 erbt, wächst er automatisch mit.
 */

.vtkc-wysiwyg {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
}

.vtkc-wysiwyg-toolbar {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 4px 6px;
    gap: 2px;
}

.vtkc-wysiwyg-toolbar button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 5px 8px;
    cursor: pointer;
    color: #555;
    font-size: 13px;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.vtkc-wysiwyg-toolbar button:hover {
    background: #fff;
    border-color: #ccc;
    color: var(--farberand, #7B2A6E);
}

.vtkc-wysiwyg-toolbar button:active {
    background: #e8e8e8;
}

.vtkc-wysiwyg-toolbar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent !important;
    border-color: transparent !important;
    color: #888 !important;
}

/* Aktiver Quelltext-Toggle: visuell hervorgehoben */
.vtkc-wysiwyg-source-active {
    background: #e8e8e8 !important;
    border-color: #bbb !important;
    color: var(--farberand, #7B2A6E) !important;
}

/* Textarea im Quelltext-Modus: gleiche Maße wie der Editor, monospace */
.vtkc-wysiwyg textarea.vtkc-wysiwyg-source-mode {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    background: #fafafa;
    border: none;
    outline: none;
    min-height: 200px;
    resize: vertical;
}

.vtkc-wysiwyg-trenner {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: #ccc;
    margin: 0 4px;
}

.vtkc-wysiwyg-editor {
    flex: 1;
    overflow: auto;
    padding: 12px 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    min-height: 200px;
    outline: none;
}

.vtkc-wysiwyg-editor:focus {
    background: #fdfdfd;
}

/* Inhalt-Styling - das ist sichtbar als der User es tippt */
.vtkc-wysiwyg-editor p {
    margin: 0 0 8px 0;
}

.vtkc-wysiwyg-editor h2 {
    font-size: 18px;
    margin: 12px 0 8px 0;
    color: #333;
}

.vtkc-wysiwyg-editor ul,
.vtkc-wysiwyg-editor ol {
    margin: 0 0 8px 0;
    padding-left: 24px;
}

.vtkc-wysiwyg-editor li {
    margin-bottom: 4px;
}

.vtkc-wysiwyg-editor a {
    color: var(--farberand, #7B2A6E);
    text-decoration: underline;
}

.vtkc-wysiwyg-editor hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 10px 0;
}

.vtkc-wysiwyg-editor blockquote {
    border-left: 3px solid #ccc;
    margin: 0 0 8px 0;
    padding-left: 12px;
    color: #666;
}
