/* KivTools workflow modules: functional additions that retain the existing Bootstrap tool layout. */
.kiv-workflow-tool {
    margin-top: 8px;
}

.kiv-workflow-tool .workflow-tabs {
    margin-bottom: 16px;
}

.kiv-workflow-tool .workflow-tabs > li > a {
    padding-right: 12px;
    padding-left: 12px;
}

.kiv-workflow-tool .workflow-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
}

.kiv-workflow-tool .workflow-split .compact-label {
    margin: 0;
}

.kiv-workflow-tool .workflow-file {
    max-width: 300px;
    font-size: 12px;
}

.kiv-workflow-tool .workflow-note {
    margin: 8px 0 0;
    color: #71808d;
    font-size: 12px;
    line-height: 1.55;
}

.kiv-workflow-tool .workflow-privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #d7e8dc;
    border-radius: 3px;
    background: #f5fbf7;
    color: #41614b;
    font-size: 12px;
    line-height: 1.45;
}

.kiv-workflow-tool .workflow-privacy .glyphicon {
    top: 2px;
    color: #36834c;
}

.kiv-workflow-tool .workflow-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.kiv-workflow-tool .workflow-metric {
    min-width: 118px;
    padding: 9px 11px;
    border: 1px solid #e1e7eb;
    border-radius: 3px;
    background: #fbfcfd;
}

.kiv-workflow-tool .workflow-metric strong {
    display: block;
    color: #2e3c47;
    font-size: 18px;
    line-height: 1.15;
}

.kiv-workflow-tool .workflow-metric span {
    color: #75838e;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.kiv-workflow-tool .workflow-metric.good {
    border-color: #b8dbc3;
    background: #f3faf5;
}

.kiv-workflow-tool .workflow-metric.warning {
    border-color: #eed5a5;
    background: #fffaf0;
}

.kiv-workflow-tool .workflow-metric.danger {
    border-color: #e8b7b4;
    background: #fff6f6;
}

.kiv-workflow-tool .workflow-findings,
.kiv-workflow-tool .workflow-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kiv-workflow-tool .workflow-findings li,
.kiv-workflow-tool .workflow-list li {
    padding: 10px 11px;
    border-bottom: 1px solid #edf0f2;
    line-height: 1.45;
}

.kiv-workflow-tool .workflow-findings li:last-child,
.kiv-workflow-tool .workflow-list li:last-child {
    border-bottom: 0;
}

.kiv-workflow-tool .workflow-level {
    display: inline-block;
    min-width: 56px;
    margin-right: 7px;
    padding: 2px 5px;
    border-radius: 2px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-transform: uppercase;
    vertical-align: 1px;
}

.kiv-workflow-tool .workflow-level.good { background: #5cb85c; }
.kiv-workflow-tool .workflow-level.info { background: #5bc0de; }
.kiv-workflow-tool .workflow-level.warning { background: #f0ad4e; }
.kiv-workflow-tool .workflow-level.danger,
.kiv-workflow-tool .workflow-level.error { background: #d9534f; }

.kiv-workflow-tool .workflow-path {
    display: inline-block;
    margin: 0 6px 0 0;
    padding: 1px 4px;
    border-radius: 2px;
    background: #edf1f4;
    color: #53616c;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 11px;
    vertical-align: 1px;
}

.kiv-workflow-tool .workflow-code {
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
}

.kiv-workflow-tool .workflow-output {
    min-height: 92px;
    max-height: 350px;
    overflow: auto;
    margin: 0;
    padding: 12px;
    border: 1px solid #e3e8ec;
    border-radius: 3px;
    background: #fbfcfd;
    color: #2f3b45;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.kiv-workflow-tool .workflow-table-wrap {
    overflow-x: auto;
}

.kiv-workflow-tool .workflow-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
}

.kiv-workflow-tool .workflow-table th,
.kiv-workflow-tool .workflow-table td {
    padding: 8px 9px;
    border: 1px solid #e3e8ec;
    vertical-align: top;
}

.kiv-workflow-tool .workflow-table th {
    background: #f7f9fa;
    color: #596771;
    font-size: 11px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.kiv-workflow-tool .workflow-table td.workflow-cell-code {
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
}

.kiv-workflow-tool .workflow-empty {
    padding: 20px;
    color: #788792;
    text-align: center;
}

.kiv-workflow-tool .workflow-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.kiv-workflow-tool .workflow-inline-form .form-group {
    min-width: 190px;
    flex: 1 1 210px;
    margin-bottom: 0;
}

.kiv-workflow-tool .workflow-inline-form label {
    margin-bottom: 5px;
    color: #52616c;
    font-size: 12px;
    font-weight: 600;
}

.kiv-workflow-tool .workflow-inline-form .btn {
    margin-bottom: 0;
}

.kiv-workflow-tool .workflow-chip {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 3px 6px;
    border: 1px solid #d9e2e7;
    border-radius: 12px;
    background: #f8fafb;
    color: #4e606b;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 11px;
}

.kiv-workflow-tool .workflow-definition {
    display: grid;
    grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
    gap: 0;
    margin: 0;
    border: 1px solid #e3e8ec;
    border-bottom: 0;
}

.kiv-workflow-tool .workflow-definition dt,
.kiv-workflow-tool .workflow-definition dd {
    min-height: 37px;
    margin: 0;
    padding: 8px 10px;
    border-bottom: 1px solid #e3e8ec;
}

.kiv-workflow-tool .workflow-definition dt {
    background: #f7f9fa;
    color: #596771;
    font-size: 12px;
    font-weight: 600;
}

.kiv-workflow-tool .workflow-definition dd {
    overflow-wrap: anywhere;
    color: #374650;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
}

.kiv-workflow-tool .workflow-accordion > .panel {
    margin-bottom: 8px;
    border: 1px solid #e3e8ec;
    border-radius: 3px;
    box-shadow: none;
}

.kiv-workflow-tool .workflow-accordion .panel-heading {
    padding: 0;
    background: #f8fafb;
}

.kiv-workflow-tool .workflow-accordion .panel-title > a {
    display: block;
    padding: 10px 12px;
    color: #40515d;
    font-size: 13px;
    text-decoration: none;
}

.kiv-workflow-tool .workflow-accordion .panel-body {
    font-size: 13px;
    line-height: 1.6;
}

html.kiv-shell-dark .kiv-workflow-tool .tool-card,
html.kiv-shell-dark .kiv-workflow-tool .workflow-output,
html.kiv-shell-dark .kiv-workflow-tool .workflow-metric {
    border-color: #3a4c57;
    background: #22313b;
    color: #dce5eb;
}

html.kiv-shell-dark .kiv-workflow-tool .tool-card-heading,
html.kiv-shell-dark .kiv-workflow-tool .workflow-table th,
html.kiv-shell-dark .kiv-workflow-tool .workflow-definition dt,
html.kiv-shell-dark .kiv-workflow-tool .workflow-accordion .panel-heading {
    border-color: #3a4c57;
    background: #283944;
    color: #dce5eb;
}

html.kiv-shell-dark .kiv-workflow-tool .workflow-privacy {
    border-color: #42634c;
    background: #22382a;
    color: #c4e5cd;
}

html.kiv-shell-dark .kiv-workflow-tool .workflow-table td,
html.kiv-shell-dark .kiv-workflow-tool .workflow-findings li,
html.kiv-shell-dark .kiv-workflow-tool .workflow-list li,
html.kiv-shell-dark .kiv-workflow-tool .workflow-definition dd {
    border-color: #3a4c57;
    color: #d5e0e6;
}

html.kiv-shell-dark .kiv-workflow-tool .workflow-path {
    background: #31434f;
    color: #d8e4ea;
}

@media (max-width: 767px) {
    .kiv-workflow-tool .workflow-split {
        display: block;
    }

    .kiv-workflow-tool .workflow-file {
        width: 100%;
        max-width: none;
        margin-top: 8px;
    }

    .kiv-workflow-tool .workflow-metric {
        min-width: calc(50% - 4px);
        flex: 1 1 calc(50% - 4px);
    }

    .kiv-workflow-tool .workflow-definition {
        grid-template-columns: 1fr;
    }

    .kiv-workflow-tool .workflow-definition dt {
        border-bottom: 0;
    }
}
