/**
 * Google OAuth Styles - Zhaket Demo
 * 
 * @package MLM
 * @since 1.0.0
 */

/* Google Sign-in Button Wrapper */
.mlm-google-signin-wrapper {
    margin: 20px 0;
    width: 100%;
}

.mlm-google-signin-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
}

/* Separator - Zhaket style */
.mlm-google-oauth-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.mlm-google-oauth-separator::before,
.mlm-google-oauth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.mlm-google-oauth-separator-text {
    padding: 0 16px;
    color: #64748b;
    font-size: 14px;
    background: #fff;
    position: relative;
    font-weight: 500;
}

/* Messages - Zhaket style */
.mlm-google-oauth-message {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: right;
    direction: rtl;
    animation: slideDown 0.3s ease-out;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mlm-google-oauth-message-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}

.mlm-google-oauth-message-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.mlm-google-oauth-message-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Overlay - Zhaket Style */
.mlm-google-oauth-loading-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    border-radius: inherit;
    margin: 0 !important;
    padding: 0 !important;
}

.mlm-google-oauth-loading-overlay.mlm-google-oauth-loading-active {
    opacity: 1;
    visibility: visible;
}

.mlm-google-oauth-loading-content {
    text-align: center;
    padding: 40px;
}

/* Spinner - Zhaket Style */
.mlm-google-oauth-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 28px;
    position: relative;
}

.mlm-google-oauth-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 4px solid #f1f5f9;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: mlm-google-oauth-spin 0.8s linear infinite;
}

.mlm-google-oauth-spinner::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 3px solid transparent;
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: mlm-google-oauth-spin 1.2s linear infinite reverse;
}

@keyframes mlm-google-oauth-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading Text - Zhaket Style */
.mlm-google-oauth-loading-text {
    font-size: 19px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    direction: rtl;
}

.mlm-google-oauth-loading-subtitle {
    font-size: 14px;
    color: #64748b;
    direction: rtl;
    font-weight: 500;
}

/* Loading state for buttons */
.mlm-google-signin-btn.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.mlm-google-signin-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #f1f5f9;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mlm-google-signin-wrapper {
        margin: 16px 0;
    }
    
    .mlm-google-oauth-separator {
        margin: 20px 0;
    }
    
    .mlm-google-oauth-message {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .mlm-google-oauth-loading-content {
        padding: 30px 20px;
    }
    
    .mlm-google-oauth-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 22px;
    }
    
    .mlm-google-oauth-loading-text {
        font-size: 17px;
    }
    
    .mlm-google-oauth-loading-subtitle {
        font-size: 13px;
    }
}

/* Override Google button styles if needed */
.mlm-google-signin-wrapper iframe {
    max-width: 100% !important;
}

/* Zhaket specific adjustments */
.zhaket-login-layout .mlm-google-signin-wrapper {
    margin: 24px 0;
}

.zhaket-login-layout .mlm-google-oauth-separator {
    margin: 28px 0;
}

