/* ============================================
   SPINNERS COMPONENT
   ============================================ */

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    flex-direction: column;
    gap: 20px;
}

.spinner-overlay.active {
    display: flex;
}

/* ============================================
   SPINNER TYPES
   ============================================ */

/* Default spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Primary spinner */
.spinner-primary {
    border-color: rgba(102, 126, 234, 0.2);
    border-top-color: var(--primary);
}

/* Small spinner */
.spinner-sm {
    width: 30px;
    height: 30px;
    border-width: 3px;
}

.spinner-sm .spinner-text {
    font-size: 12px;
}

/* Large spinner */
.spinner-lg {
    width: 70px;
    height: 70px;
    border-width: 5px;
}

/* Dots spinner */
.spinner-dots {
    display: flex;
    gap: 12px;
    align-items: center;
}

.spinner-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-dot:nth-child(3) { animation-delay: 0s; }

.spinner-dot-primary {
    background: var(--primary);
}

/* Pulse spinner */
.spinner-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    animation: pulse 1.5s ease-in-out infinite;
}

.spinner-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
}

/* ============================================
   INLINE SPINNER (for buttons)
   ============================================ */
.spinner-inline {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-inline-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-inline-dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--text-dark);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}