.field :global(.MuiInputBase-input:not(:disabled)) {
    cursor: pointer;
}

.drawer.drawer {
    width: min(640px, 100vw);
    height: 100%;
}

.drawerBody {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.groupGrid {
    display: grid;
    min-height: 0;
    align-content: start;
    align-items: start;
    grid-auto-rows: min-content;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-2);
    overflow-y: auto;
    padding-right: var(--space-1);
}

.groupCard {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    min-width: 0;
    min-height: 76px;
    align-items: start;
    gap: var(--space-1) var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition:
        border-color var(--motion-fast) var(--ease-standard),
        background var(--motion-fast) var(--ease-standard),
        box-shadow var(--motion-fast) var(--ease-standard),
        transform var(--motion-base) var(--ease-emphasized);
}

.groupCard:hover {
    border-color: var(--primary-border);
    background: var(--primary-surface);
    box-shadow: none;
    transform: none;
}

.groupCard:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.groupCardSelected,
.groupCardSelected:hover {
    border-color: var(--primary);
    background: var(--primary-surface-strong);
    box-shadow: inset 0 0 0 1px var(--primary-border);
}

.emptyCard {
    min-height: 64px;
    align-items: center;
}

.groupIcon {
    display: inline-flex;
    grid-row: 1 / 4;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-card-strong);
    color: var(--text-secondary);
}

.groupIcon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.groupName,
.groupMeta,
.groupItem {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.groupName {
    color: var(--text-primary);
    font-weight: 700;
}

.groupMeta {
    color: var(--text-tertiary);
    font-size: 13px;
}

.groupItems {
    display: flex;
    grid-column: 2;
    min-width: 0;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.groupItem {
    display: inline-flex;
    max-width: 100%;
    height: var(--admin-tag-height);
    align-items: center;
    padding: 0 var(--space-2);
    border: 1px solid var(--admin-tag-border);
    border-radius: var(--admin-tag-radius);
    background: var(--admin-tag-bg);
    color: var(--admin-tag-color);
    font-size: 12px;
    font-weight: 650;
}

.emptyState {
    display: flex;
    min-height: 180px;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-weight: 650;
}

@media (max-width: 640px) {
    .groupGrid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .groupCard {
        transition: none;
    }

    .groupCard:hover {
        transform: none;
    }
}
