/*
 * jump-status-pill is the single shared family for "a short label with a state".
 * It replaces status-badge, pill-badge, jump-form-telemetry-badge,
 * jump-form-config-dialog-pill and jump-form-list-card-tag.
 *
 * Compose it as: block + optional size + optional state + optional presentation.
 *
 *   <span class="jump-status-pill is-positive jump-status-pill-caps">Activo</span>
 *   <span class="jump-status-pill jump-status-pill-truncate">Ordem 3</span>
 *   <span class="jump-status-pill jump-status-pill-lg is-warning">No limite</span>
 *
 * States are separate is-* classes, not name suffixes, so a helper can return the
 * state on its own and feed both the pill and a sibling indicator such as
 * .jump-form-telemetry-status-dot.
 *
 * Rules and the live reference: specs/ui-components-specs.md and
 * /developers/ui-components/badges.
 */

.jump-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    max-width: 100%;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f4f7fa;
    color: #5a6b82;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

/* Two sizes only. The default (24px) covers statuses on entity form headers and
 * metadata chips in dialog and list-card rows. Legends and standalone status
 * blocks with sentence-case text get the large one. */
.jump-status-pill-lg {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
}

/* States. No state class renders as is-muted. */

.jump-status-pill.is-muted {
    background: #f4f7fa;
    color: #5a6b82;
}

.jump-status-pill.is-neutral {
    background: #edf4ff;
    color: #0d63c7;
}

.jump-status-pill.is-positive {
    background: #e8f8ee;
    color: #16643a;
}

.jump-status-pill.is-warning {
    background: #fff5e6;
    color: #8b5e00;
}

.jump-status-pill.is-critical {
    background: #fdecec;
    color: #a13030;
}

/* A row edited but not yet saved: a bar on the leading edge, matching the grid marker, so the
   state colour underneath stays readable. */
.jump-status-pill.is-dirty {
    box-shadow: inset 3px 0 0 0 #b26a00;
}

/* Presentation. Both are opt-in. */

.jump-status-pill-caps {
    text-transform: uppercase;
}

/* Caps the pill at 180px but never wider than its container, so the same
 * modifier works in a dialog meta row and inside a narrow list card. */
.jump-status-pill-truncate {
    max-width: min(180px, 100%);
    overflow: hidden;
    text-overflow: ellipsis;
}
