/*
 * CollisionSuite — Global Button Sizing
 * Variant D from /dev/buttons/ (chosen 2026-06-10)
 *
 * Two rules, loaded in base.html after Bootstrap + typography.css:
 *
 * 1. Buttons never word-wrap. Bootstrap 5 ships .btn with
 *    white-space: normal, which turns long labels into two-line buttons
 *    sitting next to one-line neighbors. Whole buttons reflow instead
 *    (give the toolbar flex-wrap); in tables, labels must be short or
 *    responsive (see the markup convention in CLAUDE.md) — never wrapped.
 *
 * 2. Compact contexts are normalized to btn-sm metrics regardless of the
 *    size class the template author wrote, so sizing drift self-heals:
 *      - .page-actions  → the action row in a page/section header
 *      - .card-header   → card header action buttons
 *      - td             → table-row action buttons
 *    Deliberate exceptions opt out with .btn-lg (kept, e.g. the towing
 *    mobile workflow's full-width step buttons) or .btn-keep-size.
 *
 * Markup half of the convention (btn-group for related actions, icon +
 * <span class="d-none d-md-inline"> responsive labels, short verbs) lives
 * in CLAUDE.md under "Page Header Actions".
 */

.btn {
    white-space: nowrap;
}

.page-actions .btn:not(.btn-lg):not(.btn-keep-size),
.card-header .btn:not(.btn-lg):not(.btn-keep-size),
td .btn:not(.btn-lg):not(.btn-keep-size) {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-border-radius: var(--bs-border-radius-sm);
}
