/**
 * Social Login Styles
 * Beautiful Google and Facebook login buttons
 * 
 * @package LetGo
 */

/* Social Login Container */
.social-login-container {
    margin: 20px 0;
    width: 100%;
}

/* Separator */
.social-login-separator {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.social-login-separator::before,
.social-login-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ddd;
}

.social-login-separator::before {
    left: 0;
}

.social-login-separator::after {
    right: 0;
}

.social-login-separator span {
    background: #fff;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Social Login Buttons Container */
.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

/* Base Social Button Styles */
.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: white;
}

.social-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-login-btn:active {
    transform: translateY(0);
}

.social-login-btn svg {
    flex-shrink: 0;
}

/* Google Button */
.google-btn {
    color: #1f2937;
    border-color: #e5e7eb;
}

.google-btn:hover {
    border-color: #4285F4;
    background: #f8faff;
}

/* Facebook Button */
.facebook-btn {
    color: white;
    background: #1877F2;
    border-color: #1877F2;
}

.facebook-btn:hover {
    background: #166FE5;
    border-color: #166FE5;
}

/* Loading State */
.social-login-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.social-login-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive Design */
@media (min-width: 480px) {
    .social-login-buttons {
        flex-direction: row;
    }
    
    .social-login-btn {
        flex: 1;
    }
}

/* WordPress Login Page Specific */
body.login .social-login-container {
    margin-bottom: 20px;
}

body.login #login {
    width: 400px;
}

body.login .social-login-btn {
    font-size: 14px;
    padding: 10px 16px;
}

/* WooCommerce Integration */
.woocommerce-form-login .social-login-container,
.woocommerce-form-register .social-login-container {
    margin: 20px 0;
}

/* User Profile Page - Connected Accounts */
.connected-social-accounts {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.connected-social-accounts h3 {
    margin-top: 0;
    color: #1f2937;
    font-size: 18px;
    margin-bottom: 15px;
}

.social-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 10px;
}

.social-account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-account-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-account-icon.google {
    background: #f8faff;
}

.social-account-icon.facebook {
    background: #e7f3ff;
}

.social-account-details {
    flex: 1;
}

.social-account-provider {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.social-account-email {
    color: #6b7280;
    font-size: 13px;
}

.disconnect-btn {
    padding: 6px 12px;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.disconnect-btn:hover {
    background: #fecaca;
    border-color: #fca5a5;
}

/* Error Messages */
.social-login-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
}

/* Success Messages */
.social-login-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .social-login-separator::before,
    .social-login-separator::after {
        background: #374151;
    }
    
    .social-login-separator span {
        background: #1f2937;
        color: #9ca3af;
    }
    
    .social-login-btn {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .google-btn:hover {
        background: #374151;
        border-color: #4285F4;
    }
    
    .connected-social-accounts {
        background: #1f2937;
        border-color: #374151;
    }
    
    .social-account-item {
        background: #111827;
        border-color: #374151;
    }
}

/* Animation for hover effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-login-container {
    animation: fadeIn 0.3s ease-out;
}

/* Print Styles */
@media print {
    .social-login-container,
    .connected-social-accounts {
        display: none !important;
    }
}

/* Accessibility */
.social-login-btn:focus {
    outline: 2px solid #4285F4;
    outline-offset: 2px;
}

.social-login-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Mobile Optimization */
@media (max-width: 479px) {
    body.login #login {
        width: 320px;
    }
    
    .social-login-btn {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .social-login-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .social-login-btn {
        border-width: 3px;
    }
    
    .google-btn {
        border-color: #000;
    }
    
    .facebook-btn {
        border-color: #000;
    }
}
