/**
 * Qrious Tech Academy — Global Button Loading Spinner System
 * Smooth, accessible, CSS-only rotating spinner beside button text.
 * Inherits the button's foreground color (`currentColor`) across all themes and variants.
 */

.button-spinner {
    width: 14px;
    height: 14px;
    display: inline-block;
    flex-shrink: 0;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: qrious-button-spin 0.75s linear infinite;
    vertical-align: middle;
    margin-left: 7px;
    box-sizing: border-box;
}

@keyframes qrious-button-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Accessible Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .button-spinner {
        animation: none !important;
        border-style: dotted;
        opacity: 0.8;
    }
}

/* Loading button container states */
button[aria-busy="true"],
.btn[aria-busy="true"],
.is-loading {
    pointer-events: none !important;
    cursor: wait !important;
    opacity: 0.88;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

/* Button flex content wrapper */
.button-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    vertical-align: middle;
}

