/*
 * Lightweight AJAX/form action-loading indicator.
 *
 * Previously a position:fixed, full-viewport, dark-gradient blocking modal -
 * the opposite of the "lightweight spinner" the AC calls for. Replaced with a
 * small fixed chip (no backdrop, page stays fully visible and readable) -
 * only .action-loading toggling ".active" is unchanged, so no JS/blade
 * changes were needed elsewhere to pick this up.
 */
.action-loading.active {
    position: fixed;
    z-index: 9998;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 14px rgba(15, 36, 29, 0.18);
}

.action-loading.active:not(:required) {
    /* hide "loading..." text */
    font: 0/0 a;
    color: transparent;
    text-shadow: none;
    background-color: rgba(255, 255, 255, 0.95);
    border: 0;
}

.action-loading.active:not(:required):after {
    content: "";
    display: block;
    font-size: 6px;
    width: 1em;
    height: 1em;
    animation: imadani-action-spinner 900ms infinite linear;
    border-radius: 0.5em;
    box-shadow: rgba(20, 135, 111, 0.9) 1.5em 0 0 0,
        rgba(20, 135, 111, 0.9) 1.1em 1.1em 0 0,
        rgba(20, 135, 111, 0.9) 0 1.5em 0 0,
        rgba(20, 135, 111, 0.65) -1.1em 1.1em 0 0,
        rgba(20, 135, 111, 0.4) -1.5em 0 0 0,
        rgba(20, 135, 111, 0.25) -1.1em -1.1em 0 0,
        rgba(20, 135, 111, 0.15) 0 -1.5em 0 0,
        rgba(20, 135, 111, 0.5) 1.1em -1.1em 0 0;
}

@keyframes imadani-action-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .action-loading.active:not(:required):after {
        animation: none !important;
    }
}
