/** MUAADH LOADER — Phase 13 Wave 21 (2026-05-13). Single source. */


/* ============================================================================
 * APPENDED (Phase 13 Wave 21): rules pulled from muaadh-core.css
 * ============================================================================ */

.muaadh-loader__spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25rem solid currentcolor;
    border-right-color: transparent;
    border-radius: var(--chassis-radius-circle);
    animation: m-spinner-border 0.75s linear infinite;
}

.muaadh-loader__spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

.muaadh-loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(var(--theme-card-bg-rgb), 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 20;
}

.muaadh-loader-overlay.active {
    display: flex;
}

/* ============================================================================
 * GLOBAL viewport-scoped overlay — drives `window.muaadhLoader.showGlobal()`.
 *
 * The base .muaadh-loader-overlay above is absolutely-positioned inside a
 * parent; this --global modifier promotes it to fixed-position viewport
 * coverage with an entrance transition and the highest stacking level so
 * it sits above modals and dropdowns. Added 2026-05-18 (loader-unification
 * sweep). One overlay node, reference-counted by the JS module.
 * ============================================================================ */
.muaadh-loader-overlay--global {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--chassis-duration-normal) ease;
}

.muaadh-loader-overlay--global.muaadh-loader-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

.muaadh-loader-overlay__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-8);
    background: var(--theme-card-bg);
    border-radius: var(--chassis-radius-card);
    box-shadow: var(--chassis-shadow-card-elevated);
    color: var(--text-primary);
    min-width: 120px;
    max-width: min(90vw, 360px);
    text-align: center;
}

.muaadh-loader-overlay__spinner {
    color: var(--action-primary);
    width: 2.5rem;
    height: 2.5rem;
}

.muaadh-loader-overlay__image {
    max-width: 120px;
    max-height: 120px;
    display: block;
}

.muaadh-loader-overlay__message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Label next to in-button spinner (attachToButton({ label: '…' })). */
.muaadh-loader__button-label {
    margin-inline-start: var(--space-2);
}

