:root {
    --nc-action-accent: #ed0033;
    --nc-action-accent-2: #ff5a1f;
    --nc-action-ink: #111827;
}

#ncInstantProgress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483646;
    width: 100%;
    height: 3px;
    pointer-events: none;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, var(--nc-action-accent-2), var(--nc-action-accent), #8b5cf6);
    box-shadow: 0 0 18px rgba(237, 0, 51, .42);
    transition: transform .18s ease, opacity .18s ease;
}

html.nc-network-busy #ncInstantProgress {
    opacity: 1;
    transform: scaleX(.78);
    animation: ncInstantProgressPulse 1s ease-in-out infinite;
}

html.nc-network-settling #ncInstantProgress {
    opacity: 0;
    transform: scaleX(1);
}

html.nc-network-busy,
html.nc-network-busy body {
    cursor: progress;
}

button,
.btn,
a,
[role="button"],
input[type="button"],
input[type="submit"] {
    -webkit-tap-highlight-color: transparent;
}

.nc-action-pressed {
    transform: translateY(1px) scale(.99);
    filter: saturate(1.04);
}

.nc-action-working,
.nc-submit-busy {
    position: relative;
    cursor: progress !important;
    overflow: hidden;
}

.nc-action-working::after,
.nc-submit-busy::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ncInstantSpin .72s linear infinite;
    pointer-events: none;
}

.nc-action-working:not(.btn):not(button)::after {
    border-color: rgba(237, 0, 51, .22);
    border-top-color: var(--nc-action-accent);
}

.nc-action-working[data-nc-busy-text] {
    color: transparent !important;
}

.nc-action-working[data-nc-busy-text]::before {
    content: attr(data-nc-busy-text);
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-right: 28px;
    color: inherit;
    color: #fff;
    pointer-events: none;
}

.nc-form-submitting {
    pointer-events: none;
}

.nc-form-submitting input,
.nc-form-submitting select,
.nc-form-submitting textarea {
    pointer-events: auto;
}

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

@keyframes ncInstantProgressPulse {
    0% {
        transform: scaleX(.26);
    }

    55% {
        transform: scaleX(.82);
    }

    100% {
        transform: scaleX(.94);
    }
}

@media (prefers-reduced-motion: reduce) {
    #ncInstantProgress,
    .nc-action-pressed,
    .nc-action-working::after,
    .nc-submit-busy::after {
        animation: none !important;
        transition: none !important;
    }
}
