/* ===== Status Flow Stepper ===== */
.status-flow-stepper {
    display: flex;
    align-items: flex-start;
    padding: 8px 4px 4px;
    overflow: visible;
    gap: 0;
}

.sfs-step {
    display: flex;
    align-items: flex-start;
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

.sfs-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    min-width: 32px;
    position: relative;
    cursor: default;
}

/* Circle */
.sfs-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: 2px solid #d0d0d0;
    background: #fff;
    cursor: default;
}

.sfs-completed .sfs-circle {
    background: #4caf50;
    border-color: #4caf50;
}

.sfs-active .sfs-circle {
    background: #fff;
    border-color: #1976d2;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

.sfs-pending .sfs-circle {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

/* Check icon (completed) */
.sfs-check-icon {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* Active dot */
.sfs-active-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1976d2;
}

/* Auto-evaluate icon */
.sfs-auto-icon {
    width: 14px;
    height: 14px;
    fill: #bbb;
}

.sfs-completed .sfs-auto-icon {
    fill: #fff;
}

/* Label */
.sfs-label {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    color: #888;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sfs-completed .sfs-label {
    color: #4caf50;
    font-weight: 500;
}

.sfs-active .sfs-label {
    color: #1976d2;
    font-weight: 600;
}

/* Connectors */
.sfs-connector {
    flex: 1 1 0;
    height: 2px;
    background: #d0d0d0;
    margin-top: 14px; /* half of circle height */
    min-width: 12px;
}

.sfs-connector-done {
    background: #4caf50;
}

/* ===== Tooltip ===== */
.sfs-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Tooltip arrow (points up) */
.sfs-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #333;
}

/* Show on hover */
.sfs-node:hover .sfs-tooltip {
    opacity: 1;
    visibility: visible;
}

.sfs-tooltip-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 4px;
}

.sfs-tooltip-row {
    color: #ccc;
    font-size: 11px;
}

.sfs-tooltip-label {
    color: #999;
    margin-right: 2px;
}

.sfs-tooltip-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sfs-tooltip-badge-active {
    background: rgba(25, 118, 210, 0.3);
    color: #90caf9;
}

.sfs-tooltip-badge-pending {
    background: rgba(255, 255, 255, 0.1);
    color: #999;
}

.sfs-tooltip-badge-clickable {
    background: rgba(255, 152, 0, 0.3);
    color: #ffcc80;
}

/* ===== Clickable steps ===== */
.sfs-clickable {
    cursor: pointer;
}

.sfs-clickable .sfs-circle {
    cursor: pointer;
}

.sfs-clickable .sfs-label {
    cursor: pointer;
}

/* Hover effect on clickable pending steps */
.sfs-pending.sfs-step .sfs-clickable .sfs-circle:hover {
    border-color: #ff9800;
    background: #fff3e0;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
    transform: scale(1.1);
}

.sfs-pending.sfs-step .sfs-clickable .sfs-label:hover {
    color: #ff9800;
}

/* Hover effect on clickable completed steps (backward transition) */
.sfs-completed.sfs-step .sfs-clickable .sfs-circle:hover {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
    transform: scale(1.1);
}

.sfs-completed.sfs-step .sfs-clickable .sfs-label:hover {
    text-decoration: underline;
}
