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

/* Import markdown styling */
@import "pagy.css";
@import "static.css";
/* Turbo Frame loading states (#23 — visual feedback during frame loads) */
turbo-frame[aria-busy] {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
  cursor: wait;
}

turbo-frame[aria-busy]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 10;
}

/* Spinner overlay for frames that have a min-height */
turbo-frame[aria-busy][data-loading-spinner] {
  min-height: 3rem;
}

turbo-frame[aria-busy][data-loading-spinner]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: turbo-frame-spin 0.6s linear infinite;
  z-index: 11;
}

@keyframes turbo-frame-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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