﻿/* ════════════════════════════════════════════════
   NxWorkflowTimeline
   Horizontal pipeline visualiser — nodes + lines.
   ════════════════════════════════════════════════ */

.nx-wf-timeline {
    --nx-wf-accent-bg: var(--nx-positive-bg);
    --nx-wf-accent-border: var(--nx-positive-fg);
    margin-bottom: var(--nx-space);
    grid-column: -1 / 1;
}

/* ── Row container ── */
.nx-wf-timeline__nodes {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 32px;
    background: var(--nx-primary-bg);
}

/* ── Stage node ── */
.nx-wf-timeline__node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    height: 32px;
    max-width: 10%;
    overflow: hidden;
    white-space: nowrap;
    background: var(--nx-secondary-bg);
    border-radius: var(--nx-border-radius);
    box-sizing: border-box;
    box-shadow: var(--nx-box-shadow);
    flex-shrink: 0;
    cursor: default;
    transition: max-width 0.35s ease;
}

    .nx-wf-timeline__node:hover {
        max-width: 60%;
        overflow: visible;
        z-index: 1;
    }

.nx-wf-timeline__node--completed {
    background: var(--nx-wf-accent-bg);
}

.nx-wf-timeline__node--current {
    min-width: max-content;
    max-width: none;
    background: var(--nx-tertiary-bg);
    font-weight: bold;
}

    .nx-wf-timeline__node--current:hover {
        max-width: none;
    }

/* ── Node label ── */
.nx-wf-timeline__label {
    font-size: 0.82rem;
    color: var(--nx-primary-fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-wf-timeline__node--current .nx-wf-timeline__label,
.nx-wf-timeline__node:hover .nx-wf-timeline__label {
    overflow: visible;
    text-overflow: unset;
}

/* ── Connecting line ── */
.nx-wf-timeline__line {
    flex: 1 1 auto;
    min-width: 2px;
    height: 4px;
    background: var(--nx-secondary-bg);
    box-shadow: var(--nx-box-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    cursor: default;
    transition: background 0.35s ease;
}

.nx-wf-timeline__line--completed {
    background: var(--nx-wf-accent-bg);
}

/* ── Time-ago pill — floats centred on the thin line ── */
.nx-wf-timeline__line-label {
    font-size: 0.7rem;
    white-space: nowrap;
    color: var(--nx-primary-fg);
    padding: 2px 8px;
    background: var(--nx-wf-accent-bg);
    border-radius: var(--nx-border-radius);
    box-shadow: var(--nx-box-shadow);
    position: relative;
    z-index: 1;
}
