/*
 * Phone layout fixes (owner, 19/11/2026: page buttons overlapping on Clients and Priority Levels).
 * Loaded after the theme so these win by load order and specificity alone.
 */
@media (max-width: 768px) {
    /* Header buttons: one tidy row that wraps, left-aligned, each button its own height. */
    .fi-header .fi-header-actions-ctn {
        width: 100%;
        overflow-x: visible;
    }
    .fi-header .fi-header-actions-ctn {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }
    /* Help comes before the page's own buttons in its own group; the group steps aside so all
       the buttons share one row that wraps (Help, New client, Add existing client). */
    .fi-header .fi-header-actions-ctn > .fi-ac {
        display: contents;
    }
    .fi-header .fi-header-actions-ctn .fi-btn {
        flex: 0 0 auto;
    }
    /* A secondary button keeps an outline so it reads as a button on the grey page. */
    .fi-header .fi-header-actions-ctn .fi-btn.fi-color-gray {
        border: 1px solid var(--crm-border, #e5eae7);
        background: var(--crm-surface, #fff);
    }
}
