﻿.shelvera-bulk-progress-overlay {
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    z-index: 1095;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

    .shelvera-bulk-progress-overlay[hidden] {
        display: none !important;
    }

.shelvera-bulk-progress-card {
    width: min(680px, calc(100vw - 2rem));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.20), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.shelvera-bulk-progress-icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(47, 111, 237, 0.14), rgba(35, 184, 166, 0.16));
}

    .shelvera-bulk-progress-icon span {
        width: 1.4rem;
        height: 1.4rem;
        border-radius: 999px;
        border: 3px solid rgba(47, 111, 237, 0.22);
        border-top-color: var(--sv-primary, #2f6fed);
        animation: shelveraBulkSpin 850ms linear infinite;
    }

.shelvera-bulk-progress-body {
    min-width: 0;
}

.shelvera-bulk-progress-eyebrow,
.shelvera-bulk-progress-detail {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.shelvera-bulk-progress-body h2 {
    margin: 0.1rem 0 0.2rem;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
}

.shelvera-bulk-progress-body p {
    margin-bottom: 0.45rem;
}

.shelvera-bulk-progress-track {
    width: 100%;
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.20);
}

    .shelvera-bulk-progress-track span {
        display: block;
        height: 100%;
        min-width: 4%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--sv-primary, #2f6fed), var(--sv-secondary, #23b8a6));
        transition: width 260ms ease;
    }

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

@media (max-width: 640px) {
    .shelvera-bulk-progress-card {
        grid-template-columns: 1fr;
    }

    .shelvera-bulk-progress-icon {
        display: none;
    }
}

/* ============================================================
   Bulk operation active-state polish

   When a server-side bulk operation is running, the bottom
   multi-select action bars should disappear. The user has already
   confirmed the operation, so keeping Select/Restore/Delete/Clear
   visible is confusing and can visually collide with the progress card.

   This is intentionally CSS-driven because
   shelvera-bulk-operation-progress.js already adds/removes:
   body.shelvera-bulk-operation-active
   ============================================================ */

body.shelvera-bulk-operation-active .recently-deleted-bulk-toolbar,
body.shelvera-bulk-operation-active .entity-bulk-toolbar,
body.shelvera-bulk-operation-active .shelvera-floating-action-bar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate(-50%, 1.25rem) scale(0.98) !important;
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease !important;
}

/*
   Keep the progress card above all floating action bars and toasts that
   may appear near the bottom of the page.
*/
.shelvera-bulk-progress-overlay {
    z-index: 1300;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

/*
   Slightly lift the progress card on desktop/tablet so it feels intentional
   even when the former action bar fades out.
*/
@media (min-width: 768px) {
    .shelvera-bulk-progress-overlay {
        bottom: calc(2.25rem + env(safe-area-inset-bottom, 0px));
    }
}

/*
   On small screens, keep the progress card close to the bottom but safe.
*/
@media (max-width: 767.98px) {
    .shelvera-bulk-progress-overlay {
        inset: auto 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 0.75rem;
    }

    .shelvera-bulk-progress-card {
        width: 100%;
    }
}