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

/* Custom grid background pattern */
.bg-grid-slate-100 {
  background-image:
    linear-gradient(to right, rgb(241 245 249 / 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(241 245 249 / 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Shake animation for input validation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* Floating animation for background elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: 3s;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Pull to Refresh Styles */
[data-controller="pull-to-refresh"] {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

[data-controller="pull-to-refresh"] [data-pull-to-refresh-target="content"] {
  will-change: transform;
  backface-visibility: hidden;
}

[data-controller="pull-to-refresh"] [data-pull-to-refresh-target="indicator"] {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

/* Smooth transitions for pull feedback */
[data-controller="pull-to-refresh"] [data-pull-to-refresh-target="content"] {
  transition: transform 0.1s ease-out;
}

/* Enhanced touch feedback */
@media (hover: none) and (pointer: coarse) {
  [data-controller="pull-to-refresh"] [data-pull-to-refresh-target="content"] {
    touch-action: pan-y;
  }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  [data-controller="pull-to-refresh"] [data-pull-to-refresh-target="indicator"] {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  [data-controller="pull-to-refresh"] [data-pull-to-refresh-target="indicator"] {
    background: rgba(17, 24, 39, 0.95);
    border-bottom-color: rgba(75, 85, 99, 0.5);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  [data-controller="pull-to-refresh"] [data-pull-to-refresh-target="indicator"] {
    border-bottom-width: 2px;
    border-bottom-color: currentColor;
  }
}
