.toolbar-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #fafafa;
    padding: 16px;
    border-radius: 4px;
}

.toolbar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
}

.toolbar-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    min-width: 0; /* Allow container to shrink */

    &.checkboxes {
        justify-content: flex-end;
        flex-shrink: 1;
    }

    > a[nz-button] {
        flex-shrink: 1;
        min-width: 32px;
        max-width: 32px;
        overflow: hidden;
    }
}

.checkbox-item {
    min-width: 96px;
    display: flex;
    align-items: center;
    flex-shrink: 1;

    label {
        margin-bottom: 0;
    }
}

.toolbar-note {
    .note-text {
        padding: 8px;
        background-color: #fff;
        border-radius: 4px;
        color: rgba(0, 0, 0, 0.65);
    }
}

// Make buttons consistent height
[nz-button] {
    height: 32px;
    min-width: 32px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

// Responsive adjustments
@media screen and (max-width: 768px) {
    .toolbar-controls {
        flex-direction: column;
        gap: 12px;
    }

    .toolbar-group {
        width: 100%;
        justify-content: flex-start;

        &.checkboxes {
            justify-content: flex-end;
        }
    }

    .checkbox-item {
        flex-shrink: 1;
        flex-grow: 1;
        flex-basis: calc(50% - 8px);
        max-width: calc(50% - 8px);
    }

    [nz-button] {
        flex-shrink: 1;
        flex-grow: 1;
        flex-basis: calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}

@media screen and (max-width: 480px) {
    .checkbox-item,
    [nz-button] {
        flex-shrink: 1;
        flex-grow: 1;
        flex-basis: 100%;
        max-width: 100%;
    }
}
