/*
 * 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%;
}

/* ==========================================================================
   BLOG ARTICLE BODY — typography for Markdown rendered into .blog-body
   (Redcarpet HTML; the project has no @tailwindcss/forms/typography plugin)
   ========================================================================== */
.blog-body { color: #334155; font-size: 1.0625rem; line-height: 1.75; }
.blog-body > :first-child { margin-top: 0; }
.blog-body h2 { font-size: 1.75rem; line-height: 1.25; font-weight: 600; color: #0f172a; margin: 2.5rem 0 1rem; letter-spacing: -0.01em; }
.blog-body h3 { font-size: 1.3rem; line-height: 1.3; font-weight: 600; color: #0f172a; margin: 1.75rem 0 0.6rem; }
.blog-body p { margin: 1rem 0; }
.blog-body a { color: #0f172a; text-decoration: underline; text-decoration-color: #bef264; text-underline-offset: 2px; }
.blog-body a:hover { text-decoration-color: #65a30d; }
.blog-body strong { font-weight: 600; color: #0f172a; }
.blog-body ul, .blog-body ol { margin: 1rem 0; padding-left: 1.4rem; }
.blog-body ul { list-style: disc; }
.blog-body ol { list-style: decimal; }
.blog-body li { margin: 0.4rem 0; }
.blog-body li::marker { color: #84cc16; }
.blog-body blockquote { margin: 1.5rem 0; padding: 0.75rem 1.25rem; border-left: 3px solid #84cc16; background: #f7fee7; border-radius: 0 0.5rem 0.5rem 0; color: #3f6212; }
.blog-body blockquote p { margin: 0.25rem 0; }
.blog-body code { background: #f1f5f9; padding: 0.1rem 0.35rem; border-radius: 0.3rem; font-size: 0.9em; }
.blog-body pre { background: #0f172a; color: #f1f5f9; padding: 1rem 1.25rem; border-radius: 0.75rem; overflow-x: auto; margin: 1.5rem 0; }
.blog-body pre code { background: transparent; padding: 0; }
.blog-body hr { border: 0; border-top: 1px solid #e2e8f0; margin: 2.5rem 0; }

/* Comparison tables */
.blog-body table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.blog-body thead { background: #f8fafc; }
.blog-body th, .blog-body td { border: 1px solid #e2e8f0; padding: 0.65rem 0.9rem; text-align: left; vertical-align: top; }
.blog-body th { font-weight: 600; color: #0f172a; }
.blog-body tbody tr:nth-child(even) { background: #f8fafc; }
