/*
========================================
File: auth-modal.css (Versão Completa e Corrigida)
========================================
*/

/* --- Keyframes de Animação --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes background-pan {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* --- Estilos do Modal --- */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: var(--color-bg-dark);
    display: flex;
    flex-direction: column;
    /* Mobile first */

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal.open {
    opacity: 1;
    visibility: visible;
}

.auth-modal__close-btn {
    position: absolute;
    top: var(--spacing-4);
    right: var(--spacing-4);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.auth-modal__close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-text-primary);
    transform: rotate(90deg);
}

.auth-modal__visual-pane {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-8);
    background: linear-gradient(160deg, var(--color-primary) 0%, #4F46E5 100%);
    position: relative;
    overflow: hidden;
}

.auth-modal__visual-pane::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    animation: background-pan 20s linear infinite;
}

.auth-modal__visual-content {
    text-align: center;
    color: var(--color-text-primary);
    position: relative;
    z-index: 5;
    /* Estado inicial para animação */
    transform: translateY(20px);
    opacity: 0;
}

/* Aciona a animação quando a modal está aberta */
.auth-modal.open .auth-modal__visual-content {
    animation: fadeInUp 0.6s 0.2s ease-out forwards;
}

.auth-modal__visual-content i {
    font-size: 5rem;
    margin-bottom: var(--spacing-4);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-modal__visual-content h2 {
    font-size: var(--fs-3xl);
    font-weight: 800;
    line-height: 1.2;
}

.auth-modal__action-pane {
    background-color: var(--color-bg-content);
    padding: var(--spacing-8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    /* Estado inicial para animação */
    transform: translateY(20px);
    opacity: 0;
}

/* Aciona a animação quando a modal está aberta */
.auth-modal.open .auth-modal__action-pane {
    animation: fadeInUp 0.6s 0.4s ease-out forwards;
}

.auth-modal__action-pane .logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-2);
}

.auth-modal__action-pane .logo i {
    color: var(--color-primary);
    font-size: var(--fs-3xl);
}

.auth-modal__action-pane p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-8);
    max-width: 320px;
}

.auth-modal__google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-3);
    background-color: #FFFFFF;
    color: #333333;
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--border-radius-full);
    font-size: var(--fs-base);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-fast);
    width: 100%;
    max-width: 320px;
}

.auth-modal__google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.auth-modal__google-btn i {
    font-size: 1.25rem;
}

.auth-modal__footer {
    margin-top: var(--spacing-8);
    font-size: var(--fs-xs);
    color: var(--color-text-tertiary);
}

.auth-modal__footer a {
    color: var(--color-text-secondary);
    text-decoration: underline;
    transition: var(--transition-fast);
}

.auth-modal__footer a:hover {
    color: var(--color-primary);
}

/* Layout Desktop (Split Screen) */
@media (min-width: 768px) {
    .auth-modal {
        flex-direction: row;
        background-color: rgba(10, 10, 10, 0.7);
        backdrop-filter: blur(10px);
        padding: 0;
        align-items: stretch;
    }

    .auth-modal__content-wrapper {
        display: flex;
        width: 100%;
        max-width: 960px;
        margin: auto;
        height: 600px;
        max-height: 90vh;
        border-radius: var(--border-radius-lg);
        overflow: hidden;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }

    .auth-modal__visual-pane {
        width: 50%;
        min-height: auto;
    }

    .auth-modal__action-pane {
        width: 50%;
    }

    .auth-modal__close-btn {
        background: none;
        color: var(--color-text-primary);
    }
}