/**
 * Social Login Styles
 * 
 * Styles for Firebase social authentication buttons
 * Designed to integrate seamlessly with Woodmart theme
 */

/* Social Login Section */
.pix-firebase-social-login-section {
    margin: 20px 0;
    text-align: center;
}

.pix-firebase-social-login-divider {
    position: relative;
    margin: 20px 0;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.pix-firebase-social-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e1e1e1;
    z-index: 1;
}

.pix-firebase-social-login-divider span,
.pix-firebase-social-login-divider {
    background: var(--wd-main-bgcolor);
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* Social Buttons Container */
.pix-firebase-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 460px;
    margin: 0 auto;
}



/* Base Button Styles */
.pix-firebase-social-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.pix-firebase-social-buttons button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.pix-firebase-social-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Button Icons */
.pix-firebase-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pix-firebase-btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Google Button */
.pix-firebase-google-btn {
    background-color: #fff;
    color: #3c4043;
    border-color: #dadce0;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302), 0 1px 3px 1px rgba(60, 64, 67, 0.149);
}


/* Apple Button */
.pix-firebase-apple-btn {
    background-color: #000;
    color: #fff;
    border-color: #000;
}




/* Loading State */
.pix-firebase-social-buttons button.loading {
    pointer-events: none;
}

.pix-firebase-social-buttons button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: pix-firebase-spin 1s linear infinite;
}

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

/* Message Styles */
.pix-firebase-message {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    display: none;
}

.pix-firebase-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.pix-firebase-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pix-firebase-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Checkout Integration */
.pix-firebase-checkout-login {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.pix-firebase-checkout-login h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #333;
}

.pix-firebase-checkout-login p {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
}

.pix-firebase-checkout-success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
}

/* WooCommerce Form Integration */
.woocommerce-form-register .pix-firebase-social-login-section {
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}


.pix-firebase-social-accounts h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.pix-firebase-social-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    margin-bottom: 10px;
}

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

.pix-firebase-social-account-provider {
    font-weight: 600;
    text-transform: capitalize;
}

.pix-firebase-social-account-email {
    color: #666;
    font-size: 14px;
}

.pix-firebase-social-account-actions button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.pix-firebase-social-account-actions button:hover {
    background: #c82333;
}

/* Responsive Design */
@media (max-width: 767px) {
    .pix-firebase-social-buttons {
        gap: 10px;
    }
    
    .pix-firebase-social-buttons button {
        font-size: 14px;
        padding: 14px 16px;
    }
    
    .pix-firebase-checkout-login {
        padding: 15px;
        margin: 15px 0;
    }
    
    .pix-firebase-social-account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pix-firebase-social-account-actions {
        align-self: stretch;
    }
    
    .pix-firebase-social-account-actions button {
        width: 100%;
    }
}
/* High Contrast Accessibility */
@media (prefers-contrast: high) {
    .pix-firebase-social-buttons button {
        border-width: 2px;
    }
    
    .pix-firebase-google-btn {
        border-color: #000;
    }
    
    .pix-firebase-apple-btn {
        border-color: #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .pix-firebase-social-buttons button,
    .pix-firebase-message {
        transition: none;
    }
    
    @keyframes pix-firebase-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}

/* Print Styles */
@media print {
    .pix-firebase-social-login-section,
    .pix-firebase-checkout-login {
        display: none;
    }
}

/* Integration with Popular Themes */

/* Woodmart Theme Specific */
.woodmart-theme .pix-firebase-social-buttons button {
    font-family: inherit;
    border-radius: 0;
}

.woodmart-theme .pix-firebase-checkout-login {
    border-radius: 0;
}

/* General Theme Compatibility */
.woocommerce .pix-firebase-social-buttons button {
    width: auto;
    max-width: none;
}

/* Button Focus Improvements */
.pix-firebase-social-buttons button:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Ensure proper z-index for modals/overlays */
.pix-firebase-social-login-section {
    padding-bottom:20px;
    position: relative;
    z-index: 1;
}

/* Animation for successful login */
@keyframes pix-firebase-success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pix-firebase-social-buttons button.success {
    animation: pix-firebase-success-pulse 0.6s ease-in-out;
}