/* css/flowchart.css */

/**
 * FLOWCHART NODE STYLES
 *
 * Gemeinsame Styles für die Regelbaum-Visualisierung (flowchart-visualizer.js).
 * Verwendet in: arena.html, rules-lab.html
 *
 * Vormals dupliziert in arena.css und rules-lab.css —
 * jetzt zentral hier ausgelagert.
 *
 * Siehe: docs/conventions/ENGINEERING_CONVENTIONS.md Abschnitt 9
 */

/* =========================================
   FLOWCHART NODES
   ========================================= */

.fc-node {
    background: var(--color-surface, white);
    border: 1px solid #dcdcdc;
    border-radius: var(--border-radius, 6px);
    padding: var(--space-sm, 8px) 12px;
    margin-bottom: var(--space-sm, 8px);
    position: relative;
    transition: all 0.3s ease;
    border-left: 5px solid #bdc3c7;
    box-shadow: 0 1px 3px var(--color-shadow, rgba(0, 0, 0, 0.05));
    cursor: pointer;
}

.fc-node:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.fc-children {
    padding-left: 20px;
    border-left: 1px solid var(--color-border-light, #eee);
    margin-left: 10px;
    margin-top: var(--space-sm, 8px);
}

/* --- Status-Farben (per JS gesetzt) --- */

.fc-node.checking {
    background-color: #fff9db;
    border-color: var(--color-warning, #f1c40f);
    border-left-color: var(--color-warning, #f1c40f);
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(241, 196, 15, 0.3);
    z-index: 10;
}

.fc-node.success {
    background-color: #e8f8f5;
    border-color: var(--color-success, #2ecc71);
    border-left-color: var(--color-success, #2ecc71);
}

.fc-node.inactive {
    opacity: 0.6;
    background: #f9f9f9;
    filter: grayscale(50%);
}

/* --- Typ-Farben --- */

.fc-type-group {
    border-left-color: #9b59b6;
}

.fc-type-cond {
    border-left-color: var(--color-danger, #e74c3c);
}

/* --- Node Content --- */

.fc-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.fc-label {
    font-size: var(--font-size-sm, 0.9rem);
    font-weight: 600;
    color: var(--color-text, #2c3e50);
    flex-grow: 1;
}

.fc-desc {
    font-size: var(--font-size-xs, 0.75rem);
    color: var(--color-text-muted, #7f8c8d);
    margin-top: 4px;
    margin-left: 25px;
}

/* --- Branches (Ja/Nein) --- */

.fc-branches {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.fc-branch {
    flex: 1;
    border-top: 2px solid var(--color-border, #ccc);
    padding-top: 10px;
    position: relative;
}

.fc-branch-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-surface, #fcfcfc);
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--color-text-muted, #7f8c8d);
}
