@import "tailwindcss";
@import "filepond/dist/filepond.css";

@layer components {
  /* Layout */
  .page { @apply mx-auto w-full max-w-5xl px-5 py-10 sm:px-8; }
  .page-narrow { @apply mx-auto w-full max-w-md px-5 py-12 sm:px-8; }

  /* Buttons. button_to renders a form, so these go on the button itself. */
  .btn {
    @apply inline-flex cursor-pointer items-center justify-center gap-2 rounded-lg px-4 py-2 text-sm
           font-medium transition duration-150 focus-visible:outline-2
           focus-visible:outline-offset-2 focus-visible:outline-zinc-900;
  }
  .btn-primary { @apply bg-cyan-600 text-white hover:bg-cyan-700 active:bg-cyan-800; }
  .btn-secondary {
    @apply border border-zinc-200 bg-white text-zinc-700 hover:border-zinc-300 hover:bg-zinc-50;
  }
  .btn-quiet { @apply px-2 text-zinc-500 hover:text-zinc-900; }
  .btn-danger { @apply px-2 text-zinc-500 hover:text-red-600; }
  /* For the step that actually deletes, after a page has asked. */
  .btn-destructive { @apply bg-red-600 text-white hover:bg-red-700 active:bg-red-800; }

  /* The top bar and its menu, see shared/_top_bar. */
  .icon-btn {
    @apply flex size-10 cursor-pointer items-center justify-center rounded-full text-zinc-900
           hover:bg-zinc-200/60;
  }
  .icon-btn-prominent { @apply size-11 text-white hover:bg-white/10; }
  .icon-btn-accent { @apply text-cyan-700 hover:bg-cyan-700/10; }
  /* Placed under its button by the menu controller; this is where it opens
     should that not run. */
  .menu {
    @apply inset-auto top-12 right-2 m-0 w-64 rounded-xl border-0 bg-white p-1 shadow-lg
           ring-1 ring-zinc-900/10;
  }
  .menu-info { @apply px-3 py-2 text-xs text-zinc-500; }
  .menu-divider { @apply my-1 border-t border-zinc-100; }
  .menu-item {
    @apply flex w-full cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-sm
           text-zinc-900 hover:bg-zinc-100;
  }
  .menu-item-danger { @apply text-red-600 hover:bg-red-50; }

  /* Surfaces */
  .card { @apply rounded-xl border border-zinc-200 bg-white; }
  .meta { @apply text-sm text-zinc-500; }

  /* Forms */
  .field-label { @apply block text-sm font-medium text-zinc-700; }
  .field {
    @apply mt-1.5 block w-full rounded-lg border border-zinc-300 bg-white px-3 py-2 text-sm
           transition placeholder:text-zinc-400 focus:border-zinc-900 focus:outline-none
           focus:ring-2 focus:ring-zinc-900/10;
  }

  /* The dropzone, brought in line with the rest of the forms. */
  .filepond--root { @apply mb-0 font-sans; }
  .filepond--panel-root { @apply rounded-xl border border-dashed border-zinc-300 bg-zinc-50; }
  .filepond--drop-label { @apply text-sm text-zinc-500; }
  .filepond--label-action { @apply font-medium text-zinc-900 decoration-zinc-300 underline-offset-2; }
  .filepond--item-panel { @apply rounded-lg bg-zinc-800; }
}
