/* ============================================
   Estilos de Autenticação
   Modal de Login/Cadastro e Botões do Header
   ============================================ */

/* Header Actions */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-header {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-white);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-header:hover {
    background: var(--hover-bg);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 204, 255, 0.2);
}

.btn-login {
    min-width: 150px;
    justify-content: center;
}

.user-name {
    color: var(--accent-cyan);
    font-weight: 600;
}

.btn-carrinho {
    position: relative;
    padding: 10px 15px;
}

.carrinho-icon {
    font-size: 20px;
}

.carrinho-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Modal de Autenticação */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: var(--text-gray);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 10;
}

.auth-modal-close:hover {
    color: var(--text-white);
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin: 0;
}

.auth-tab {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.auth-tab:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

/* Tab Content */
.auth-tab-content {
    display: none;
    padding: 30px;
}

.auth-tab-content.active {
    display: block;
}

.auth-tab-content h2 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: var(--text-white);
    text-align: center;
}

/* Formulários */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    padding: 12px 15px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 204, 255, 0.1);
}

.form-group input::placeholder {
    color: var(--text-gray);
}

/* Botões de Autenticação */
.btn-auth {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 255, 0.3);
}

.btn-google {
    background: white;
    color: #333;
    border: 2px solid #ddd;
}

.btn-google:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-google svg {
    width: 18px;
    height: 18px;
}

/* Divisor */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 15px;
    color: var(--text-gray);
    font-size: 14px;
}

/* Mensagens de Erro */
.auth-error {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(255, 0, 102, 0.1);
    border: 1px solid var(--accent-red);
    border-radius: 8px;
    color: var(--accent-red);
    font-size: 14px;
    text-align: center;
}

/* Responsivo */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-header {
        flex: 1;
        justify-content: center;
    }
    
    .auth-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .auth-tab-content {
        padding: 20px;
    }
}

/* Loading State */
.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-auth.loading {
    position: relative;
    color: transparent;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notificações de Sucesso */
.auth-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 255, 102, 0.3);
    z-index: 10001;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

