/* ==========================================================================
   Busy overlay — shown while something is saving, loading or uploading.
   Palette matches the site: maroon #b1322c, gold #fbc805
   ========================================================================== */

.bz-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 12, 12, .55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 100002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bz-overlay.is-open { display: flex; }

.bz-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 14px 44px rgba(0, 0, 0, .4);
    padding: 28px 34px 24px;
    text-align: center;
    min-width: 230px;
    max-width: 340px;
    animation: bz-rise .22s ease-out;
}

@keyframes bz-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- spinner ---------- */

.bz-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    position: relative;
}

/* outer maroon ring */
.bz-spinner::before,
.bz-spinner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border-style: solid;
}

.bz-spinner::before {
    inset: 0;
    border-width: 4px;
    border-color: #f0e4e3;
    border-top-color: #b1322c;
    animation: bz-spin .9s linear infinite;
}

/* inner gold ring, turning the other way */
.bz-spinner::after {
    inset: 11px;
    border-width: 3px;
    border-color: #fdf3d3;
    border-bottom-color: #fbc805;
    animation: bz-spin 1.3s linear infinite reverse;
}

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

.bz-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: bold;
    color: #8a2b26;
    font-family: Arial, Helvetica, sans-serif;
}

.bz-sub {
    margin: 0;
    font-size: 12px;
    color: #8b8b8b;
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
}

.bz-sub[hidden] { display: none; }

/* ---------- progress bar, used for uploads ---------- */

.bz-bar {
    height: 5px;
    background: #f0ece4;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 16px;
}

.bz-bar[hidden] { display: none; }

.bz-bar span {
    display: block;
    height: 100%;
    width: 30%;
    border-radius: 3px;
    background: linear-gradient(90deg, #b1322c, #fbc805);
    animation: bz-slide 1.15s ease-in-out infinite;
}

@keyframes bz-slide {
    0%   { margin-left: -32%; }
    100% { margin-left: 102%; }
}

/* Respect a reduced-motion preference: keep the dialog, drop the spinning. */
@media (prefers-reduced-motion: reduce) {
    .bz-card,
    .bz-spinner::before,
    .bz-spinner::after,
    .bz-bar span { animation: none; }

    .bz-spinner::before { border-top-color: #b1322c; }
}
