:root, :host {
    /**
     * Primary color assigned to a critical path task
     */
    --b-critical-path-primary        : var(--b-color-red);

    /**
     * Primary color assigned to a critical path parent task
     */
    --b-critical-path-parent-primary : var(--b-color-red);

    /**
     * Stroke color for critical path lines
     */
    --b-critical-path-stroke         : color-mix(in srgb, var(--b-color-red), var(--b-mix) 50%);
}

/* Need higher specificity than dependencies rules */
.b-gantt-base.b-gantt-critical-paths {

    marker#arrowEndCritical {
        fill : var(--b-critical-path-stroke);

        path {
            fill   : var(--b-critical-path-stroke);
            stroke : var(--b-critical-path-stroke);
        }
    }

    /* leaves */
    .b-gantt-task-wrap.b-critical {
        --b-primary : var(--b-critical-path-primary);
    }

    /* parents */
    .b-gantt-task-parent.b-critical {
        --b-primary : var(--b-critical-path-parent-primary);
    }

    /* dependencies */
    svg.b-sch-dependencies-canvas .b-sch-dependency.b-critical:not(.b-click-area) {
        --b-dependency-color        : var(--b-critical-path-stroke);
        --b-dependency-stroke-width : 2px;

        marker-start                : url("#arrowEndCritical");
    }
}
