/* ==========================================================================
   BPMN Designer - Editor Styles v1.1.0
   ========================================================================== */

#bpmn-canvas { width: 100%; background: #fafafa; overflow: hidden; position: relative; }
#bpmn-canvas.bpmn-fullscreen {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh !important; z-index: 9999; background: #fff;
}
.bjs-container { position: absolute; width: 100%; height: 100%; }

#bpmn-activity-detail .card-header {
    background: #E2F1EF; border-bottom: 2px solid #0C7C75;
}

.nav-tabs .nav-link { font-size: 0.9rem; padding: 0.45rem 0.85rem; }
.nav-tabs .nav-link.active { font-weight: 600; color: #1c3a5e; }

.bpmn-risk-score {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 24px; border-radius: 12px;
    font-size: 0.8rem; font-weight: 700; color: #fff; padding: 0 8px;
}
.risk-score-red    { background: #e53e3e; }
.risk-score-orange { background: #dd6b20; }
.risk-score-yellow { background: #d69e2e; color: #333; }
.risk-score-green  { background: #38a169; }

.bpmn-def-entry, .bpmn-risk-entry, .bpmn-kpi-entry, .bpmn-policy-entry {
    border-left: 3px solid #0C7C75;
    transition: box-shadow 0.15s;
}
.bpmn-def-entry:hover, .bpmn-risk-entry:hover, .bpmn-kpi-entry:hover, .bpmn-policy-entry:hover {
    box-shadow: 0 2px 8px rgba(28, 126, 214, 0.15);
}
.bpmn-risk-entry  { border-left-color: #e53e3e; }
.bpmn-kpi-entry   { border-left-color: #38a169; }
.bpmn-policy-entry{ border-left-color: #6f42c1; }

#bpmn-version-list li:hover { background: #f8f9fa; }

.com-bpmndesigner-processes .card { transition: transform .15s, box-shadow .15s; }
.com-bpmndesigner-processes .card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(28, 126, 214, .15); }

/* Process list (site) */
.bpmn-processes-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin: 1.5rem 0;
}
.bpmn-process-card {
    display: block; padding: 1.25rem; background: #fff;
    border: 1px solid #dee2e6; border-radius: 8px;
    text-decoration: none; color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.bpmn-process-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); border-color: #0C7C75; color: inherit; }
.bpmn-process-card h3 { font-size: 1.1rem; color: #1c3a5e; margin-bottom: 0.5rem; }
.bpmn-process-card .description { font-size: 0.9rem; color: #555; margin-bottom: 0.75rem; }
.bpmn-process-card .meta { font-size: 0.8rem; color: #888; }

.bpmn-toolbar .btn { font-size: 0.8rem; }
.bpmn-editor-wrapper .card-header { font-size: 0.9rem; }

.process-description { background: #f8f9fa; }

/* Activity tabs - fix layouts */
#bpmn-activity-detail .tab-pane { min-height: 200px; }

/* Bootstrap collapse override: zorg dat .collapse:not(.show) {display:none} bewaard blijft */
#bpmn-color-panel .bpmn-color-swatch:hover { transform: scale(1.1); }

/* v1.2.9 process list thumbnails + readonly */
.bpmn-process-card .bpmn-thumb {
    background: linear-gradient(135deg, #fafafa 0%, #f0f4f8 100%);
}
.bpmn-process-card.bpmn-readonly {
    opacity: 0.85;
}
.bpmn-process-card.bpmn-readonly .card-title a {
    color: #555;
}
.bpmn-process-card .bjs-container .djs-palette,
.bpmn-process-card .bjs-container .djs-context-pad,
.bpmn-process-card .bjs-container .bjs-powered-by { display: none !important; }

/* v1.2.11 fullscreen */
#bpmn-viewer-canvas.bpmn-fullscreen,
#bpmn-canvas.bpmn-fullscreen {
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw !important; height: 100vh !important;
    z-index: 9999;
    background: #fff;
}

/* v1.2.12: Viewer - geen edit-UI tonen */
#bpmn-viewer-canvas .djs-palette,
#bpmn-viewer-canvas .djs-context-pad,
#bpmn-viewer-canvas .djs-popup,
#bpmn-viewer-canvas .djs-popup-menu,
#bpmn-viewer-canvas .djs-direct-editing-parent,
#bpmn-viewer-canvas .djs-resizer,
#bpmn-viewer-canvas .djs-create,
#bpmn-viewer-canvas .djs-element-tag,
#bpmn-viewer-card .djs-palette,
#bpmn-viewer-card .djs-context-pad {
    display: none !important;
}
/* Geen text-editing inline */
#bpmn-viewer-canvas [contenteditable="true"] {
    pointer-events: none;
}
/* Geen powered-by badge */
.bjs-powered-by { display: none !important; }

/* v1.2.27: Sticky tools-toggle aan rechterkant */
.bpmn-side-toggle {
    position: fixed;
    right: 0;
    top: 35%;
    transform: translateX(0);
    z-index: 1040;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 14px 8px;
    border: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.15);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: padding 0.15s;
}
.bpmn-side-toggle:hover { padding-right: 14px; }
.bpmn-side-toggle .icon-cog { writing-mode: horizontal-tb; }

/* Title-input in BPMN header: subtiel maar prominent */
.bpmn-title-input {
    color: #1c3a5e;
}
.bpmn-title-input:focus {
    background: rgba(28, 126, 214, 0.05) !important;
    box-shadow: 0 0 0 1px #0C7C75 !important;
}

/* v1.2.29: Sub-process link icoon op shape */
.bpmn-subprocess-overlay {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 20px;
    text-align: center;
    background: #fff;
    border: 1.5px solid #0C7C75;
    border-radius: 50%;
    color: #0C7C75;
    text-decoration: none;
    font-size: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform 0.15s, background 0.15s;
    cursor: pointer;
}
.bpmn-subprocess-overlay:hover {
    background: #0C7C75;
    color: #fff;
    transform: scale(1.15);
    text-decoration: none;
}

/* v1.2.30: department nav + list view */
.bpmn-department-nav .bpmn-dept-link:hover { background: #f0f4f8; }
.bpmn-list-table .bpmn-readonly-row { opacity: 0.7; }
.bpmn-list-table .bpmn-thumb-small svg { max-width: 100% !important; max-height: 48px !important; }
.bpmn-list-table .bpmn-thumb-small .djs-palette,
.bpmn-list-table .bpmn-thumb-small .djs-context-pad,
.bpmn-list-table .bpmn-thumb-small .bjs-powered-by { display: none !important; }
.bpmn-view-btn.active { background-color: #0C7C75 !important; color: white !important; }

/* v1.2.32: Proceslist thumbnails alleen-lezen */
.bpmn-thumb, .bpmn-thumb-small {
    pointer-events: none;
    user-select: none;
}
.bpmn-thumb svg, .bpmn-thumb-small svg {
    pointer-events: none !important;
}
/* Geen palette/context-pad in thumbnails - extra safety */
.bpmn-thumb .djs-palette,
.bpmn-thumb .djs-context-pad,
.bpmn-thumb .djs-popup,
.bpmn-thumb .bjs-powered-by,
.bpmn-thumb .djs-resizer,
.bpmn-thumb-small .djs-palette,
.bpmn-thumb-small .djs-context-pad,
.bpmn-thumb-small .bjs-powered-by {
    display: none !important;
}

/* v1.2.34: Anchor-link icoon op shape + activity-pagina styling */
.bpmn-anchor-overlay {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 19px;
    text-align: center;
    background: #fff;
    border: 1.5px solid #2f9e44;
    border-radius: 50%;
    color: #2f9e44;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform 0.15s, background 0.15s;
    cursor: pointer;
}
.bpmn-anchor-overlay:hover {
    background: #2f9e44;
    color: #fff;
    transform: scale(1.18);
    text-decoration: none;
}

.bpmn-activity-index .bpmn-activity-jump {
    font-size: 0.85rem;
    padding: 0.35em 0.65em;
    transition: background-color 0.15s, color 0.15s;
}
.bpmn-activity-index .bpmn-activity-jump:hover {
    background: #0C7C75 !important;
    color: #fff !important;
    border-color: #0C7C75 !important;
}

.bpmn-activity-card-header h3 .bpmn-step-number {
    min-width: 1.8em;
    font-variant-numeric: tabular-nums;
}

/* Visuele flash bij anchor-scroll */
@keyframes bpmnCardFlash {
    0%   { box-shadow: 0 0 0 0 rgba(28,126,214, 0.55); }
    50%  { box-shadow: 0 0 0 10px rgba(28,126,214, 0.10); }
    100% { box-shadow: 0 0 0 0 rgba(28,126,214, 0); }
}
.bpmn-card-flash {
    animation: bpmnCardFlash 1.5s ease-out 1;
    border-color: #0C7C75 !important;
}

.anchor-alias {
    display: block;
    position: relative;
    top: -80px;
    visibility: hidden;
}


/* v1.2.36: Pure step descriptions — verzorgde typografie */
.bpmn-step-descriptions {
    margin-left: 0;
}
.bpmn-step-descriptions .bpmn-step-block {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e9ecef;
}
.bpmn-step-descriptions .bpmn-step-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.bpmn-step-descriptions .bpmn-step-title {
    color: #1a4067;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.bpmn-step-descriptions .bpmn-step-title .bpmn-step-number {
    min-width: 2em;
    font-variant-numeric: tabular-nums;
    text-align: center;
    font-weight: 600;
}
.bpmn-step-descriptions .bpmn-step-desc {
    color: #333;
    line-height: 1.65;
    font-size: 1rem;
}
.bpmn-step-descriptions .bpmn-step-desc p {
    margin-bottom: 0.85em;
}
.bpmn-step-descriptions .bpmn-step-desc p:last-child {
    margin-bottom: 0;
}
.bpmn-step-descriptions .bpmn-step-desc ul,
.bpmn-step-descriptions .bpmn-step-desc ol {
    padding-left: 1.6rem;
    margin-bottom: 0.85em;
}
.bpmn-step-descriptions .bpmn-step-desc li {
    margin-bottom: 0.35em;
}

.bpmn-anchor-overlay {
    font-size: 13px;
    line-height: 20px;
}

/* v1.2.42: Risico-icoon overlay */
.bpmn-risk-icon-overlay {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 19px;
    text-align: center;
    background: #fff;
    border: 1.5px solid #fd7e14;
    border-radius: 50%;
    color: #fd7e14;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform 0.15s, background 0.15s;
    cursor: pointer;
}
.bpmn-risk-icon-overlay:hover {
    transform: scale(1.18);
    text-decoration: none;
    background: currentColor;
    color: #fff !important;
}

/* v1.2.57: Verbeterde viewer tabs styling — minder grijs */
.bpmn-activity-card .nav-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 0;
    padding: 0;
}
.bpmn-activity-card .nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #495057;
    font-weight: 500;
    padding: 0.6rem 1rem;
    margin-bottom: -2px;
    background: transparent;
    transition: all 0.15s;
}
.bpmn-activity-card .nav-tabs .nav-link:hover {
    border-bottom-color: #adb5bd;
    color: #0C7C75;
    background: rgba(28,126,214,0.04);
}
.bpmn-activity-card .nav-tabs .nav-link.active {
    border-bottom-color: #0C7C75;
    color: #0C7C75;
    background: rgba(28,126,214,0.06);
    font-weight: 600;
}
.bpmn-activity-card .nav-tabs .nav-link .badge {
    margin-left: 0.4em;
    font-size: 0.7rem;
    background: #495057;
    color: #fff;
}
.bpmn-activity-card .nav-tabs .nav-link.active .badge {
    background: #0C7C75;
}
.bpmn-activity-card .tab-content {
    padding: 1.25rem;
    background: #fff;
}
.bpmn-activity-card-header {
    background: linear-gradient(90deg, rgba(28,126,214,0.08) 0%, rgba(28,126,214,0.02) 100%);
    border-bottom: 2px solid rgba(28,126,214,0.2);
    padding: 0.85rem 1.25rem !important;
}
.bpmn-activity-card-header strong {
    font-size: 1.1rem;
    color: #1a4067;
}
.bpmn-view-defs dt { padding: 0.3rem 0; border-bottom: 1px dashed #e9ecef; }
.bpmn-view-defs dd { padding: 0.3rem 0; border-bottom: 1px dashed #e9ecef; color: #495057; }
.bpmn-view-defs dt:last-of-type, .bpmn-view-defs dd:last-of-type { border-bottom: none; }

.bpmn-view-risk, .bpmn-view-kpi, .bpmn-view-pol {
    transition: box-shadow 0.15s;
}
.bpmn-view-risk:hover, .bpmn-view-kpi:hover, .bpmn-view-pol:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.bpmn-view-risk .card-header { padding: 0.65rem 1rem; }
.bpmn-view-risk .card-body { padding: 0.85rem 1rem; }
.bpmn-view-risk .form-label { margin-bottom: 0.1rem; font-size: 0.75rem; }


/* v1.2.90: Custom-color knoppen op edit-scherm */
.bpmn-styled-btn {
    transition: filter 0.15s ease, transform 0.15s ease;
}
.bpmn-styled-btn:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
    text-decoration: none;
}
.bpmn-styled-btn:active {
    filter: brightness(0.85);
    transform: translateY(0);
}

/* v1.8.139 Punt 2 — Hover-kleur voor "Markeer als gereviewd" knop.
   btn-outline-success vult op hover de achtergrond met groen, met witte tekst.
   Op sommige thema's was de tekst nauwelijks leesbaar. We forceren een donker-grijze
   tekstkleur EN een lichte achtergrond, zodat het contrast altijd hoog blijft. */
#bpmn-mark-reviewed:hover,
#bpmn-mark-reviewed:focus,
#bpmn-mark-reviewed-top:hover,
#bpmn-mark-reviewed-top:focus {
    background-color: #DAEFE0 !important;
    border-color: #1F7A45 !important;
    color: #1F2937 !important;
}
#bpmn-mark-reviewed:hover .icon-checkmark,
#bpmn-mark-reviewed-top:hover .icon-checkmark {
    color: #1F7A45 !important;
}
/* v1.8.143 — viewer-top knop is nu een pill (zelfde stijl als review-pill).
   Hover-state: iets donkerder groen ter feedback, tekst blijft donker. */
#bpmn-mark-reviewed-viewer-top:hover,
#bpmn-mark-reviewed-viewer-top:focus {
    background: #C7E4D2 !important;
    border-color: #1F7A45 !important;
    color: #14502E !important;
    outline: none;
}
