/* Shared loading state for buttons, submit inputs, and busy links (E-shop / retail). */
@keyframes aq-busy-spin {
    to {
        transform: rotate(360deg);
    }
}

button.is-loading,
a.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.92;
    /* Hide direct text nodes (not wrapped in an element); keep ::after visible */
    font-size: 0;
    line-height: 0;
    color: transparent;
}

input[type="submit"].is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.92;
    color: transparent;
}

button.is-loading > *,
a.is-loading > * {
    visibility: hidden;
}

button.is-loading::after,
input[type="submit"].is-loading::after,
a.is-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.35rem;
    height: 1.35rem;
    margin: -0.675rem 0 0 -0.675rem;
    box-sizing: border-box;
    border: 2px solid rgba(128, 128, 128, 0.35);
    border-top-color: rgba(55, 55, 55, 0.9);
    border-radius: 50%;
    animation: aq-busy-spin 0.65s linear infinite;
}

/* Above all e-shop dialogs (z-[100], retail-loc-modal 100000, headers ~100000) */
#eshop-confirm-modal {
    z-index: 100010;
}

.eshop-confirm-modal.eshop-confirm-locked {
    pointer-events: auto;
}

#eshop-confirm-ok.is-loading {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* Locked e-shop dialog: dim dismiss controls while POST is in flight */
[role="dialog"][data-aq-modal-locked="1"] button[id$="-backdrop"],
[role="dialog"][data-aq-modal-locked="1"] [id*="btn-close"],
[role="dialog"][data-aq-modal-locked="1"] [id*="btn-cancel"],
[role="dialog"][data-aq-modal-locked="1"] [id*="modal-close"],
[role="dialog"][data-aq-modal-locked="1"] [id*="modal-cancel"] {
    pointer-events: none;
    opacity: 0.55;
    cursor: not-allowed;
}
