/**
 * Google SSO Styles
 */

.google-sso-wrapper {
    margin: 20px 0;
}

/* Google Sign-In Button */
.google-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.google-button:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #c6c6c6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.google-button:active:not(:disabled) {
    background: #f1f3f4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.google-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Google Icon */
.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Loading State */
.google-button.loading {
    position: relative;
    color: transparent;
}

.google-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(60, 64, 67, 0.3);
    border-top-color: #3c4043;
    border-radius: 50%;
    animation: google-spin 0.8s linear infinite;
}

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

/* Combined Login Layout */
.login-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Social Login Section */
.social-login-section {
    margin-top: 10px;
}

.social-login-section .button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* When both Passkey and Google are available */
.passkey-auth-wrapper + .google-sso-wrapper {
    margin-top: 0;
}

/* Error Messages */
.google-error-message {
    padding: 12px 16px;
    background: #ffe8e8;
    color: #d63638;
    border-left: 4px solid #d63638;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    animation: google-slidein 0.3s ease;
}

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

/* Responsive */
@media screen and (max-width: 782px) {
    .google-button {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .google-icon {
        width: 22px;
        height: 22px;
    }
}

/* Alternative: Side-by-side layout for larger screens */
@media screen and (min-width: 783px) {
    .social-buttons-horizontal {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .social-buttons-horizontal .passkey-button,
    .social-buttons-horizontal .google-button {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .google-button {
        background: #2c2c2c;
        color: #e8eaed;
        border-color: #5f6368;
    }
    
    .google-button:hover:not(:disabled) {
        background: #3c3c3c;
        border-color: #7f7f7f;
    }
}

/* Success State (when redirecting) */
.google-button.success {
    background: #edfaef;
    border-color: #2ea44f;
    color: #1e7b34;
}

.google-button.success .google-icon {
    display: none;
}

.google-button.success::before {
    content: '✓';
    font-size: 20px;
    margin-right: 8px;
}
