/*
 * 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.
 */

/* ==========================================================================
   TOAST ANIMATIONS
   ========================================================================== */

/* Slide in from right */
@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Slide out to right */
@keyframes slide-out-right {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Fade in */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Indeterminate progress bar */
@keyframes progress-indeterminate {
  0% {
    width: 0%;
    margin-left: 0%;
  }
  50% {
    width: 50%;
    margin-left: 25%;
  }
  100% {
    width: 0%;
    margin-left: 100%;
  }
}

/* Pulse once for button feedback */
@keyframes pulse-once {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Shimmer effect for skeletons */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Animation classes */
.animate-slide-in {
  animation: slide-in-right 0.3s ease-out forwards;
}

.animate-slide-out {
  animation: slide-out-right 0.3s ease-in forwards;
}

.animate-fade-in {
  animation: fade-in 0.2s ease-out forwards;
}

.animate-progress-indeterminate {
  animation: progress-indeterminate 1.5s ease-in-out infinite;
}

.animate-pulse-once {
  animation: pulse-once 0.3s ease-in-out;
}

.animate-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ==========================================================================
   DRAG & DROP IMPROVEMENTS
   ========================================================================== */

/* Smooth transitions for dropzone */
[data-upload-target="dropzone"] {
  transition: all 0.2s ease-out;
}

/* Scale effect when dragging over */
[data-upload-target="dropzone"].scale-\[1\.02\] {
  transform: scale(1.02);
}

/* ==========================================================================
   TOAST CONTAINER POSITIONING
   ========================================================================== */

#toast-container {
  pointer-events: none;
}

#toast-container > * {
  pointer-events: auto;
}

/* ==========================================================================
   PROCESSING STATUS INDICATOR
   ========================================================================== */

/* Pulsing dot for "current step" indicator */
.animate-pulse-dot {
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Status badge transitions */
.status-badge {
  transition: all 0.2s ease-out;
}

/* ==========================================================================
   CARD HOVER EFFECTS
   ========================================================================== */

/* Document cards lift on hover */
.document-card {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}

.document-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ==========================================================================
   SCROLLBAR STYLING (for webkit browsers)
   ========================================================================== */

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

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

/* ==========================================================================
   FOCUS RING UTILITIES
   ========================================================================== */

.focus-ring {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   SKELETON LOADING
   ========================================================================== */

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 80%;
}

.skeleton-circle {
  border-radius: 50%;
}
