/* OAuth Authentication Styles - MATCHED HEIGHTS */

.oauth-section {
    margin-top: 30px;
    padding-top: 20px;
}

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

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    position: relative;
    display: inline-block;
    padding: 0 15px;
    background: white;
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    align-items: center;  /* Center align vertically */
    width: 100%;
}

/* Apple Sign-In Button - Match Google height */
.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    height: 40px;  /* Match Google button height */
    flex-shrink: 0;
    flex-grow: 0;
    padding: 0 20px;  /* Reduced padding to match Google */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.oauth-btn:hover {
    border-color: #999;
    background: #f8f8f8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Google Button Container */
#google-signin-button-login,
#google-signin-button-register {
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Force only the direct child wrapper */
#google-signin-button-login > div,
#google-signin-button-register > div {
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    box-sizing: border-box !important;
    transform: scale(1.0);
    transform-origin: top left;
}

/* Apple Sign-In Button Styling */
.apple-btn {
    background: #000;
    color: white;
    border-color: #000;
}

.apple-btn:hover {
    background: #333;
    border-color: #333;
}

.oauth-icon {
    width: 20px;
    height: 20px;
}

/* Loading state for OAuth buttons */
.oauth-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.oauth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #999;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .oauth-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    /* Keep both buttons same width on mobile - don't stretch to 100% */
    .oauth-btn {
        width: 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
        padding: 0 20px;
        height: 40px;
        font-size: 15px;
    }
    
    #google-signin-button-login,
    #google-signin-button-register {
        width: 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
    }
    
    #google-signin-button-login > div,
    #google-signin-button-register > div {
        width: 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
    }
    
    .oauth-icon {
        width: 18px;
        height: 18px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .divider span {
        background: #1a1a1a;
        color: #aaa;
    }
    
    .oauth-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .oauth-btn:hover {
        background: #333;
        border-color: #666;
    }
}

/* OAuth account indicator */
.oauth-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.oauth-badge.google {
    background: #4285f4;
    color: white;
}

.oauth-badge.apple {
    background: #000;
    color: white;
}
