/* QS-BPMN Sim CSS — CM-kompatible Context-Pad-Icons + UserTask-Input-Modal.
   Wird in admin.html geladen, ergaenzt die bpmn-js-Default-Styles. */

/* --- Context-Pad: Sim-Editor-Buttons (Variablen / Assigns / DMN / Cond) ---- */
.djs-context-pad .entry.qs-cm-cp {
    background-image: none !important;
    position: relative;
}
.djs-context-pad .entry.qs-cm-cp::before {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.4);
}

/* Sim-Editor-Variante: dunkles Teal mit cyan Border + Buchstabe */
.djs-context-pad .entry.qs-cm-cp[class*="qs-cm-cp-sim-"]::before {
    content: '';
    background: #0c4a6e;
    box-shadow: 0 0 0 1.5px #9be7ff;
}
.djs-context-pad .entry.qs-cm-cp[class*="qs-cm-cp-sim-"]::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9be7ff;
    font-size: 11px;
    font-weight: bold;
    pointer-events: none;
    line-height: 1;
}
.djs-context-pad .entry.qs-cm-cp-sim-vars::after    { content: 'V'; }
.djs-context-pad .entry.qs-cm-cp-sim-assigns::after { content: ':='; font-size: 9px; }
.djs-context-pad .entry.qs-cm-cp-sim-dmn::after     { content: 'D'; }
.djs-context-pad .entry.qs-cm-cp-sim-gateway::after { content: '?'; }
.djs-context-pad .entry.qs-cm-cp-sim-cond::after    { content: 'ƒ'; font-style: italic; }
.djs-context-pad .entry.qs-cm-cp-sim-add::after     { content: '+'; font-size: 14px; }
.djs-context-pad .entry.qs-cm-cp-sim-default::after { content: '★'; font-size: 10px; }
.djs-context-pad .entry.qs-cm-cp-sim-default.qs-cm-cp-sim-default-off::after {
    content: '☆';
    color: var(--qs-amber, #fde68a);
}

/* Dokumentations-Variante (Modell-Erläuterung = bpmn:documentation): amber Kreis + Stift. */
.djs-context-pad .entry.qs-cm-cp-doc::before {
    content: '';
    background: #78350f;
    box-shadow: 0 0 0 1.5px var(--qs-amber, #fbbf24);
}
.djs-context-pad .entry.qs-cm-cp-doc::after {
    content: '✎';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--qs-amber, #fbbf24);
    font-size: 11px;
    font-weight: bold;
    pointer-events: none;
    line-height: 1;
}

/* --- Kontextpad: einfarbige Vektorsymbole (UI/UX-Analyse S6, 2026-10-09) ---------------
   Alle Synixx-Einträge zeigen ein Lucide-Symbol als Maske in der Schriftfarbe des Pads
   (hell/dunkel) — wie Werkzeug, Palette und Kommentar daneben; vorher Buchstaben auf
   farbigen Kreisen (V, :=, D, ?, ƒ, ★, ✎) und ein Emoji 🔗. Diese Datei lädt NACH
   bpmn-path-layers.css, die doppelte Klasse schlägt die Grundregel oben.
   „Ebene“ ist EIN Eintrag mit Auswahl; kleine Punkte rechts unten zeigen die gesetzten Ebenen. */
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-vars::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-add::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-assigns::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-dmn::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-gateway::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-cond::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-default::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-doc::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-layer::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-calllink::before,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-service::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 0;
    box-shadow: none;
    background: currentColor;
    -webkit-mask: var(--qs-cp-ico) center / contain no-repeat;
    mask: var(--qs-cp-ico) center / contain no-repeat;
}
.djs-context-pad .entry.qs-cm-cp[class*="qs-cm-cp-sim-"]::after,
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-doc::after { content: none; }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-default-off::before { opacity: .55; }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-vars { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21s-4-3-4-9 4-9 4-9'/%3E%3Cpath d='M16 3s4 3 4 9-4 9-4 9'/%3E%3Cline x1='15' x2='9' y1='9' y2='15'/%3E%3Cline x1='9' x2='15' y1='9' y2='15'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-add { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-assigns { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='16' height='20' x='4' y='2' rx='2'/%3E%3Cline x1='8' x2='16' y1='6' y2='6'/%3E%3Cline x1='16' x2='16' y1='14' y2='18'/%3E%3Cpath d='M16 10h.01'/%3E%3Cpath d='M12 10h.01'/%3E%3Cpath d='M8 10h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M8 14h.01'/%3E%3Cpath d='M12 18h.01'/%3E%3Cpath d='M8 18h.01'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-dmn { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-gateway { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3h5v5'/%3E%3Cpath d='M8 3H3v5'/%3E%3Cpath d='M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3'/%3E%3Cpath d='m15 9 6-6'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-cond { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-default { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath fill='black' d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-sim-default-off { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-doc { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-layer { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z'/%3E%3Cpath d='m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65'/%3E%3Cpath d='m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-calllink { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-service { --qs-cp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22v-5'/%3E%3Cpath d='M9 8V2'/%3E%3Cpath d='M15 8V2'/%3E%3Cpath d='M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z'/%3E%3C/svg%3E"); }
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-layer .qs-cp-dots {
    position: absolute; right: 1px; bottom: 1px;
    display: flex; gap: 1px; pointer-events: none;
}
.djs-context-pad .entry.qs-cm-cp.qs-cm-cp-layer .qs-cp-dots i {
    width: 6px; height: 6px; border-radius: 50%;
    box-shadow: 0 0 0 1px var(--qs-panel, #fff);
}

/* --- UserTask-Input-Modal --------------------------------------------------- */
.qs-usertask-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.qs-usertask-modal {
    background: var(--qs-panel, #1a1d22);
    color: var(--qs-text, #eee);
    border: 1px solid var(--qs-border, #444);
    border-left: 4px solid #9be7ff;
    border-radius: 8px;
    padding: 20px 22px;
    min-width: 360px;
    max-width: 520px;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 12px 40px var(--qs-shadow, rgba(0, 0, 0, 0.7));
}
.qs-usertask-modal.qs-feel-active {
    border-left-color: #fbbf24;
}
.qs-usertask-modal-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--qs-accent, #9be7ff);
}
.qs-usertask-modal.qs-feel-active .qs-usertask-modal-title {
    color: var(--qs-orange, #fbbf24);
}
.qs-usertask-modal-sub {
    font-size: 11px;
    color: var(--qs-text-mute, #aaa);
    margin-bottom: 14px;
}
.qs-usertask-modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.qs-usertask-modal-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.qs-usertask-modal-row > span {
    font-size: 11px;
    color: var(--qs-text-dim, #bbb);
}
.qs-usertask-modal-row > span > .meta {
    color: var(--qs-text-mute, #666);
}
.qs-usertask-modal-row > input {
    background: var(--qs-input-bg, #0f1115);
    color: var(--qs-text, #eee);
    border: 1px solid var(--qs-input-border, #444);
    border-radius: 4px;
    padding: 7px 9px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
}
.qs-usertask-modal-row > input:focus {
    border-color: #9be7ff;
    outline: none;
}
.qs-usertask-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}
.qs-usertask-modal-actions > button {
    border-radius: 4px;
    padding: 7px 14px;
    font-size: 12px;
    cursor: pointer;
}
.qs-usertask-modal-actions > .cancel {
    background: transparent;
    color: var(--qs-text-mute, #aaa);
    border: 1px solid var(--qs-border, #555);
}
.qs-usertask-modal-actions > .cancel:hover {
    background: var(--qs-panel-2, #2a2e36);
}
.qs-usertask-modal-actions > .ok {
    background: #9be7ff;
    color: #0a1f29;
    border: none;
    font-weight: 600;
}
.qs-usertask-modal-actions > .ok:hover {
    background: #7ed4f0;
}
.qs-usertask-modal.qs-feel-active .qs-usertask-modal-actions > .ok {
    background: #fbbf24;
}
.qs-usertask-modal.qs-feel-active .qs-usertask-modal-actions > .ok:hover {
    background: #f59e0b;
}

/* Nur-Lese-Kontext im Eingabe-Formular (2026-08-06): angezeigte, nicht
   editierbare Variablenwerte. Bewusst TEXT statt disabled-Feld — ein
   ausgegrautes Eingabefeld liest sich wie ein Fehler („warum geht das nicht?"),
   ein Werte-Block wie Information. */
.qs-usertask-modal-ro {
    background: var(--qs-panel-3, #0f1115);
    border: 1px solid var(--qs-border-soft, #23262c);
    border-left: 3px solid var(--qs-amber, #fbbf24);
    border-radius: 5px;
    padding: 7px 10px 8px;
    margin-bottom: 11px;
}
.qs-usertask-modal-ro-head {
    font-size: 10.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--qs-amber, #fbbf24);
    margin-bottom: 5px;
}
.qs-usertask-modal-ro-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 2px 0;
    font-size: 12px;
}
.qs-usertask-modal-ro-k { color: var(--qs-text-dim, #9aa2ad); flex: 0 0 auto; }
.qs-usertask-modal-ro-v {
    margin-left: auto;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    color: var(--qs-text, #e6e6e6);
    text-align: right;
    word-break: break-word;
}
.qs-usertask-modal-ro-v.empty { color: var(--qs-text-mute, #6b7280); font-style: italic; }

/* Agenten-Aufträge (Externe Dienste Stufe 4): Hinweis an der Sendeaufgabe, solange der
   Agent arbeitet. */
.qs-agent-wait {
    white-space: nowrap;
    font: 600 11px/1.2 var(--qs-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    color: #04202c;
    background: #7dd3fc;
    border: 1px solid #0ea5e9;
    border-radius: 999px;
    padding: 2px 8px;
    box-shadow: var(--qs-elev-1, 0 1px 3px rgba(0, 0, 0, .25));
    pointer-events: none;
    animation: qs-agent-puls 1.6s ease-in-out infinite;
}
@keyframes qs-agent-puls { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .qs-agent-wait { animation: none; } }
/* Die Token-Simulation blendet im Simulationsmodus alle fremden Overlays aus — der Hinweis
   gehört aber genau dorthin (Muster wie qs-kpi / Team-Sim-Spiegel). */
.bjs-container.simulation .djs-overlays .djs-overlay.djs-overlay-qs-agent-wait { display: block !important; }
