/* Sprint 0C2B/3: top-layer native dialog, never hidden behind a Libretto modal. */
dialog#mh-xajax-wait:not([open]) { display: none !important; }
dialog#mh-xajax-wait[open] {
    position: fixed;
    inset: 0;
    margin: auto;
    width: max-content;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    outline: none;
    overflow: visible;
    background: transparent;
    color: inherit;
    z-index: 2147483000; /* Fallback; showModal uses browser top layer. */
}
dialog#mh-xajax-wait::backdrop { background: rgba(16, 24, 40, .26); }
.mh-xajax-wait-content {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--bs-border-color, #ddd);
    border-radius: .75rem;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #222);
    box-shadow: 0 14px 40px rgba(0,0,0,.22);
    font: inherit;
}
.mh-xajax-wait-spinner {
    display: inline-block;
    flex: 0 0 1.4rem;
    width: 1.4rem;
    height: 1.4rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: mh-xajax-spin .75s linear infinite;
}
@keyframes mh-xajax-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mh-xajax-wait-spinner { animation: none; } }
