/* =============================================
   NSS Custom Login Page Styles
   ============================================= */

/* Full-page background */
body.login {
    background-image: url('https://nss.org.sg/wp-content/uploads/2024/10/Migratory-Bird-Walk-at-Kranji-Marshes.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body.login::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(240, 248, 240, 0.25);
    z-index: 0;
}

/* ── Two-column wrapper ── */
#nss-login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 900px;
    max-width: 96vw;
    margin: 40px auto;
}

/* Row 1: two cards side by side */
#nss-login-wrapper > #nss-login-info-panel,
#nss-login-wrapper > #login {
    flex: none;
}

/* Make the two cards sit in a row */
#nss-login-cards-row {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

/* Override: wrapper uses flex column, cards row uses flex row */
#nss-login-wrapper {
    gap: 0;
}

/* ── Left info panel ── */
#nss-login-info-panel {
    flex: 1 1 0;
    background: #ffffff;
    border-radius: 14px 14px 0 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 36px;
    margin-right: 32px;
    align-self: flex-start;
    min-width: 0;
}

.nss-info-inner {
    text-align: center;
}

.nss-logo-wrap img {
    width: 190px;
    height: auto;
    margin-bottom: 28px;
}

.nss-welcome-text {
    color: #555;
    font-size: 14px;
    line-height: 1.85;
    text-align: justify;
    margin: 0;
}

/* ── Right login form area ── */
body.login #login {
    width: auto !important;
    max-width: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Make both panels sit side by side inside the wrapper */
#nss-login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    grid-template-areas:
        "info form"
        "info footer";
}

#nss-login-info-panel {
    grid-area: info;
    margin-right: 0;
    border-radius: 14px;
    align-self: stretch;
}

body.login #login {
    grid-area: form;
    margin-left: 32px;
}

#nss-login-footer-strip {
    grid-area: footer;
    margin-left: 32px;
}

/* Hide the default WP logo h1 link */
body.login #login h1 {
    display: none;
}

/* ── Login form card ── */
body.login #loginform,
body.login #lostpasswordform,
body.login #registerform {
    background: #ffffff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.14);
    padding: 40px 44px 28px 44px;
    border: none;
    margin: 0;
}

/* Labels */
body.login form label {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

/* Input fields */
body.login form input[type="text"],
body.login form input[type="password"],
body.login form input[type="email"] {
    border: 1.5px solid #d0d0d0;
    border-radius: 7px;
    padding: 11px 14px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #222;
    background: #fafafa;
}

body.login form input[type="text"]:focus,
body.login form input[type="password"]:focus,
body.login form input[type="email"]:focus {
    border-color: #2e7d32;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.13);
}

/* Show/hide password button */
body.login .wp-pwd {
    position: relative;
}

body.login .wp-hide-pw {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #2e7d32 !important;
    font-weight: 700;
    font-size: 13px;
    padding: 0 6px !important;
    position: absolute;
    right: 4px;
    
    
}

/* Login button */
body.login .button-primary,
body.login input[type="submit"] {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 13px 0 !important;
    width: 100% !important;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(46,125,50,0.22);
    letter-spacing: 0.4px;
    margin-top: 8px;
    text-shadow: none;
    height: auto !important;
    line-height: 1.308 !important;
}

body.login .button-primary:hover,
body.login input[type="submit"]:hover {
    background: #1b5e20 !important;
    border-color: #1b5e20 !important;
    box-shadow: 0 4px 18px rgba(46,125,50,0.32);
}

/* Remember me */
body.login form .forgetmenot {
    margin-top: 12px;
}

body.login form .forgetmenot label {
    font-weight: 400;
    color: #555;
    font-size: 13px;
    display: inline;
}

/* Hide the default #nav (we replace it with our footer strip) */
body.login #nav,
body.login #backtoblog {
    display: none !important;
}

/* Error / info messages */
body.login #login_error,
body.login .message,
body.login .success {
    border-left: 4px solid #2e7d32;
    border-radius: 0 6px 6px 0;
    background: #f0faf0;
    color: #1b5e20;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ── Footer strip (Join us / FAQ) ── */
#nss-login-footer-strip {
    background: #f4faf4;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.14);
    padding: 0;
    overflow: hidden;
}

.nss-footer-row {
    padding: 12px 28px;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

.nss-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2ede2;
}

.nss-footer-links a {
    color: #333;
    text-decoration: none;
}

.nss-footer-links a strong {
    color: #2e7d32;
}

.nss-footer-links a:last-child {
    color: #555;
    font-size: 13px;
}

.nss-footer-links a:last-child:hover {
    color: #2e7d32;
}

.nss-footer-help {
    color: #555;
}

.nss-footer-help a {
    color: #2e7d32;
    text-decoration: none;
}

.nss-footer-help a:hover {
    text-decoration: underline;
}

/* ── Responsive: stack vertically on small screens ── */
@media (max-width: 760px) {

    body.login {
        align-items: flex-start;
        padding: 16px 0 32px 0;
        min-height: 100vh;
    }

    #nss-login-wrapper {
        display: flex;
        flex-direction: column;
        grid-template-columns: unset;
        grid-template-areas: unset;
        width: 94vw;
        max-width: 420px;
        margin: 0 auto;
        gap: 0;
    }

    /* Hide the info panel on mobile — too long, not needed */
    #nss-login-info-panel {
        display: none;
    }

    body.login #login {
        grid-area: unset;
        margin-left: 0;
        width: 100% !important;
        order: 1;
    }

    #nss-login-footer-strip {
        grid-area: unset;
        margin-left: 0;
        order: 2;
    }

    body.login #loginform,
    body.login #lostpasswordform,
    body.login #registerform {
        border-radius: 14px 14px 0 0;
        padding: 28px 22px 20px 22px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    }

    #nss-login-footer-strip {
        border-radius: 0 0 14px 14px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    }

    .nss-footer-row {
        padding: 11px 18px;
    }

    .nss-footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    body.login .button-primary,
    body.login input[type="submit"] {
        font-size: 15px !important;
    }
}