/* Workflow Pipeline strip — shared across envelope / labels / sheetfed
   calc result pages. Read from workflow_json (steps + totals + risk +
   factory_link). Card layout mirrors the labels pipeline reference
   Dave provided. Bottleneck step gets an amber accent. */

.workflow-pipeline-wrap {
    background: #f6f7f3;
    border-radius: 8px;
    padding: .9rem 1rem;
    border: 1px solid #e3e7dc;
}

.workflow-pipeline-title {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .75rem;
    font-weight: 700;
    color: #4a5849;
    margin-bottom: .5rem;
}

.workflow-pipeline {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-top: 1px solid #d8ddd0;
}

/* Cards shrink to fit the section width. 8+ cards fit cleanly on a
   ~1100px+ results panel without horizontal scroll thanks to the
   smaller min-width. Below that, overflow-x scrolls gracefully. */
.wp-card {
    flex: 1 1 0;
    min-width: 0;
    padding: .55rem .6rem;
    border-right: 1px solid #d8ddd0;
    border-top: 3px solid #1c5d2c;
    margin-top: -1px;
    overflow: hidden;
}
.wp-card:last-child { border-right: none; }
.wp-card.wp-bottleneck {
    border-top-color: #e89c1d;
}

.wp-head {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .3rem;
    overflow: hidden;
}
.wp-num {
    background: #1c5d2c;
    color: #fff;
    width: 1rem; height: 1rem;
    border-radius: 50%;
    font-size: .65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wp-bottleneck .wp-num {
    background: #e89c1d;
}
.wp-name {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #2a3829;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-time {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2a1a;
    line-height: 1.1;
}

.wp-bar {
    width: 100%;
    height: 4px;
    background: #e1e6da;
    border-radius: 2px;
    overflow: hidden;
    margin: .35rem 0 .4rem;
}
.wp-bar-fill {
    height: 100%;
    background: #1c5d2c;
    border-radius: 2px;
}
.wp-bottleneck .wp-bar-fill {
    background: #e89c1d;
}

.wp-breakdown {
    font-size: .62rem;
    color: #6b7765;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wp-meta {
    font-size: .62rem;
    color: #8a9385;
    line-height: 1.2;
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wp-cost {
    margin-top: .35rem;
    font-size: .75rem;
    font-weight: 700;
    color: #167b41;
}

.wp-empty {
    padding: 1rem;
    color: #8a9385;
    font-style: italic;
    font-size: .85rem;
    text-align: center;
}

.workflow-pipeline-totals {
    margin-top: .55rem;
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}
.wp-totals-pill {
    background: #fff;
    border: 1px solid #d8ddd0;
    border-radius: 14px;
    padding: .25rem .65rem;
    font-size: .72rem;
    color: #2a3829;
}
.wp-totals-pill.wp-bottleneck-pill {
    background: #fef3e2;
    border-color: #f0c87a;
    color: #6b4509;
}
