/* Header chip for an AI dashboard build running in the background.
   Hidden until the poll finds a run of this user's still in flight, so it
   costs nothing visually on the overwhelming majority of page loads.
   See js/shared/dashboard_build_indicator.js. */

.dash-build-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--color-primary-border, #c6dafc);
    border-radius: 16px;
    background: var(--color-primary-soft, #e8f0fe);
    color: var(--color-primary, #1a73e8);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-build-chip:hover {
    background: var(--color-primary-soft-hover, #d7e5fd);
    border-color: var(--color-primary, #1a73e8);
}

.dash-build-chip[hidden] {
    display: none;
}

.dash-build-chip i {
    font-size: 12px;
}

/* Second and later concurrent runs collapse into a count rather than a
   row of chips — the header has no room and the first run is the one the
   click resumes anyway. */
.dash-build-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--color-primary, #1a73e8);
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.dash-build-chip-count[hidden] {
    display: none;
}

/* Narrow headers: keep the spinner as the signal and drop the words.
   The title attribute still carries the full label. */
@media (max-width: 900px) {
    .dash-build-chip-text {
        display: none;
    }

    .dash-build-chip {
        padding: 0 10px;
    }
}
