/* Spinner Animations - Pure CSS, No External Libraries */

/* Circular Spinner (Default) */
.spinner {
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top: 3px solid var(--color-accent, #8b5cf6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    display: inline-block;
}

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

/* Small Spinner */
.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Large Spinner */
.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

/* Dots Spinner */
.spinner-dots {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.spinner-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-accent, #8b5cf6);
    animation: dot-bounce 1.4s ease-in-out infinite both;
}

.spinner-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.spinner-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Bars Spinner */
.spinner-bars {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
}

.spinner-bars span {
    width: 4px;
    height: 20px;
    background-color: var(--color-accent, #8b5cf6);
    border-radius: 2px;
    animation: bar-pulse 1.2s ease-in-out infinite;
}

.spinner-bars span:nth-child(1) {
    animation-delay: -1.1s;
}

.spinner-bars span:nth-child(2) {
    animation-delay: -1.0s;
}

.spinner-bars span:nth-child(3) {
    animation-delay: -0.9s;
}

.spinner-bars span:nth-child(4) {
    animation-delay: -0.8s;
}

.spinner-bars span:nth-child(5) {
    animation-delay: -0.7s;
}

@keyframes bar-pulse {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        opacity: 0.5;
    }
    20% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Button Inline Spinner */
.btn-spinner {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-spinner::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-spinner .btn-text {
    opacity: 0;
}

/* Full Page Overlay Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 20, 25, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.spinner-overlay .spinner {
    margin-bottom: 1rem;
}

.spinner-overlay p {
    color: var(--color-text-primary, #e2e8f0);
    font-weight: 500;
}

/* Progress Spinner (Circular Progress) */
.spinner-progress {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--color-accent, #8b5cf6);
    border-right-color: var(--color-accent, #8b5cf6);
    animation: spin 0.8s linear infinite;
    position: relative;
}

.spinner-progress::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-card, #ffffff);
}

/* Pulse Spinner */
.spinner-pulse {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-accent, #8b5cf6);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Transfer Progress Indicator */
.transfer-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--color-bg-secondary, #f1f5f9);
    border-radius: 6px;
    margin: 0.5rem 0;
}

.transfer-progress .spinner {
    margin: 0;
    flex-shrink: 0;
}

.transfer-progress-content {
    flex: 1;
}

.transfer-progress-title {
    font-weight: 600;
    color: var(--color-text-secondary, #111827);
    margin-bottom: 0.25rem;
}

.transfer-progress-status {
    font-size: 0.875rem;
    color: var(--color-text-muted, #6b7280);
}

/* Step Progress Indicator */
.step-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.step-progress-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-progress-item::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--color-border, #e5e7eb);
    margin-left: 0.5rem;
}

.step-progress-item:last-child::after {
    display: none;
}

.step-progress-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    background: var(--color-bg-secondary, #f1f5f9);
    color: var(--color-text-muted, #6b7280);
    border: 2px solid var(--color-border, #e5e7eb);
}

.step-progress-item.active .step-progress-number {
    background: var(--color-accent, #8b5cf6);
    color: var(--color-text-light, #ffffff);
    border-color: var(--color-accent, #8b5cf6);
}

.step-progress-item.completed .step-progress-number {
    background: var(--color-success, #10b981);
    color: var(--color-text-light, #ffffff);
    border-color: var(--color-success, #10b981);
}

.step-progress-item.completed::after {
    background: var(--color-success, #10b981);
}

.step-progress-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary, #111827);
    font-weight: 500;
}

.step-progress-item.active .step-progress-label {
    color: var(--color-accent, #8b5cf6);
    font-weight: 600;
}

/* Inline Loading Text */
.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted, #6b7280);
}

.loading-inline .spinner {
    margin: 0;
}

