body {
    background: white;
}

body.login {
    min-height: 100vh;
    display: flex !important;
    justify-content: center;   /* horizontal */
    align-items: center;       /* vertical */
    padding: 40px 0;           /* small breathing room */
    width: 100% !important;
}

/* Reset the login box height */
body.login #login {
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Keep your width logic but remove the enforced height */
#login {
    width: clamp(300px, 90%, 480px) !important;
}

#login {
    width: clamp(0px, 90%, 480px);
    height: 100vh;
    padding-top: 0px;
}

#loginform {
    background: none;
    border: 0px;
    box-shadow: none;
}

.login h1 a {
    width: 240px;
    height: 80px;
    background-size: 240px;
    background-image: none, url(https://mylunaphoredev.wpengine.com/wp-content/themes/p-lunaphore-portal/assets/img/lunaphore_biotechne_grey.png);
}

.login h1 a:hover::after {
    width: 0%!important;
    opacity: 0 !important;
}

#loginform .input {
    display: block;
    width: 100% !important;
    height: calc(1.5em + 1.5rem + 2px);
    padding: 0.75rem 1.25rem !important;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #191919;
    background-clip: padding-box;
    border: 1px solid #9c9e9f;
    border-radius: 5px !important;
    border-radius: 0;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#loginform label {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    color: #191919;
    text-align: left;
    margin-bottom: 0.5rem;
}

.wp-hide-pw {
    height: calc(1.5em + 1.5rem + 2px)!important;
}

#backtoblog {
    display: none;
}

#nav, #backtoblog, .privacy-policy-page-link {
    text-align: center!important;
}

.privacy-policy-page-link {
    padding: 0 24px;
    width: auto!important;
}

.wp-login-lost-password, #backtoblog a, .privacy-policy-page-link a { 
    display: inline-block;
    position: relative;
    padding-right: 0px;
    padding-left: 0px;
    color: #37b4c8!important;
    transition-duration: 0.3s;
    font-size: calc(15px + 1 * ((100vw - 480px) / 511));
    line-height: 1.6;
    font-weight: bold;
    text-decoration: none;
}

#wp-submit {
    padding: 5px 21px;
    color: #fff;
    background-color: #37b4c8;
    border-color: #37b4c8;
    font-size: 18px !important;
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    line-height: 1.5;
    border-radius: 50px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;    
}

.forgetmenot {
    width: 100%;
    text-align: start;
}

.forgetmenot label {
    color: #37b4c8!important;
}

#login a::after {
    border-bottom: 1px solid #37b4c8;
    width: 0%;
    opacity: 0;
    content: "";
    position: absolute;
    display: block;
    left: 0;
    right: 0;
    transition-duration: 0.3s;
}

#login a:hover::after {
    width: 100%;
    opacity: 1;
}

#login a:hover {
    color: #37b4c8;
    text-decoration: none;
}

/* AIO Login template-03 overrides: match its specificity so the custom design wins */
body.login.aio-login__template-03 {
    background: white;
}

body.login.aio-login__template-03 #login {
    width: clamp(300px, 90%, 480px);
    max-width: none;
    padding: 0 !important;
    margin: 0 !important;
}

body.login.aio-login__template-03 #login h1 a {
    width: 240px;
    height: 80px;
    margin: 0 auto 26px;
    background-size: 240px;
}

body.login.aio-login__template-03 #login form {
    margin: 20px 0 0;
    padding: 26px 24px 34px;
    overflow: hidden;
    background: none;
    border: 0;
    box-shadow: none;
}

body.login.aio-login__template-03 #loginform input[type="text"],
body.login.aio-login__template-03 #loginform input[type="password"],
body.login.aio-login__template-03 #loginform input[type="email"] {
    height: calc(1.5em + 1.5rem + 2px);
    min-height: 40px;
    margin: 2px 6px 16px 0;
    padding: 0.75rem 1.25rem !important;
    font-size: 1rem;
    line-height: 1.5;
    color: #191919;
    border: 1px solid #9c9e9f;
    border-radius: 5px !important;
}

body.login.aio-login__template-03 #loginform input[type="submit"] {
    float: right;
    min-height: 32px;
    margin: 0;
    padding: 5px 21px;
    font-size: 18px !important;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    background: #37b4c8;
    border: 1px solid #37b4c8;
    border-radius: 50px;
}

body.login.aio-login__template-03 #loginform input[type="submit"]:hover {
    background: #2e9aac;
    border-color: #2e9aac;
}

body.login.aio-login__template-03 .wp-pwd {
    margin-bottom: 0;
}

body.login.aio-login__template-03 #nav,
body.login.aio-login__template-03 #backtoblog {
    margin: 24px 0 0;
    padding: 0 24px;
    font-size: 13px;
    text-align: center !important;
}

body.login.aio-login__template-03 #backtoblog {
    display: none;
}

body.login.aio-login__template-03 #nav a,
body.login.aio-login__template-03 #backtoblog a {
    color: #37b4c8 !important;
}
/* AIO Login inline CSS uses a long :not() chain (+ !important); repeat it so these win (loaded later) */
body.login.aio-login__template-03[class*="aio-login__template-"]:not(.aio-login__template-05):not(.aio-login__template-06):not(.aio-login__template-07):not(.aio-login__template-08):not(.aio-login__template-09) #login form p.submit {
    display: block !important;
}

body.login.aio-login__template-03[class*="aio-login__template-"]:not(.aio-login__template-05):not(.aio-login__template-06):not(.aio-login__template-07):not(.aio-login__template-08):not(.aio-login__template-09) #login form p.submit input[type="submit"] {
    float: right !important;
    margin-left: 0 !important;
}

body.login.aio-login__template-03[class*="aio-login__template-"]:not(.aio-login__template-05):not(.aio-login__template-06):not(.aio-login__template-07):not(.aio-login__template-08):not(.aio-login__template-09) #login form p.forgetmenot {
    display: block;
    margin: 0;
}

/* Plugin inline CSS swaps in the WordPress logo */
body.login.aio-login__template-03 #login h1 a {
    background-image: url(../img/lunaphore_biotechne_grey.png);
    background-size: 240px;
    background-position: center top;
    background-repeat: no-repeat;
}
