/* =====================================================
   PAGESRUS LOGIN – FIXED CENTERED DESIGN
===================================================== */

/* ---------- HARD RESET & BASE ---------- */
html, body {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    overflow-x: hidden !important;
}

/* Force full viewport height with centering */
body {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    height: 100vh !important; /* Force full viewport */
}

/* Remove all theme containers */
#page, #content, .site, .site-content, 
.elementor, .elementor-section, 
.elementor-container, .elementor-widget-wrap,
.wp-site-blocks, .wp-block-group,
.entry-content, .main-content {
    all: unset !important;
    width: 100% !important;
    height: 100vh !important; /* Full viewport */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ---------- CENTERED CONTAINER ---------- */
.pagesrus-login-container {
    width: 100%;
    height: 100vh; /* Full viewport height */
    min-height: 800px; /* Minimum height for centering */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* ---------- ANIMATED BACKGROUND ---------- */
.pagesrus-login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

/* Gradient orbs */
.pagesrus-login-bg::before,
.pagesrus-login-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 25s ease-in-out infinite;
}

.pagesrus-login-bg::before {
    width: 800px;
    height: 800px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    top: -300px;
    left: -300px;
    animation-delay: 0s;
}

.pagesrus-login-bg::after {
    width: 700px;
    height: 700px;
    background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
    bottom: -250px;
    right: -250px;
    animation-delay: -12s;
}

/* Subtle grid overlay */
.pagesrus-login-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 85%);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 40px) scale(0.9);
    }
}

/* ---------- LOGIN CARD ---------- */
.pagesrus-auth-wrapper {
    width: 100%;
    max-width: 480px;
    min-height: 560px; /* Fixed minimum height */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 60px 50px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 
        0 35px 90px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.1) inset;
    position: relative;
    margin: auto; /* Center within container */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content */
}

.pagesrus-auth-wrapper:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 45px 120px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Shine effect */
.pagesrus-auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.12),
        transparent
    );
    transition: left 0.8s ease;
}

.pagesrus-auth-wrapper:hover::before {
    left: 100%;
}

/* Glowing border effect */
.pagesrus-auth-wrapper::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(99, 102, 241, 0.3),
        rgba(139, 92, 246, 0.3),
        transparent
    );
    border-radius: 29px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pagesrus-auth-wrapper:hover::after {
    opacity: 1;
}

/* ---------- LOGO IMAGE ---------- */
.pagesrus-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.pagesrus-logo-img {
    width: 100%;
    max-width: 380px;   /* THIS is the key number */
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 14px 35px rgba(0, 0, 0, 0.5));
}


/* ---------- HEADINGS ---------- */
.pagesrus-auth-wrapper h1 {
    font-size: 40px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 12px;
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pagesrus-subtitle {
    font-size: 18px;
    color: #94a3b8;
    margin-bottom: 48px;
    line-height: 1.7;
    font-weight: 500;
    text-align: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- GOOGLE BUTTON STYLING ---------- */
.pagesrus-auth-box {
    width: 100%;
    margin-bottom: 40px;
}

/* Force Nextend Social Login button styling */
.pagesrus-auth-box .nsl-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: block !important;
}

/* ✅ Nextend wrapper centering fix */
.pagesrus-auth-box .nsl-container-buttons {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important; /* centers button group */
}

/* In case Nextend uses a different wrapper */
.pagesrus-auth-box .nsl-container .nsl-container-buttons,
.pagesrus-auth-box .nsl-container .nsl-container-buttons > div {
    width: 100% !important;
}

/* Make sure the actual button spans full width */
.pagesrus-auth-box .nsl-container .nsl-button {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important; /* safety */
}

.pagesrus-auth-box .nsl-container .nsl-button {
    width: 100% !important;
    min-height: 62px !important; /* Taller button */
    padding: 18px 28px !important;
    border-radius: 16px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    background: white !important;
    color: #1e293b !important;
    border: 2px solid #e2e8f0 !important;
    transition: all 0.3s ease !important;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.12),
        0 4px 6px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    position: relative;
    overflow: hidden;
}

.pagesrus-auth-box .nsl-container .nsl-button:hover {
    background: #f8fafc !important;
    transform: translateY(-4px) !important;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.pagesrus-auth-box .nsl-container .nsl-button:active {
    transform: translateY(-1px) !important;
}

/* Google icon styling */
.pagesrus-auth-box .nsl-container .nsl-button svg,
.pagesrus-auth-box .nsl-container .nsl-button img {
    width: 24px !important;
    height: 24px !important;
    margin-right: 0 !important;
}

/* ---------- FOOTER TEXT ---------- */
.pagesrus-switch {
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 28px;
    line-height: 1.6;
    text-align: center;
    font-weight: 500;
}

.pagesrus-switch a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

.pagesrus-switch a:hover {
    color: #8b5cf6;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.pagesrus-switch a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.pagesrus-switch a:hover::after {
    transform: scaleX(1);
}

.pagesrus-privacy-note {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- HIDE ALL THEME ELEMENTS ---------- */
header, footer, 
.site-header, .site-footer,
.elementor-location-header, .elementor-location-footer,
.admin-bar, #wpadminbar,
.navigation, .main-navigation,
.widget-area, .sidebar,
.post, .page-header,
.comments-area, .comment-respond,
.woocommerce, .woocommerce-breadcrumb {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: -9999px !important;
}

/* Remove WordPress admin bar */
#wpadminbar {
    display: none !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
.pagesrus-logo-img {
    width: 190px;
}

    
    .pagesrus-auth-wrapper {
        max-width: 420px;
        min-height: 500px;
        padding: 48px 36px;
        border-radius: 24px;
        margin: 20px;
    }
    
    .pagesrus-logo {
        margin-bottom: 40px;
    }
    
    .pagesrus-logo-icon {
        width: 64px;
        height: 64px;
        font-size: 24px;
        border-radius: 18px;
    }
    
    .pagesrus-logo-text {
        font-size: 36px;
    }
    
    .pagesrus-auth-wrapper h1 {
        font-size: 34px;
    }
    
    .pagesrus-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .pagesrus-auth-box .nsl-container .nsl-button {
        min-height: 56px !important;
        padding: 16px 24px !important;
        font-size: 16px !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 480px) {
    .pagesrus-auth-wrapper {
        max-width: 90%;
        min-height: 480px;
        padding: 40px 28px;
        border-radius: 20px;
        margin: 16px;
    }
    
    .pagesrus-logo {
        margin-bottom: 32px;
        gap: 16px;
    }
    
    .pagesrus-logo-icon {
        width: 56px;
        height: 56px;
        font-size: 22px;
        border-radius: 16px;
    }
    
    .pagesrus-logo-text {
        font-size: 32px;
    }
    
    .pagesrus-auth-wrapper h1 {
        font-size: 30px;
    }
    
    .pagesrus-subtitle {
        font-size: 15px;
        margin-bottom: 36px;
    }
    
    .pagesrus-auth-box .nsl-container .nsl-button {
        min-height: 52px !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        border-radius: 12px !important;
    }
    
    .pagesrus-switch {
        font-size: 15px;
        margin-bottom: 24px;
    }
    
    .pagesrus-privacy-note {
        font-size: 13px;
        margin-top: 28px;
        padding-top: 24px;
    }
}

/* ---------- FORCE CENTERING FIX ---------- */
/* This ensures centering even if theme interferes */
body > *:not(.pagesrus-login-container) {
    display: none !important;
}

#wpwrap, #wpcontent, #wpbody, #wpbody-content {
    height: 100vh !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---------- FALLBACK FOR OLDER BROWSERS ---------- */
@supports not (backdrop-filter: blur(25px)) {
    .pagesrus-auth-wrapper {
        background: rgba(15, 23, 42, 0.95);
    }
}