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

@layer utilities {
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  .animate-fade-in {
    animation: fadeIn 0.8s ease-out;
  }

  .animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
    opacity: 0;
  }

  /* Prevent icons from being flipped in RTL mode */
  [dir="rtl"] .rtl-flip-reset {
    transform: scaleX(1) !important;
  }
}

/* Pagy navigation */
.pagy {
  @apply flex space-x-1 font-semibold text-sm text-gray-500 dark:text-gray-400;
  a:not(.gap) {
    @apply block rounded-lg px-3 py-1 bg-gray-200 dark:bg-gray-700;
    &:hover {
      @apply bg-gray-300 dark:bg-gray-600;
    }
    &:not([href]) { /* disabled links */
      @apply text-gray-300 bg-gray-100 dark:text-gray-600 dark:bg-gray-800 cursor-default;
    }
    &.current {
      @apply text-white bg-gray-400 dark:bg-gray-500;
    }
  }
  label {
    @apply inline-block whitespace-nowrap bg-gray-200 dark:bg-gray-700 rounded-lg px-3 py-0.5;
    input {
      @apply bg-gray-100 dark:bg-gray-800 border-none rounded-md;
    }
  }
}
