/*
 * «Flujo de procesos» (D119): looks that a component lends to the components it renders. Scoped CSS cannot share them
 * without ::deep, so they live here, loaded after the scoped bundle, each block under the root that owns it.
 * - .pf-dialog: the colors of each kind of handover (data-kind) and of the ring of the other end (data-focus).
 * - .pf-gd: the controls an assistant and «Probar un carro» share in the right pane (ProcessFlowWizardPane and
 *   ProcessFlowSimulatorPane); the bar, space and foot stay in ProcessFlowGuidePane.razor.css.
 */

/* What each kind of handover paints (data-kind), for every piece inside the popup: line, soft fill and ink. */
.pf-dialog [data-kind="sigue"] {
    --tc: var(--t-sigue);
    --tcs: var(--t-sigue-soft);
    --tci: var(--t-sigue-ink);
}

.pf-dialog [data-kind="par"] {
    --tc: var(--t-par);
    --tcs: var(--t-par-soft);
    --tci: var(--t-par-ink);
}

.pf-dialog [data-kind="esp"] {
    --tc: var(--t-esp);
    --tcs: var(--t-esp-soft);
    --tci: var(--t-esp-ink);
}

.pf-dialog [data-kind="vue"] {
    --tc: var(--t-vue);
    --tcs: var(--t-vue-soft);
    --tci: var(--t-vue-ink);
}

.pf-dialog [data-kind="dev"] {
    --tc: var(--t-dev);
    --tcs: var(--t-dev-soft);
    --tci: var(--t-dev-ink);
}

/* «Unión» has its own icon and color (P16). */
.pf-dialog [data-kind="join"] {
    --tc: var(--navy);
    --tcs: var(--st-surface-strong);
    --tci: var(--navy);
}

/* The chips that are not a kind: navy («Obligatorias», «Con uso») and slate (what is not offered or used). */
.pf-dialog [data-kind="navy"] {
    --tc: var(--navy);
    --tcs: var(--navy-soft);
    --tci: var(--navy);
}

.pf-dialog [data-kind="slate"] {
    --tc: var(--st-text-subtle);
    --tcs: var(--bg-soft);
    --tci: var(--ink-2);
}

/* The ring of the other end of the handover open on the right, in the color of its type. */
.pf-dialog [data-focus="sigue"] {
    --fc: var(--t-sigue);
    --fcs: var(--t-sigue-soft);
}

.pf-dialog [data-focus="par"] {
    --fc: var(--t-par);
    --fcs: var(--t-par-soft);
}

.pf-dialog [data-focus="esp"] {
    --fc: var(--t-esp);
    --fcs: var(--t-esp-soft);
}

.pf-dialog [data-focus="vue"] {
    --fc: var(--t-vue);
    --fcs: var(--t-vue-soft);
}

/* ─── Assistant and «Probar un carro» (.pf-gd) ─────────────────────────────────── */
/* «← Cancelar», «← Salir» and the title of the bar. */
.pf-gd .pf-gd-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 10px 0 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.pf-gd .pf-gd-back:hover {
    background: var(--bg-soft);
    color: var(--ink);
}

.pf-gd .pf-gd-title {
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 700;
}

.pf-gd .pf-grow {
    flex: 1;
}

/* Buttons (.btn, .btn.pri, .btn.sm). */
.pf-gd .pf-gbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.pf-gd .pf-gbtn:hover:not(:disabled) {
    border-color: var(--faint);
    background: var(--bg-alt);
}

.pf-gd .pf-gbtn:disabled {
    color: var(--faint);
    background: var(--bg);
    cursor: default;
}

.pf-gd .pf-gbtn.is-pri {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.pf-gd .pf-gbtn.is-pri:hover:not(:disabled) {
    border-color: #bf1573;
    background: #bf1573;
}

.pf-gd .pf-gbtn.is-pri:disabled {
    border-color: var(--border-strong);
    background: var(--bg-soft);
    color: var(--faint);
}

.pf-gd .pf-gbtn.is-sm {
    height: 30px;
    padding: 0 9px;
}

/* A choice of two or three (.seg). */
.pf-gd .pf-gseg {
    display: inline-flex;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--bg);
}

.pf-gd .pf-gseg button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid var(--border);
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.pf-gd .pf-gseg button:last-child {
    border-right: 0;
}

.pf-gd .pf-gseg button[aria-checked="true"] {
    background: var(--sel-soft);
    color: var(--sel-ink);
}

/* A field with its label (.fld). */
.pf-gd .pf-gfld {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.pf-gd .pf-gfld > label,
.pf-gd .pf-gfld-l {
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 600;
}

.pf-gd .pf-gfld select,
.pf-gd .pf-gfld input[type="text"] {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}

.pf-gd .pf-gfld select:focus,
.pf-gd .pf-gfld input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(216, 27, 132, 0.18);
}

.pf-gd .pf-ghint {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
}

.pf-gd .pf-glist-t {
    margin: 6px 0 0;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* «Paso 2», «Devolución 1 de 149» (.wz-count). */
.pf-gd .pf-gcount {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* The priority of a handover (.ho-rank.sm). */
.pf-gd .pf-grank {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 5px;
    border: 2px solid var(--navy);
    border-radius: 999px;
    background: var(--st-surface);
    box-shadow: 0 0 0 2px var(--bg);
    color: var(--navy);
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pf-gd .pf-gd-back:focus-visible,
.pf-gd .pf-gbtn:focus-visible,
.pf-gd .pf-gseg button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
