﻿/* ==========================================================================
   XML VIEWER (XONOMY) – Dark Theme
   ========================================================================== */

/* === Basis-Container ===================================================== */
.xml-viewer {
    background-color: #121212; /* tiefes Dunkelgrau */
    color: #e0e0e0; /* Standard Textfarbe */
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.4;
    padding: 10px;
    overflow: auto;
}

    /* Xonomy gehört IMMER in text-align:left */
    .xml-viewer .xonomy {
        text-align: left !important;
    }

        /* === Strukturknoten (Elemente & Attribute) =============================== */
        .xml-viewer .xonomy .element,
        .xml-viewer .xonomy .attribute {
            color: #c5c5c5 !important;
        }

        /* === XML-Tag-Namen (<Tag>) =============================================== */
        .xml-viewer .xonomy .tag {
            color: #81d4fa !important; /* Hellblau */
            font-weight: 600;
        }

        /* === Attribut-Namen (attr=) ============================================== */
        .xml-viewer .xonomy .attname {
            color: #ffb74d !important; /* Orange */
        }

        /* === Attribut-Werte ("value") ============================================ */
        .xml-viewer .xonomy .attvalue {
            color: #aed581 !important; /* Grün */
        }

        /* === Textknoten zwischen Tags ============================================ */
        .xml-viewer .xonomy .textnode {
            color: #f5f5f5 !important;
        }

        /* === Kommentar (<!-- -->) ================================================ */
        .xml-viewer .xonomy .comment {
            color: #9e9e9e !important;
            font-style: italic;
        }

        /* === CDATA =============================================================== */
        .xml-viewer .xonomy .cdata {
            color: #ce93d8 !important; /* Lila */
        }

        /* === Auf-/Zuklappen-Pfeil ================================================ */
        .xml-viewer .xonomy .collapser {
            color: #757575 !important;
            cursor: pointer;
        }

        /* === Auswahl (markierter Bereich) ======================================== */
        .xml-viewer .xonomy .selectionBackground {
            background-color: #333 !important;
        }

        .xml-viewer .xonomy .selection {
            color: #ffffff !important;
        }

        /* === Kontextmenü (Rechtsklick) =========================================== */
        .xml-viewer .xonomy .menu {
            background-color: #1e1e1e !important;
            color: #f5f5f5 !important;
            border: 1px solid #444;
            box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
            font-size: 13px;
        }

            /* Menüelement */
            .xml-viewer .xonomy .menu .menuItem {
                padding: 6px 12px;
                cursor: pointer;
            }

                /* Hover-Effekt im Kontextmenü */
                .xml-viewer .xonomy .menu .menuItem:hover {
                    background-color: #2e2e2e !important;
                    color: #ffffff !important;
                }

        /* === Tooltip (Bubble) ==================================================== */
        .xml-viewer .xonomy .bubble {
            background-color: #222 !important;
            color: #eee !important;
            border: 1px solid #555;
            box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
            font-size: 12px;
            padding: 4px 8px;
        }

    /* === Scrollbar (WebKit) ================================================== */
    .xml-viewer::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    .xml-viewer::-webkit-scrollbar-track {
        background: #1a1a1a;
    }

    .xml-viewer::-webkit-scrollbar-thumb {
        background: #444;
        border-radius: 5px;
    }

        .xml-viewer::-webkit-scrollbar-thumb:hover {
            background: #666;
        }

    /* === Reine Anzeige (keine Bearbeitung) =================================== */
    .xml-viewer.readonly .xonomy [contenteditable="true"] {
        pointer-events: none;
    }
