/**
 * Livewire file upload: spinner overlay on preview area (wire:target = property name).
 * Loaded on dashboard + public home.
 */
:root {
  --lw-upload-accent: #0d9488;
  --lw-upload-accent-dim: rgba(13, 148, 136, 0.28);
}

.lw-upload-preview {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

.lw-upload-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.lw-upload-preview.is-active .lw-upload-loading {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lw-upload-loading::after {
  content: "";
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 3px solid var(--lw-upload-accent-dim);
  border-top-color: var(--lw-upload-accent);
  animation: lw-upload-spin 0.65s linear infinite;
}

@keyframes lw-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lw-upload-loading::after {
    animation: none;
    border-top-color: #0f766e;
  }
}

/* Empty preview: room for overlay during first upload */
.lw-upload-preview--slot {
  min-height: 3rem;
  min-width: 7.5rem;
}
