/* Upload preprocessing UX:
   - Show a clear "processing" message
   - Disable uploader interactions to reduce accidental re-uploads
   - Keep change minimal (no true progress bar)
*/

#upload-processing-message {
  display: none;
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* While the upload callback is running, Dash marks outputs as loading.
   We use that on the hidden flag to toggle UX. */
#upload-processing-flag[data-dash-is-loading="true"] ~ #upload-processing-message {
  display: block;
}

/* Disable the uploader box while processing */
#upload-processing-flag[data-dash-is-loading="true"] ~ .stFileUploader {
  pointer-events: none;
  opacity: 0.6;
}

/* Also disable delete-file buttons to prevent races while processing */
#upload-processing-flag[data-dash-is-loading="true"] ~ #upload-output button {
  pointer-events: none;
  opacity: 0.6;
}

