How to include @apply CSS code for reusing TailwindCSS styles?

I’m using tailwindcss-rails gem in Rails 7 project with asset pipeline. I need to reuse TailwindCSS styles, for example:

.pagy-nav {
  @apply flex space-x-2;
}

I can put this code in app/assets/stylesheets/application.tailwind.css file and it works:

@tailwind base;
@tailwind components;
@tailwind utilities;

.pagy-nav {
  @apply flex space-x-2;
}

However, I want to put the .pagy-nav code into a separate css file. Is there a way to do it?

I got some help here: How to include @apply CSS code for reusing TailwindCSS styles with tailwindcss-rails? - Stack Overflow