/* OAuth Processing/Loading Screen Styles */

.oauth-processing-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Background Pattern */
.oauth-processing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.processing-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: containerFadeIn 0.5s ease;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.processing-logo {
    margin-bottom: 2rem;
}

.processing-logo .logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: #667eea;
}

.processing-logo .logo-placeholder i {
    font-size: 2rem;
}

/* Loading Spinner */
.loading-spinner {
    margin: 2rem auto;
    width: 80px;
    height: 80px;
    position: relative;
}

.spinner-ring {
    width: 100%;
    height: 100%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Status Text */
.processing-title {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease;
}

.processing-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 2rem;
    min-height: 24px;
    animation: fadeInUp 0.8s ease;
}

.processing-subtitle.ellipsis::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Steps */
.progress-steps {
    margin-top: 2rem;
    text-align: left;
}

.progress-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.progress-step.completed {
    background-color: #f8f9fa;
}

.progress-step.active {
    background-color: #e7f3ff;
    border-left: 3px solid #667eea;
}

.progress-step.pending {
    opacity: 0.5;
}

.step-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon i.bi-check-circle-fill {
    color: #28a745;
    font-size: 24px;
}

.step-icon i.bi-circle {
    color: #dee2e6;
    font-size: 20px;
}

.step-icon .spinner-border {
    width: 20px;
    height: 20px;
    border-width: 2px;
    border-color: #667eea;
    border-right-color: transparent;
}

/* Success Checkmark */
.success-checkmark {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successScale 0.5s ease;
}

.success-checkmark i {
    font-size: 80px;
    color: #28a745;
}

@keyframes successScale {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
}

.step-status {
    font-size: 12px;
    color: #6c757d;
}

.progress-step.completed .step-status {
    color: #28a745;
}

.progress-step.active .step-status {
    color: #667eea;
}

/* Error State */
.error-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.error-state .processing-container {
    background: white;
}

.error-icon {
    margin: 1.5rem auto;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-icon i {
    font-size: 80px;
    color: #dc3545;
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.error-state .processing-title {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-state .processing-message {
    font-size: 16px;
    color: #212529;
    margin-bottom: 0.5rem;
}

.error-reason {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 2rem;
    font-style: italic;
}

.processing-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.processing-actions .btn {
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    border-radius: 8px;
}

.processing-actions .btn-primary {
    background-color: #667eea;
    border-color: #667eea;
}

.processing-actions .btn-primary:hover {
    background-color: #764ba2;
    border-color: #764ba2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.processing-actions .btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
}

.processing-actions .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .oauth-processing-page {
        padding: 1rem;
    }

    .processing-container {
        padding: 2rem 1.5rem;
    }

    .processing-title {
        font-size: 20px;
    }

    .processing-subtitle {
        font-size: 14px;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
    }

    .spinner-ring {
        border-width: 3px;
    }

    .processing-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .processing-container {
        padding: 1.5rem 1rem;
    }

    .processing-logo .logo-placeholder {
        font-size: 1rem;
    }

    .processing-logo .logo-placeholder i {
        font-size: 1.5rem;
    }

    .processing-title {
        font-size: 18px;
    }

    .progress-step {
        padding: 0.75rem;
    }

    .step-title {
        font-size: 13px;
    }

    .step-status {
        font-size: 11px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner-ring {
        animation: none;
        border-top-color: #667eea;
    }
}

