.busy-host {
    position: relative;
}

.busy-layer {
    --busy-pad: 16px;
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    border-radius: inherit;
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    cursor: progress;
    animation: busy-in 0.18s ease both;
}

.busy-layer[data-fit] {
    border-radius: var(--radius-lg);
}

.busy-ring {
    position: sticky;
    top: calc(calc(var(--vh) * 50) - 15px);
    bottom: calc(calc(var(--vh) * 50) - 15px);
    width: 30px;
    height: 30px;
    border: 2.5px solid color-mix(in srgb, var(--text) 14%, transparent);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: busy-spin 0.75s linear infinite;
}

@keyframes busy-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes busy-in {
    from {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .busy-layer {
        animation: none;
    }

    .busy-ring {
        animation-duration: 1.6s;
    }
}
