/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Enhanced UI Animations and Interactions */

/* Fade in animation for dynamic content */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Shake animation for validation errors */
@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;
}

/* Smooth transitions for form elements */
.form-field-transition {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Enhanced dropdown animations */
.dropdown-menu {
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  transform-origin: top;
}

.dropdown-menu.scale-95 {
  transform: scale(0.95);
}

.dropdown-menu.scale-100 {
  transform: scale(1);
}

/* Hover effects for interactive elements */
.interactive-hover {
  transition: all 0.2s ease;
}

.interactive-hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Focus styles for better accessibility */
.focus-ring {
  transition: box-shadow 0.2s ease;
}

.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading state animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth category info transitions */
.category-info-transition {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Enhanced button states */
.button-enhanced {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.button-enhanced:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.button-enhanced:hover:before {
  left: 100%;
}

/* Form validation states */
.field-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
}

.field-success {
  border-color: #10b981;
  box-shadow: 0 0 0 1px #10b981;
}

.field-focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive enhancements */
@media (max-width: 640px) {
  .mobile-enhanced {
    padding: 1rem;
  }
  
  .mobile-stack {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  .dark-mode-ready {
    /* Placeholder for dark mode styles */
  }
}

/* Reduced motion support for accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-shake,
  .form-field-transition,
  .dropdown-menu,
  .interactive-hover,
  .focus-ring,
  .category-info-transition,
  .button-enhanced {
    animation: none;
    transition: none;
  }
}
