/* MS Theme — wp-login.php customization
   Matches campus.masterstart.co.za login page: dark navy body, centered pink card with offset dark shadow.
   Loaded via login_enqueue_scripts hook in functions.php. */

:root {
    --ms-navy:        #081D30;
    --ms-navy-deep:   #03111c;
    --ms-pink:        #F22670;
    --ms-pink-dark:   #991A59;
    --ms-white:       #FFFFFF;
    --ms-grey-200:    #E1E7EC;
    --ms-grey-800:    #333333;
    --ms-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Page background */
html, body.login {
    background: var(--ms-navy) !important;
    font-family: var(--ms-font);
    color: var(--ms-white);
    min-height: 100vh;
}

body.login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;  /* top padding leaves room for header-style logo */
    position: relative;
}

/* MasterStart wordmark — top-left header bar, mirrors live campus.masterstart.co.za */
.login h1 {
    position: absolute;
    top: 0; left: 0; right: 0;
    margin: 0;
    padding: 20px 32px;
    background: var(--ms-navy);
    text-align: left;
    line-height: 0;
}
.login h1 a {
    background-image: url('../images/logo-white.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    display: inline-block;
    width: 200px;
    height: 44px;
    margin: 0;
    text-indent: -9999px;
    outline: none;
}

/* Login card (pink panel with offset dark shadow) */
#login {
    width: 100%;
    max-width: 440px;
    padding: 0;
}

#loginform,
#registerform,
#lostpasswordform,
#resetpassform {
    background: var(--ms-pink);
    border: 0;
    border-radius: 0;
    padding: 36px 32px;
    box-shadow: 8px 8px 0 var(--ms-navy-deep);
    margin-top: 0;
    overflow: visible;
}

/* Heading inside the card (e.g. "Lost Password?") */
#login h2,
#login form::before {
    display: block;
    text-align: center;
    color: var(--ms-white);
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0 0 24px;
}

/* Custom "Login" heading injected via before-pseudo on loginform
   (wp-login.php doesn't add a visible heading for the login form;
    we emulate the live-site look by inserting one via CSS content.) */
#loginform::before {
    content: "Login";
}

/* Labels */
#login label,
.login form .input,
.login form label {
    color: var(--ms-white);
    font-weight: 700;
    font-size: 0.9375rem;
}
#login label {
    display: block;
    margin-bottom: 6px;
}

/* Inputs */
.login form .input,
.login input[type="text"],
.login input[type="email"],
.login input[type="password"] {
    width: 100%;
    font-size: 15px;
    font-family: var(--ms-font);
    padding: 12px 14px;
    height: 48px;
    color: var(--ms-grey-800);
    background: var(--ms-white);
    border: 1px solid var(--ms-grey-200);
    border-radius: 2px;
    box-shadow: none;
    margin: 0 0 18px;
}
.login form .input:focus,
.login input:focus {
    outline: 2px solid var(--ms-navy);
    outline-offset: 2px;
    border-color: var(--ms-navy);
}

/* Submit button — white bg, black text, matches live site.
   WP core login.css sets `float: right` on #wp-submit which collapses
   the <p class="submit"> wrapper to 0 height and pushes the button outside
   the form flow. We reset float + width + padding to keep it inside the card. */
.login p.submit { overflow: hidden; }  /* contain the float */
.login #wp-submit,
.login .button-primary,
.wp-core-ui .button-primary {
    float: none !important;
    display: block !important;
    width: 100% !important;
    background: var(--ms-white) !important;
    color: var(--ms-navy) !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    font-family: var(--ms-font) !important;
    padding: 14px 24px !important;
    height: auto !important;
    line-height: 1 !important;
    text-transform: none !important;
    border: 0 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 6px 0 0 !important;
    transition: background .15s ease, color .15s ease;
}
.login .button-primary:hover,
.login .button-primary:focus {
    background: var(--ms-navy) !important;
    color: var(--ms-white) !important;
}

/* Remember-me row — hidden to match the live campus.masterstart.co.za layout.
   WP still honours the default (no remember), users can tick via browser password manager. */
.login .forgetmenot { display: none; }

/* "Lost your password?" / "Back to…" links below the card */
#nav, #backtoblog {
    text-align: center;
    margin-top: 22px;
    font-size: 0.875rem;
    padding: 0;
}
#nav { margin-top: 28px; }
#nav a, #backtoblog a {
    color: var(--ms-white) !important;
    text-decoration: none;
    font-weight: 500;
    opacity: 0.85;
}
#nav a:hover, #backtoblog a:hover {
    color: var(--ms-pink) !important;
    opacity: 1;
    text-decoration: underline;
}

/* Error / message banners */
.login .message,
.login #login_error {
    background: var(--ms-white);
    color: var(--ms-navy);
    border-left: 4px solid var(--ms-pink);
    padding: 12px 16px;
    border-radius: 2px;
    margin-bottom: 20px;
    font-weight: 500;
    box-shadow: none;
}

/* Language switcher — hide, we're English-only */
.language-switcher { display: none; }

/* Footer-style privacy link that WP sometimes adds */
.privacy-policy-page-link { text-align: center; margin-top: 30px; }
.privacy-policy-page-link a {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
}

/* Mobile */
@media (max-width: 480px) {
    .login h1 a { width: 200px; height: 50px; margin-bottom: 24px; }
    #loginform,
    #registerform,
    #lostpasswordform,
    #resetpassform { padding: 28px 22px; box-shadow: 6px 6px 0 var(--ms-navy-deep); }
}
