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

/* Skeleton loading animation for Turbo frame lazy loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}

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

/* Toast slide-in animation */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-enter {
  animation: toast-in 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
  .toast-enter {
    animation: none;
  }
}

turbo-frame[busy] > .skeleton-container {
  display: block;
}

turbo-frame:not([busy]) > .skeleton-container {
  display: none;
}

/* Horizontal scroll fade affordance on mobile */
.scroll-fade {
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 2rem), transparent);
  mask-image: linear-gradient(to right, black calc(100% - 2rem), transparent);
}

@media (min-width: 1024px) {
  .scroll-fade {
    -webkit-mask-image: none;
    mask-image: none;
  }
}


