/* Keep the native progress bar for links, but not post-submit redirects. */
html.ds-form-redirect #nprogress {
    display: none !important;
}

button[data-ds-form-redirect] {
    cursor: wait;
    opacity: .7;
}

button[data-ds-form-redirect]::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ds-form-redirect-spin 1s linear infinite;
}

/* Replace the request spinner during the redirect, avoiding duplicate icons. */
button[data-ds-form-redirect] > svg {
    display: none !important;
}

@keyframes ds-form-redirect-spin {
    to { transform: rotate(360deg); }
}
