/*
 * Authentication Loading States CSS
 * Provides elegant loading animations for login/signup forms
 */

.auth-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
}

.auth-loading-container .logo-control {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 40px;
    text-align: center;
}

.auth-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 300px;
    text-align: center;
}

.auth-loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.auth-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: auth-spin 1s linear infinite;
}

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

.auth-loading-text {
    color: #666;
    font-size: 1.1em;
    line-height: 1.5;
    margin: 0;
    text-align: center;
    max-width: 280px;
}

/* Smooth transitions for form containers */
.control-page {
    transition: opacity 0.3s ease;
}

/* Alternative spinner styles for variety */
.auth-spinner.pulse {
    animation: auth-pulse 1.5s ease-in-out infinite;
    border: none;
    background-color: #3498db;
    border-radius: 50%;
}

@keyframes auth-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

/* Dots spinner animation */
.auth-spinner.dots {
    width: auto;
    height: auto;
    border: none;
    background: none;
    display: flex;
    gap: 4px;
    animation: none;
}

.auth-spinner.dots::before,
.auth-spinner.dots::after,
.auth-spinner.dots {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #3498db;
    border-radius: 50%;
    animation: auth-dots 1.4s ease-in-out infinite both;
}

.auth-spinner.dots::before {
    animation-delay: -0.32s;
}

.auth-spinner.dots::after {
    animation-delay: -0.16s;
}

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

/* Success state styling */
.auth-loading-container.success .auth-spinner {
    border-top-color: #27ae60;
    animation-duration: 0.5s;
}

.auth-loading-container.success .auth-loading-text {
    color: #27ae60;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 480px) {
    .auth-loading-container {
        min-height: 350px;
        padding: 30px 15px;
    }

    .auth-loading-container .logo-control {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .auth-loading-text {
        font-size: 1em;
        max-width: 250px;
    }

    .auth-spinner {
        width: 35px;
        height: 35px;
        border-width: 2.5px;
    }
}

/* Dark mode support (if applicable) */
@media (prefers-color-scheme: dark) {
    .auth-loading-container .logo-control {
        color: #ecf0f1;
    }

    .auth-loading-text {
        color: #bdc3c7;
    }

    .auth-spinner {
        border-color: #34495e;
        border-top-color: #3498db;
    }
}