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

@layer utilities {
  .line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  
  .aspect-square {
    aspect-ratio: 1 / 1;
  }
}

@layer components {
  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }
  
  /* Scroll reveal animations */
  [data-scroll-reveal-target="item"] {
    opacity: 0;
    transform: translateY(60px) scale(0.8);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  [data-scroll-reveal-target="item"].animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  
  /* Staggered animation delays for child elements */
  [data-scroll-reveal-target="item"] .reveal-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
  }
  
  [data-scroll-reveal-target="item"].animate-in .reveal-title {
    opacity: 1;
    transform: translateY(0);
  }
  
  [data-scroll-reveal-target="item"] .reveal-description {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
  }
  
  [data-scroll-reveal-target="item"].animate-in .reveal-description {
    opacity: 1;
    transform: translateY(0);
  }
  
  [data-scroll-reveal-target="item"] .reveal-feature {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  [data-scroll-reveal-target="item"].animate-in .reveal-feature:nth-child(1) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.6s;
  }
  
  [data-scroll-reveal-target="item"].animate-in .reveal-feature:nth-child(2) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.75s;
  }
  
  [data-scroll-reveal-target="item"].animate-in .reveal-feature:nth-child(3) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.9s;
  }
  
  /* Image reveal */
  [data-scroll-reveal-target="item"] .reveal-image {
    opacity: 0;
    transform: scale(1.1) translateY(40px);
    filter: blur(8px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  [data-scroll-reveal-target="item"].animate-in .reveal-image {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0px);
  }
  
  /* Hover effects */
  .reveal-image:hover {
    transform: scale(1.05) translateY(-5px) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  
  .reveal-feature:hover {
    transform: translateX(5px) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  
  /* Mobile optimization */
  @media (max-width: 768px) {
    [data-scroll-reveal-target="item"] {
      transform: translateY(30px) scale(0.95);
    }
    
    .reveal-image {
      filter: none !important;
    }
  }
  
  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    [data-scroll-reveal-target="item"],
    .reveal-title,
    .reveal-description,
    .reveal-feature,
    .reveal-image {
      transition: none !important;
      transform: none !important;
      opacity: 1 !important;
    }
  }
  
  /* Advanced floating image system */
  .floating-scene-image {
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
    will-change: transform;
  }
  
  .floating-scene-image:hover {
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.2));
  }
  
  /* Sophisticated backdrop integration */
  .scene-backdrop {
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
  }
  
  /* Parallax-style movement for floating images */
  @media (min-width: 768px) {
    .floating-scene-image {
      animation: gentle-float 8s ease-in-out infinite;
    }
  }
  
  @keyframes gentle-float {
    0%, 100% {
      transform: translateY(0px) rotate(var(--rotation-start, 0deg));
    }
    50% {
      transform: translateY(-10px) rotate(var(--rotation-end, 0deg));
    }
  }
  
  /* Dynamic rotation variables for each image */
  .rotate-positive {
    --rotation-start: 3deg;
    --rotation-end: 6deg;
  }
  
  .rotate-negative {
    --rotation-start: -6deg;
    --rotation-end: -3deg;
  }
  
  .rotate-moderate {
    --rotation-start: 6deg;
    --rotation-end: 9deg;
  }
  
  /* Enhanced blend modes for better integration */
  .blend-overlay {
    mix-blend-mode: overlay;
    opacity: 0.8;
  }
  
  .dark .blend-overlay {
    mix-blend-mode: soft-light;
    opacity: 0.6;
  }
  
  /* Progressive image reveals */
  .progressive-reveal {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    animation: reveal-in 1s ease-out forwards;
    animation-delay: var(--reveal-delay, 0s);
  }
  
  @keyframes reveal-in {
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  /* Exciting hero gradient system */
  .bg-radial-gradient-to-center {
    background: radial-gradient(ellipse at center, transparent 0%, transparent 40%, rgba(0,0,0,0.1) 100%);
  }
  
  /* Enhanced hero animations */
  @keyframes hero-glow {
    0%, 100% {
      opacity: 0.8;
      transform: scale(1);
    }
    50% {
      opacity: 1;
      transform: scale(1.02);
    }
  }
  
  @keyframes gradient-shift {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  
  /* Orange brand gradient animation */
  .hero-animated-gradient {
    background: linear-gradient(-45deg, 
      theme(colors.orange.400), 
      theme(colors.orange.500), 
      theme(colors.red.500), 
      theme(colors.orange.600),
      theme(colors.amber.500)
    );
    background-size: 400% 400%;
    animation: gradient-shift 8s ease infinite;
  }
  
  /* Dark mode hero adjustments */
  .dark .hero-animated-gradient {
    background: linear-gradient(-45deg, 
      theme(colors.orange.500), 
      theme(colors.orange.600), 
      theme(colors.red.600), 
      theme(colors.orange.700),
      theme(colors.amber.600)
    );
  }
  
  /* Hero text enhancements */
  .hero-text-glow {
    text-shadow: 
      0 0 20px rgba(255, 255, 255, 0.5),
      0 0 40px rgba(255, 215, 0, 0.3),
      0 0 60px rgba(255, 165, 0, 0.2);
  }
  
  .dark .hero-text-glow {
    text-shadow: 
      0 0 20px rgba(255, 215, 0, 0.6),
      0 0 40px rgba(255, 165, 0, 0.4),
      0 0 60px rgba(255, 140, 0, 0.3);
  }
  
  /* SortableJS styles for drag and drop */
  .sortable-ghost {
    opacity: 0.4;
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed #3b82f6;
    border-radius: 0.5rem;
  }
  
  .sortable-chosen {
    transform: rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
  }
  
  .sortable-drag {
    opacity: 1;
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    z-index: 1000;
  }
  
  .dark .sortable-ghost {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
  }
}

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/* Menu Builder Styles */

/* Smooth transitions for interactive elements */
.menu-builder-transition {
  transition: all 0.2s ease-in-out;
}

/* Category expand/collapse animation */
[data-controller="menu-category"] [data-menu-category-target="itemsList"] {
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Drag and drop visual feedback */
.menu-item-dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.menu-item-drag-over {
  border-top: 3px solid #3B82F6;
}

/* Preview panel styling */
.menu-preview-item {
  transition: transform 0.2s ease-in-out;
}

.menu-preview-item:hover {
  transform: translateY(-2px);
}

/* Modal animations */
[data-menu-builder-target="itemModal"]:not(.hidden) {
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Tutorial card animation */
[data-menu-builder-target="tutorial"] {
  animation: slideDown 0.5s ease-out;
}

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

/* Progress indicator styling */
.progress-step {
  position: relative;
}

.progress-step::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 100px;
  height: 2px;
  background-color: #E5E7EB;
  transform: translateY(-50%);
}

.progress-step:last-child::after {
  display: none;
}

.progress-step.completed::after {
  background-color: #10B981;
}

/* SortableJS Drag and Drop Styles */
.sortable-ghost {
  opacity: 0.4;
  background-color: #f3f4f6;
  border: 2px dashed #9ca3af;
}

.sortable-chosen {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
  z-index: 1000;
}

.sortable-drag {
  opacity: 1;
  transform: rotate(2deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Dark mode support for sortable states */
@media (prefers-color-scheme: dark) {
  .sortable-ghost {
    background-color: #374151;
    border-color: #6b7280;
  }
  
  .sortable-chosen {
    border-color: #60a5fa;
  }
}

/* Item drag handle styles */
.item-drag-handle {
  transition: all 0.2s ease-in-out;
}

.item-drag-handle:hover {
  transform: scale(1.1);
}

/* Visual feedback for cross-category drops */
[data-menu-category-target="itemsList"].sortable-drop-target {
  background-color: #eff6ff;
  border: 2px dashed #3b82f6;
  border-radius: 0.5rem;
  min-height: 60px;
  padding: 1rem;
}

/* Dark mode for cross-category drops */
@media (prefers-color-scheme: dark) {
  [data-menu-category-target="itemsList"].sortable-drop-target {
    background-color: #1e3a8a20;
    border-color: #60a5fa;
  }
}

/* Help section transitions */
[data-menu-builder-target="helpContent"],
[data-menu-builder-target="modifierHelpContent"] {
  transition: all 0.3s ease-in-out;
}

[data-menu-builder-target="helpToggleIcon"],
[data-menu-builder-target="modifierHelpToggleIcon"] {
  transition: transform 0.3s ease-in-out;
}

/* Help section hover effects */
[data-action="click->menu-builder#toggleHelp"]:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

[data-action="click->menu-builder#toggleModifierHelp"]:hover {
  background-color: rgba(34, 197, 94, 0.05);
}

@media (prefers-color-scheme: dark) {
  [data-action="click->menu-builder#toggleHelp"]:hover {
    background-color: rgba(59, 130, 246, 0.1);
  }
  
  [data-action="click->menu-builder#toggleModifierHelp"]:hover {
    background-color: rgba(34, 197, 94, 0.1);
  }
}
/* Menu Reorder Drag and Drop Styles */

/* Dragging item styles */
.dragging {
  opacity: 0.6 !important;
  transform: rotate(2deg) scale(1.05);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2) !important;
  z-index: 1000 !important;
  position: relative !important;
  cursor: grabbing !important;
}

/* Dark mode dragging styles */
.dark .dragging {
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4) !important;
}

/* Drop zone active styles */
.drop-zone-active {
  background-color: rgba(59, 130, 246, 0.1);
  border: 2px dashed rgba(59, 130, 246, 0.5);
  border-radius: 8px;
  transition: all 0.2s ease;
}

/* Dark mode drop zone styles */
.dark .drop-zone-active {
  background-color: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.7);
}

/* Drop target item styles */
.drop-target-active {
  border: 2px solid rgba(59, 130, 246, 0.8) !important;
  background-color: rgba(59, 130, 246, 0.1) !important;
  transition: all 0.2s ease;
}

/* Dark mode drop target styles */
.dark .drop-target-active {
  border-color: rgba(59, 130, 246, 0.9) !important;
  background-color: rgba(59, 130, 246, 0.15) !important;
}

/* Menu items container styling */
.menu-items {
  min-height: 120px;
  transition: all 0.2s ease;
}

/* Individual menu item styling */
[data-menu-reorder-target="item"] {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-menu-reorder-target="item"]:hover:not(.dragging) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark mode hover effects */
.dark [data-menu-reorder-target="item"]:hover:not(.dragging) {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Category section styling */
.category-section {
  transition: all 0.2s ease;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 0.5rem 0;
}

/* Visual feedback for empty categories during drag */
.category-section.drop-zone-active .menu-items:empty::before {
  content: "Drop menu item here";
  display: block;
  text-align: center;
  padding: 2rem;
  color: #6B7280;
  font-style: italic;
  border: 2px dashed #D1D5DB;
  border-radius: 8px;
  background-color: #F9FAFB;
}

.dark .category-section.drop-zone-active .menu-items:empty::before {
  color: #9CA3AF;
  border-color: #374151;
  background-color: #1F2937;
}

/* Dragging cursor for the entire page when dragging */
body.dragging-active {
  cursor: grabbing !important;
}

/* Drag handle styling - optimized for touch */
.drag-handle {
  opacity: 0.7;
  cursor: grab;
  transition: all 0.2s ease;
  touch-action: none; /* Prevent scrolling when dragging */
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.drag-handle:hover {
  opacity: 1;
}

.drag-handle {
  pointer-events: auto;
  cursor: grab !important;
}

.drag-handle:active {
  cursor: grabbing !important;
}

/* Ensure drag handle works on touch devices */
@media (pointer: coarse) {
  .drag-handle {
    opacity: 0.8; /* More visible on touch devices */
    padding: 0.75rem; /* Larger touch target */
  }
}

/* Menu item cursor states - only for app-managed menus */
[data-menu-reorder-app-managed-value="true"] [data-menu-reorder-target="item"]:not(.dragging) {
  cursor: grab !important;
}

[data-menu-reorder-app-managed-value="true"] [data-menu-reorder-target="item"]:active:not(.dragging) {
  cursor: grabbing !important;
}

/* Error notification styling */
.error-notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color: #EF4444;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  z-index: 50;
  max-width: 300px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Success notification styling */
.success-notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color: #10B981;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  z-index: 50;
  max-width: 300px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Drag placeholder space styling */
.drag-placeholder-space {
  display: block;
  flex-shrink: 0;
  transition: all 0.2s ease;
  opacity: 0.8;
  animation: placeholderPulse 2s ease-in-out infinite;
}

/* Dark mode drag placeholder space */
.dark .drag-placeholder-space {
  background-color: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.7) !important;
}

/* Subtle pulse animation for placeholder */
@keyframes placeholderPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
} 
/*
 * 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.
 *


 */
