/* Ações responsivas globais. A sidebar desktop é controlada pela camada adaptativa final. */

/* Ajuste 2026-06-30: botões de ação em uma única linha no mobile.
   Mantém ações de páginas como Empresas, Eventos, Prestadores, Contratos e Financeiro em colunas proporcionais,
   evitando que botões como Filtros, Importar e Novo Contratante quebrem em blocos verticais. */
@media (max-width: 720px) {
    body:not(.has-kanban-page) .page-heading .heading-actions {
        width: 100% !important;
        max-width: 100% !important;
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        grid-template-columns: none !important;
        align-items: stretch;
        justify-content: stretch;
        gap: 8px;
    }

    body:not(.has-kanban-page) .page-heading .heading-actions .button,
    body:not(.has-kanban-page) .page-heading .heading-actions button,
    body:not(.has-kanban-page) .page-heading .heading-actions a {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
        flex: 1 1 0 !important;
        min-height: 40px;
        padding: 9px 8px;
        border-radius: 12px;
        font-size: clamp(.72rem, 2.9vw, .86rem);
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body:not(.has-kanban-page) .page-heading .heading-actions .icon-button svg {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
    }

    body:not(.has-kanban-page) .filter-actions,
    body:not(.has-kanban-page) .modal-actions,
    body:not(.has-kanban-page) .form-submit-actions {
        width: 100%;
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        grid-template-columns: none !important;
        align-items: stretch;
        gap: 8px;
    }

    body:not(.has-kanban-page) .filter-actions .button,
    body:not(.has-kanban-page) .modal-actions .button,
    body:not(.has-kanban-page) .form-submit-actions .button,
    body:not(.has-kanban-page) .form-cancel-action {
        width: 100% !important;
        min-width: 0 !important;
        white-space: nowrap;
    }

    body:not(.has-kanban-page) .form-actions--safe {
        align-items: stretch;
        gap: 10px;
    }
}

@media (max-width: 380px) {
    body:not(.has-kanban-page) .page-heading .heading-actions {
        gap: 6px;
    }

    body:not(.has-kanban-page) .page-heading .heading-actions .button,
    body:not(.has-kanban-page) .page-heading .heading-actions button,
    body:not(.has-kanban-page) .page-heading .heading-actions a {
        padding-left: 6px;
        padding-right: 6px;
        font-size: .72rem;
    }
}
