/**
 * Google Sign-In Button Styling
 * 
 * Styles based on Google's official "Sign in with Google" button guidelines
 * https://developers.google.com/identity/branding-guidelines
 */

/* Wrapper container */
.am-google-auth-wrapper {
    text-align: center;
    margin: 20px 0;
    width: 100%;
}

/* "or" divider */
.am-google-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 16px;
    color: #757575;
    font-size: 14px;
}

.am-google-auth-divider::before,
.am-google-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dadce0;
}

.am-google-auth-divider span {
    padding: 0 16px;
    text-transform: lowercase;
}

/* Google button - matches official styling */
.am-google-auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 10px 24px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 240px;
    height: 44px;
    box-sizing: border-box;
}

.am-google-auth-button:hover {
    background-color: #f7f8f8;
    border-color: #c6c6c6;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    text-decoration: none;
    color: #3c4043;
}

.am-google-auth-button:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
}

.am-google-auth-button:active {
    background-color: #f1f3f4;
}

/* Google "G" icon */
.am-google-auth-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Button text */
.am-google-auth-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .am-google-auth-button {
        background-color: #4285f4;
        border-color: #4285f4;
        color: #ffffff;
    }

    .am-google-auth-button:hover {
        background-color: #3367d6;
        border-color: #3367d6;
        color: #ffffff;
    }

    .am-google-auth-button:focus {
        border-color: #ffffff;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    }

    .am-google-auth-icon path {
        fill: #ffffff !important;
    }

    .am-google-auth-divider {
        color: #9aa0a6;
    }

    .am-google-auth-divider::before,
    .am-google-auth-divider::after {
        border-bottom-color: #5f6368;
    }
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .am-google-auth-button {
        min-width: 200px;
        padding: 10px 16px;
        font-size: 13px;
    }

    .am-google-auth-icon {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }

    .am-google-auth-wrapper {
        margin: 16px 0;
    }
}

/* aMember theme compatibility fixes */
.am-login-form-form .am-google-auth-wrapper,
.am-signup-form .am-google-auth-wrapper {
    max-width: 100%;
}

/* Ensure button is visible in various aMember theme contexts */
fieldset .am-google-auth-wrapper {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Fix for buttons appearing above login form */
.am-google-auth-wrapper + .am-row:first-child,
.am-google-auth-wrapper + fieldset {
    margin-top: 10px;
}
