/* Below 1024px the sidebar is an off-canvas drawer and the content takes the full width. */
@media (max-width: 1023.98px) {
    body .dashboardContainer,
    body.showMenu .dashboardContainer {
        margin: var(--gutter, 16px);
    }

    .header-wrapper {
        width: min(300px, 86vw);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }

    .header-wrapper.drawer-open {
        transform: none;
        visibility: visible;
        box-shadow: 16px 0 40px rgba(20, 20, 19, .28);
        transition: transform .25s ease;
    }

    .menu-pin {
        display: none;
    }

    .menu-close {
        display: inline-flex;
    }

    /* in the top bar's row (resources/css/ui.css, .ui-topbar) */
    .menu-drawer-toggle {
        position: fixed;
        top: 8px;
        left: 16px;
        z-index: 96;
        display: flex;
        flex-direction: column;
        justify-content: center;
        row-gap: 4px;
        width: 40px;
        height: 40px;
        padding: 0 11px;
        border: 1px solid #E2E8F0;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(20, 20, 19, .06);
        cursor: pointer;
    }

    .menu-drawer-toggle:hover {
        background: var(--tps-subtle);
    }

    .menu-drawer-toggle:focus-visible {
        outline: 2px solid var(--tps-brand);
        outline-offset: 2px;
    }

    .menu-drawer-toggle span {
        display: block;
        height: 2px;
        border-radius: 1px;
        background: var(--tps-ink);
    }

    .menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 97;
        display: block;
        background: rgba(20, 20, 19, .5);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility 0s linear .25s;
    }

    .menu-backdrop.open {
        opacity: 1;
        visibility: visible;
        transition: opacity .25s ease;
    }

    body.menu-drawer-open {
        overflow: hidden;
    }
}

/* On phones the search wraps under the title, clear of the absolutely placed "Client nou" button. */
@media (max-width: 767.98px) {
    .dashboardHeader {
        width: 100%;
        flex-wrap: wrap;
        row-gap: 16px;
    }
}
