/* ==========================================================================
   Global file-upload guard styles
   - Hide Alpine x-cloak elements until Alpine initialises.
   - Show a spinner + "Uploading file…" on the primary save button while a
     Livewire file upload is in progress (button gets the .upload-busy class
     from file-upload-guard.js).
   ========================================================================== */

[x-cloak] {
    display: none !important;
}

/* Disabled (greyed) save button while a file is uploading — no animation on it. */
.successAlertMessage.upload-busy {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Spinner shown below the file input while its upload is in progress. */
.cf-uploading {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: #4f46e5;
    margin-top: .35rem;
}

.cf-uploading__spinner {
    width: .9em;
    height: .9em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: cffuSpin .6s linear infinite;
}

@keyframes cffuSpin {
    to { transform: rotate(360deg); }
}
