/**
 * Styles pour les boutons Google Auth
 * Compatible avec le design existant de l'application
 */

/* Conteneur pour les boutons d'authentification sociale */
.social-auth-container {
    margin: 1.5rem 0;
}

.social-auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.social-auth-divider::before,
.social-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dee2e6;
}

.social-auth-divider span {
    padding: 0 1rem;
    background: white;
}

/* Bouton Google principal */
.google-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #dadce0;
    border-radius: 0.5rem;
    background: white;
    color: #3c4043;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 1rem;
}

.google-auth-btn:hover {
    background: #f8f9fa;
    border-color: #c6c8ca;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #3c4043;
    text-decoration: none;
}

.google-auth-btn:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.google-auth-btn:active {
    background: #f1f3f4;
    border-color: #c6c8ca;
    transform: translateY(1px);
}

/* Icône Google */
.google-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Texte du bouton */
.google-btn-text {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.25px;
}

/* Variantes pour différentes pages */
.google-auth-btn.login-variant {
    border-color: #eaecef !important;
    color: #6d757d !important;
    border-radius: 16px !important;
    padding-top: 16px;
    padding-bottom: 16px;
}

.google-auth-btn.register-variant {
    border-color: #eaecef !important;
    color: #6d757d !important;
    border-radius: 16px !important;
    padding-top: 16px;
    padding-bottom: 16px;
}

.google-auth-btn.login-variant:hover {
    border-color: #008b8b;
  
}

.google-auth-btn.register-variant:hover {
    border-color: #008b8b;
   
}
/*Google OATH */
[data-bs-theme="dark"] .google-auth-btn.login-variant {
    border-color: #495057 !important;
    color: #6c757d !important;
    background-color: #2d3748 !important;
    border-radius: 16px !important;
    padding-top: 16px;
    padding-bottom: 16px;
}
[data-bs-theme="dark"] .google-auth-btn.register-variant {
    border-color: #495057 !important;
    color: #6c757d !important;
    background-color: #2d3748 !important;
    border-radius: 16px !important;
    padding-top: 16px;
    padding-bottom: 16px;
}
[data-bs-theme="dark"] .google-auth-btn.login-variant:hover , [data-bs-theme="dark"] .google-auth-btn.google-auth-btn.register-variant:hover {
    background-color: #374151 !important;
    border-color: #008b8b !important;
}
[data-bs-theme="dark"] .social-auth-divider::before, [data-bs-theme="dark"] .social-auth-divider::after {
    background: #374151 !important;
}
[data-bs-theme="dark"] .social-auth-divider span {
    background: transparent !important;
}

/* État de chargement */
.google-auth-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.google-auth-btn.loading .google-btn-text::after {
    content: '...';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Responsive design */
@media (max-width: 576px) {
    .google-auth-btn {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .google-icon {
        width: 18px;
        height: 18px;
        margin-right: 0.5rem;
    }
}

/* Intégration avec le thème sombre (si applicable) */
@media (prefers-color-scheme: dark) {
    .google-auth-btn {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .google-auth-btn:hover {
        background: #374151;
        border-color: #6b7280;
    }
    
    .social-auth-divider {
        color: #9ca3af;
    }
    
    .social-auth-divider::before,
    .social-auth-divider::after {
        background: #4b5563;
    }
    
    .social-auth-divider span {
        background: #1f2937;
    }
}

/* Messages d'erreur et de succès pour Google Auth */
.google-auth-message {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.google-auth-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.google-auth-message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Animation d'entrée pour les messages */
.google-auth-message {
    animation: slideIn 0.3s ease-out;
}

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