/* Custom styles for Monadage client-side application */

/* Base styles */
:root {
  --primary-color: #3b82f6;
  --secondary-color: #8b5cf6;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
}

/* Ensure canvases don't have unwanted borders or margins */
canvas {
  display: block;
}

/* Custom scrollbar for pipeline builder */
.pipeline-scroll::-webkit-scrollbar {
  width: 8px;
}

.pipeline-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.pipeline-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pipeline-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Effect card hover animations */
.effect-card {
  transition: all 0.2s ease;
}

.effect-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.effect-card.dragging {
  opacity: 0.7;
  transform: rotate(5deg);
}

/* Drop zone styles */
.drop-zone {
  border: 2px dashed #d1d5db;
  transition: all 0.3s ease;
}

.drop-zone.drag-over {
  border-color: var(--primary-color);
  background-color: #eff6ff;
}

/* Processing animation */
@keyframes processing {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.processing {
  animation: processing 1s ease-in-out infinite;
}

/* Result grid animations */
.result-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom file input styling */
.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-input-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

/* Pipeline step connector lines */
.pipeline-connector {
  position: relative;
}

.pipeline-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -12px;
  width: 24px;
  height: 2px;
  background: #d1d5db;
  transform: translateY(-1px);
}

.pipeline-connector::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  width: 0;
  height: 0;
  border-left: 6px solid #d1d5db;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: translateY(-50%);
}

/* Loading shimmer effect */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Effect selector grid */
.effect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

@media (max-width: 640px) {
  .effect-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .effect-card {
    padding: 0.75rem;
  }
}

/* Focus styles for accessibility */
.focus-visible:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Dark mode support (for future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Will be implemented if needed */
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .effect-card {
    border: 2px solid;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}