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

body {
  @apply bg-gray-100 dark:bg-gray-900 text-gray-900 dark:text-gray-100 antialiased select-none;
  overscroll-behavior-y: contain; /* Prevents pull-to-refresh on mobile */
}

/* Safe area insets for mobile devices (status bar, home indicator) */
.safe-area-padding {
  padding-top: env(safe-area-inset-top);
  /* padding-bottom: env(safe-area-inset-bottom); */
}

.safe-area-height {
  height: calc(100dvh - env(safe-area-inset-top));
  min-height: 0;
}

/* Basic button styling */
.btn {
  @apply px-4 py-2 rounded font-semibold focus:outline-none focus:ring-2 focus:ring-opacity-50;
}
.btn-primary {
  @apply bg-blue-500 hover:bg-blue-600 text-white focus:ring-blue-400;
}
.btn-secondary {
  @apply bg-gray-500 hover:bg-gray-600 text-white focus:ring-gray-400;
}
.btn-danger {
  @apply bg-red-500 hover:bg-red-600 text-white focus:ring-red-400;
}
.btn-warning {
  @apply bg-yellow-500 hover:bg-yellow-600 text-black focus:ring-yellow-400;
}
.btn-icon {
    @apply p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700;
}

/* Input styling */
.input-base {
    @apply mt-1 block w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm;
}

/* For preventing text selection during swipes/taps */
.no-select {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}