/* ─────────────────────────────────────────────
   QuantumBlox · Loading animations (compartido)
   Usado en: checkout wizard, auth modal, home vouches
   ───────────────────────────────────────────── */

/* Spinner básico inline (botones / estados) */
.qb-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qb-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
.qb-spinner.lg { width: 32px; height: 32px; border-width: 3px; }
.qb-spinner.primary { border-top-color: #a855f7; }

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

/* Botón en estado de carga: spinner interno + texto oculto */
.qb-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    opacity: .8;
}
.qb-btn-loading::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qb-spin .7s linear infinite;
}

/* Overlay pantalla completa (login, OAuth popup wait) */
.qb-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,15,35,.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    gap: 14px;
    color: #fff;
}
.qb-loading-overlay.active { display: flex; }
.qb-loading-overlay .qb-spinner.lg { border-top-color: #a855f7; }

/* Skeleton shimmer (vouches / cards) */
.qb-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 100%);
    background-size: 200% 100%;
    animation: qb-shimmer 1.4s ease-in-out infinite;
    border-radius: 12px;
}
@keyframes qb-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Transición de paso del wizard (slide right → center) */
.qb-step-transition {
    animation: qb-step-in .28s ease;
}
@keyframes qb-step-in {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Fade de validación (check verde / cruz roja) */
.qb-fade-in {
    animation: qb-fade-in .25s ease both;
}
@keyframes qb-fade-in {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}
