/**
 * Google OAuth Login Button Styles
 * Official Google Brand Guidelines Implementation
 */

.google-oauth-container {
    margin: 15px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.google-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff !important;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #3c4043 !important;
    cursor: pointer;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.25px;
    line-height: 16px;
    min-height: 44px;
    padding: 12px 20px;
    text-decoration: none !important;
    text-align: center;
    transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
    vertical-align: middle;
    white-space: nowrap;
    width: 100%;
    max-width: 280px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    box-sizing: border-box;
    margin: 0 auto;
}

.google-login-btn:hover {
    background-color: #f8f9fa !important;
    border-color: #dadce0;
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.302), 0 4px 8px 3px rgba(60, 64, 67, 0.149);
    color: #3c4043 !important;
    text-decoration: none !important;
}

.google-login-btn:focus {
    background-color: #f8f9fa;
    border-color: #4285f4;
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.302), 0 4px 8px 3px rgba(60, 64, 67, 0.149);
    color: #3c4043;
    outline: none;
    text-decoration: none;
}

.google-login-btn:active {
    background-color: #f1f3f4;
    border-color: #dadce0;
    box-shadow: 0 2px 3px 0 rgba(60, 64, 67, 0.302);
    color: #3c4043;
    text-decoration: none;
}

.google-login-btn:disabled {
    background-color: #ffffff;
    border-color: #f1f3f4;
    color: #9aa0a6;
    cursor: not-allowed;
}

.google-icon {
    margin-right: 8px;
    flex-shrink: 0;
}

.google-login-btn span {
    flex-grow: 1;
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Loading state */
.google-login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.google-login-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: google-button-spin 1s ease infinite;
}

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

/* Error message styling */
.google-oauth-error {
    background: #fff;
    border-left: 4px solid #dc3232;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
    margin: 5px 0 15px;
    padding: 1px 12px;
    border-radius: 0 4px 4px 0;
}

.google-oauth-error p {
    margin: 0.5em 0;
    color: #444;
    font-size: 14px;
}

.google-oauth-error strong {
    color: #dc3232;
}

/* Success message styling */
.google-oauth-success {
    background: #fff;
    border-left: 4px solid #46b450;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
    margin: 5px 0 15px;
    padding: 1px 12px;
    border-radius: 0 4px 4px 0;
}

.google-oauth-success p {
    margin: 0.5em 0;
    color: #444;
    font-size: 14px;
}

.google-oauth-success strong {
    color: #46b450;
}

/* Responsive design */
@media (max-width: 768px) {
    .google-login-btn {
        width: 100%;
        max-width: 320px;
        min-width: auto;
        padding: 14px 20px;
        min-height: 48px;
        font-size: 16px;
        margin: 0 auto;
    }
    
    .google-oauth-container {
        margin: 20px 0;
        padding: 0 15px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .google-oauth-section {
        margin: 25px 0;
        padding: 25px 10px;
    }
    
    .login-separator {
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    .google-login-btn {
        width: 100%;
        max-width: 280px;
        min-width: auto;
        padding: 16px 24px;
        min-height: 52px;
        font-size: 16px;
        margin: 0 auto;
    }
    
    .google-oauth-container {
        margin: 15px 0;
        padding: 0 10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .google-oauth-section {
        margin: 30px 0;
        padding: 30px 5px;
    }
    
    .google-icon {
        margin-right: 12px;
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 320px) {
    .google-login-btn {
        width: 100%;
        max-width: 260px;
        padding: 14px 20px;
        min-height: 48px;
        font-size: 15px;
        margin: 0 auto;
    }
    
    .google-oauth-container {
        padding: 0 5px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .google-oauth-section {
        padding: 25px 0;
    }
    
    .google-login-btn span {
        font-size: 15px;
    }
}

/* Integration with User Registration form */
.ur-frontend-form .google-oauth-container {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
}

/* Removed duplicate 'oder' content from CSS - now handled in HTML */

/* Google OAuth Section Styling */
.google-oauth-section {
    margin: 30px 0;
    text-align: center;
    position: relative;
    z-index: 5;
    clear: both;
    padding: 20px 0;
    border-top: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
}

.google-oauth-section::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #e1e1e1 20%, #e1e1e1 80%, transparent);
    margin-bottom: 20px;
}

.google-oauth-section::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #e1e1e1 20%, #e1e1e1 80%, transparent);
    margin-top: 20px;
}

/* Remove any debug styling from container only */
.google-oauth-container::before {
    display: none !important;
}

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

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

.login-separator span {
    background: #ffffff;
    color: #666;
    font-size: 12px;
    padding: 0 15px;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .google-login-btn {
        background-color: #2d2d30;
        border-color: #5f6368;
        color: #e8eaed;
    }
    
    .google-login-btn:hover {
        background-color: #353538;
        border-color: #5f6368;
    }
    
    .google-login-btn:focus {
        background-color: #353538;
        border-color: #8ab4f8;
    }
    
    .google-login-btn:active {
        background-color: #292a2d;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .google-login-btn {
        border-width: 2px;
        font-weight: 600;
    }
    
    .google-login-btn:focus {
        border-width: 3px;
        border-color: #1a73e8;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .google-login-btn {
        transition: none;
    }
    
    @keyframes google-button-spin {
        from {
            transform: rotate(0deg);
        }
        to {
            transform: rotate(360deg);
        }
    }
}
