/**
 * Processing Page Styles
 * 
 * Features:
 * - Full-page loader with background animation
 * - Animated spinner and progress steps
 * - Consistent with APIVerve design system
 * - Theme-aware colors
 */

/* Processing Page Base */
.processing-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-sans);
    background-color: var(--color-background);
    color: var(--color-text-primary);
}

/* Processing Section */
.processing-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-background) 0%, var(--color-surface) 100%);
    overflow: hidden;
}

.processing-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.processing-container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
}

.processing-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .processing-content {
    background: rgba(15, 23, 42, 0.95);
    border-color: var(--color-border);
}

/* Logo */
.processing-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

/* Spinner */
.processing-spinner {
    margin: 0 auto 2rem;
    width: 80px;
    height: 80px;
    position: relative;
}

.spinner-ring {
    width: 80px;
    height: 80px;
    border: 3px solid var(--color-border);
    border-radius: 50%;
    position: relative;
    animation: spin 2s linear infinite;
}

.spinner-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid transparent;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.6;
    }
}

/* Message */
.processing-message {
    margin-bottom: 2.5rem;
}

.processing-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.processing-description {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Progress Steps */
.processing-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

/* Completed Step */
.step.step-completed {
    opacity: 1;
}

.step.step-completed .step-icon {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.step.step-completed .step-label {
    color: var(--color-text-primary);
}

/* Current Step */
.step.step-current {
    opacity: 1;
}

.step.step-current .step-icon {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.step.step-current .step-label {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Pending Step */
.step.step-pending {
    opacity: 0.6;
}

.step.step-pending .step-icon {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-tertiary);
}

.step.step-pending .step-label {
    color: var(--color-text-tertiary);
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Notice */
.processing-notice {
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.notice-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
    line-height: 1.4;
}

.notice-content i {
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.notice-content span {
    flex: 1;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .spinner-ring {
    border-color: var(--color-border);
}

[data-theme="dark"] .processing-notice {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .step.step-pending .step-icon {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-tertiary);
}

/* Responsive Design */
@media (max-width: 640px) {
    .processing-container {
        padding: 1rem;
    }
    
    .processing-content {
        padding: 2rem 1.5rem;
    }
    
    .processing-logo {
        margin-bottom: 1.5rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .processing-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .spinner-ring {
        width: 60px;
        height: 60px;
    }
    
    .spinner-inner {
        width: 30px;
        height: 30px;
    }
    
    .processing-title {
        font-size: 1.25rem;
    }
    
    .processing-description {
        font-size: 0.9375rem;
    }
    
    .processing-steps {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .step-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .processing-notice {
        padding: 0.875rem;
    }
    
    .notice-content {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .processing-steps {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .step-icon {
        width: 24px;
        height: 24px;
        font-size: 0.6875rem;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .spinner-ring,
    .spinner-ring::before {
        animation: none;
    }
    
    .spinner-inner {
        animation: none;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    
    .fa-spin {
        animation: none;
    }
}