/* ==========================================================================
   Kids Science Magazine - Science Themed Modern Login (Updated 2026)
   ========================================================================== */

/* Core fixes for mobile viewport and scrolling - minimal body touch */
html {
    height: -webkit-fill-available;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #bbdefb 50%, #d1c4e9 100%);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Subtle floating particles background (very light) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 15% 20%, rgba(255,255,255,0.4) 0%, transparent 20%),
        radial-gradient(circle at 85% 70%, rgba(255,255,255,0.35) 0%, transparent 25%),
        radial-gradient(circle at 40% 80%, rgba(200,220,255,0.3) 0%, transparent 30%);
    pointer-events: none;
    z-index: -1;
}

/* Do NOT use flex on body - preserves theme header visibility */
.pmpro,
.pmpro_login,
#pmpro_login,
.pmpro_form,
body.page-template-default .pmpro {
    width: 100%;
    max-width: 480px;
    margin: 6rem auto 4rem; /* Generous top margin to appear below site header */
    padding: 0;
}

/* Login card with science glow */
#pmpro_login form,
.pmpro_form form,
.pmpro_login form {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        0 0 0 1px rgba(99, 102, 241, 0.08),
        inset 0 0 20px rgba(187, 222, 251, 0.3);
    padding: 2.8rem 2.2rem;
    border: 1px solid #bbdefb;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 2;
}

/* Welcome title - larger & playful */
.pmpro-welcome-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e3a8a; /* deep science blue */
    font-weight: 800;
    font-size: 2.4rem;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

/* Accent colors */
:root {
    --science-primary: #6366f1;
    --science-accent: #06b6d4;
    --science-glow: rgba(6, 182, 212, 0.25);
}

/* Modern inputs */
.pmpro_form input[type="text"],
.pmpro_form input[type="email"],
.pmpro_form input[type="password"],
#pmpro_login input[type="text"],
#pmpro_login input[type="password"] {
    width: 100%;
    padding: 0.95rem 1.1rem;
    border: 2px solid #bfdbfe;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.25s ease;
    background: #f9fafb;
}

.pmpro_form input:focus,
#pmpro_login input:focus {
    outline: none;
    border-color: var(--science-accent);
    box-shadow: 0 0 0 5px var(--science-glow);
    background: white;
}

/* Labels */
.pmpro_form label,
#pmpro_login label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

/* Fun science submit button */
#pmpro_login input[type="submit"],
.pmpro_form input[type="submit"],
.pmpro_btn-submit {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(90deg, var(--science-primary), var(--science-accent));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px var(--science-glow);
    transition: all 0.3s ease;
    margin-top: 1.2rem;
}

#pmpro_login input[type="submit"]:hover,
.pmpro_form input[type="submit"]:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.45);
    background: linear-gradient(90deg, #4f46e5, #0891b2);
}

/* Links */
.pmpro_lost_password a,
#pmpro_login a {
    color: var(--science-accent);
    text-decoration: none;
    font-weight: 500;
}

.pmpro_lost_password a:hover,
#pmpro_login a:hover {
    text-decoration: underline;
}

/* Mobile adjustments - reduce top margin on small screens, ensure scroll */
@media (max-width: 768px) {
    .pmpro,
    .pmpro_login,
    #pmpro_login,
    .pmpro_form {
        margin: 4rem auto 3rem;
        padding: 0 1rem;
    }

    #pmpro_login form,
    .pmpro_form form {
        padding: 2rem 1.6rem;
        border-radius: 16px;
    }
}

@media (max-height: 600px) {
    .pmpro,
    .pmpro_login,
    #pmpro_login {
        margin-top: 3rem;
    }
}