/*
 * Pokerium shared action-chip primitive.
 *
 * One source of truth for the "coloured pill labelled with an action
 * name" UI element that recurs across the site:
 *   - Range Drawer    (results breakdown chip — `.action-breakdown-chip`)
 *   - Range Viewer    (action distribution card)
 *   - Range Trainer   (future use)
 *   - Reports Trainer (future use)
 *
 * Usage:
 *   <span class="pk-action-chip" style="--action-color: #c1440e">Raise</span>
 *
 * Variants (additive classes):
 *   .pk-action-chip-block   stretches to 100% width with label-left /
 *                           value-right layout (used by the owner-page
 *                           distribution side panel where width is tight).
 *   .pk-action-chip-stack   vertical, label on top of value, sits at
 *                           content size so chips wrap side by side
 *                           (used for the under-grid legend in viewers).
 *   .pk-action-chip-dark    dark text — pair with light backgrounds when
 *                           the author opted into dark cell labels.
 *
 * The chip never reaches outside its container; per-action background
 * is supplied via the inline `--action-color` custom property so JS
 * stays the single source of truth for colour resolution.
 */

.pk-action-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.25rem 0.6rem;
    background: var(--action-color, var(--pk-accent));
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: nowrap;
}

.pk-action-chip-block {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.pk-action-chip-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.4rem 0.7rem;
    min-width: 76px;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.pk-action-chip-stack .pk-action-chip-value {
    font-size: 0.95em;
}

.pk-action-chip-dark {
    color: #181818;
    text-shadow: none;
}

.pk-action-chip-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.pk-action-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
