/* ===== Quill Editor – Dark Theme Anpassung ===== */

/* Editor-Wrapper */
.editor-wrapper {
    margin-bottom: 15px;
    border-radius: 8px;
    border: 2px solid #99BB00;
    position: relative;
}

    /* Toolbar */
    .editor-wrapper .ql-toolbar.ql-snow {
        background: #1a1a1a;
        border: none;
        border-bottom: 1px solid #333;
        padding: 8px;
        border-radius: 6px 6px 0 0;
    }

    .editor-wrapper .ql-toolbar .ql-stroke:not(.ql-color-label) {
        stroke: #ccc;
    }

    .editor-wrapper .ql-toolbar .ql-fill:not(.ql-color-label) {
        fill: #ccc;
    }

    .editor-wrapper .ql-toolbar .ql-picker-label {
        color: #ccc;
    }

        .editor-wrapper .ql-toolbar button:hover .ql-stroke:not(.ql-color-label),
        .editor-wrapper .ql-toolbar .ql-picker-label:hover .ql-stroke:not(.ql-color-label) {
            stroke: #a4d226;
        }

        .editor-wrapper .ql-toolbar button:hover .ql-fill:not(.ql-color-label),
        .editor-wrapper .ql-toolbar .ql-picker-label:hover .ql-fill:not(.ql-color-label) {
            fill: #a4d226;
        }

    .editor-wrapper .ql-toolbar button.ql-active .ql-stroke:not(.ql-color-label) {
        stroke: #a4d226;
    }

    .editor-wrapper .ql-toolbar button.ql-active .ql-fill:not(.ql-color-label) {
        fill: #a4d226;
    }

    .editor-wrapper .ql-toolbar .ql-picker-label:hover,
    .editor-wrapper .ql-toolbar .ql-picker-label.ql-active {
        color: #a4d226;
    }

/* Picker Dropdowns */
.ql-picker-options {
    background: #222 !important;
    border: 1px solid #444 !important;
    border-radius: 6px !important;
}

.ql-picker-item {
    color: #ccc !important;
}

    .ql-picker-item:hover {
        color: #a4d226 !important;
    }

/* ===== Farb-Picker Swatches ===== */
.ql-snow .ql-color-picker .ql-picker-item {
    border: 1px solid #555 !important;
    border-radius: 2px;
}

    .ql-snow .ql-color-picker .ql-picker-item:hover {
        border-color: #fff !important;
    }

    /* Reset-Swatch – Farbe zurücksetzen auf Standard (rote Diagonallinie) */
    .ql-snow .ql-color-picker .ql-picker-item:not([data-value]) {
        background: linear-gradient( 135deg, transparent 38%, #ff5555 38%, #ff5555 62%, transparent 62% ) !important;
        border: 1px solid #888 !important;
    }

        .ql-snow .ql-color-picker .ql-picker-item:not([data-value]):hover {
            border-color: #fff !important;
            background: linear-gradient( 135deg, transparent 38%, #ff7777 38%, #ff7777 62%, transparent 62% ) !important;
        }

/* Editor-Inhalt */
.editor-wrapper .ql-container.ql-snow {
    border: none;
    background: #111;
    min-height: 200px;
    font-family: 'Inter', Verdana, sans-serif;
    font-size: 14px;
    border-radius: 0 0 6px 6px;
}

.editor-wrapper .ql-editor {
    color: #ddd;
    min-height: 200px;
    padding: 15px;
    line-height: 1.6;
}

    .editor-wrapper .ql-editor.ql-blank::before {
        color: #666;
        font-style: italic;
    }

    /* Links im Editor */
    .editor-wrapper .ql-editor a {
        color: #a4d226;
    }

    /* Bilder und Videos im Editor */
    .editor-wrapper .ql-editor img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
        margin: 8px 0;
    }

    .editor-wrapper .ql-editor .ql-video {
        width: 100%;
        max-width: 640px;
        height: 360px;
        border-radius: 6px;
        margin: 8px 0;
    }

    /* Blockquote */
    .editor-wrapper .ql-editor blockquote {
        border-left: 4px solid #a4d226;
        padding-left: 12px;
        color: #aaa;
        margin: 10px 0;
    }

    /* Listen */
    .editor-wrapper .ql-editor ol,
    .editor-wrapper .ql-editor ul {
        padding-left: 20px;
        color: #ddd;
    }

/* Tooltip (Link / Video / Image einfügen) */
.ql-tooltip {
    background: #222 !important;
    border: 1px solid #444 !important;
    color: #ccc !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
    z-index: 1000 !important;
    padding: 8px 12px !important;
    white-space: nowrap !important;
}

    .ql-tooltip input[type="text"] {
        background: #333 !important;
        color: #fff !important;
        border: 1px solid #555 !important;
        border-radius: 4px !important;
        width: 220px !important;
        height: auto !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }

        .ql-tooltip input[type="text"]:focus {
            border-color: #a4d226 !important;
            outline: none !important;
        }

    .ql-tooltip a.ql-action,
    .ql-tooltip a.ql-remove {
        color: #a4d226 !important;
    }

        .ql-tooltip a.ql-action::after {
            border-right: 1px solid #555 !important;
            padding-right: 8px !important;
            margin-left: 8px !important;
        }

    .ql-tooltip .ql-preview {
        color: #a4d226 !important;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* ===== Anzeige von gespeichertem Rich-Content ===== */

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}

.rich-content .ql-video,
.rich-content iframe {
    width: 100%;
    max-width: 640px;
    height: 360px;
    border-radius: 6px;
    margin: 8px 0;
    border: none;
}

.rich-content a {
    color: #a4d226;
    text-decoration: underline;
}

    .rich-content a:hover {
        color: #c4f246;
    }

.rich-content blockquote {
    border-left: 4px solid #a4d226;
    padding-left: 12px;
    color: #aaa;
    margin: 10px 0;
}

.rich-content ul,
.rich-content ol {
    padding-left: 24px;
    margin: 8px 0;
}

.rich-content ul {
    list-style: disc outside !important;
}

.rich-content ol {
    list-style: decimal outside !important;
}

/* Quill-Listen: Styling über data-list Attribut */
.rich-content li[data-list="bullet"] {
    list-style-type: disc !important;
    display: list-item !important;
}

.rich-content li[data-list="ordered"] {
    list-style-type: decimal !important;
    display: list-item !important;
}

.rich-content li {
    margin-bottom: 4px;
    list-style: inherit !important;
    display: list-item !important;
}

.rich-content h1,
.rich-content h2,
.rich-content h3 {
    color: #fff;
    margin: 12px 0 6px;
}
