/**
 * Loewen Promotional Warehouse — Login Page Styles
 * Extracted from LoginPress inline output and externalized
 * by loewen-csp-hardening mu-plugin.
 *
 * Edit this file instead of the LoginPress customizer for any login
 * page style changes. Bump LOEWEN_LOGIN_CSS_VERSION in the mu-plugin
 * after saving to bust the browser cache.
 *
 * File location: /wp-content/mu-plugins/loewen-csp-hardening/css/login-custom.css
 */

/* ==========================================================================
   1. BOX MODEL RESET
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ==========================================================================
   2. BODY / BACKGROUND
   ========================================================================== */

body.login {
    background-image: url( https://store.loewen.com/wp-content/plugins/loginpress/img/minimalist.jpg );
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px 0 0 !important;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================================================
   3. LOGIN CONTAINER
   ========================================================================== */

#login {
    border-radius: 0;
    margin: 40px auto !important;
    background: none;
    box-shadow: none;
    padding: 0;
    max-width: 350px;
    width: 100%;
    position: relative;
}

/* ==========================================================================
   4. LOGO
   ========================================================================== */

.login h1 a,
.login .wp-login-logo a {
    background-image: url( https://store.loewen.com/wp-content/uploads/2021/04/PW-Logo_Black.png ) !important;
    width: 196px !important;
    height: 65px !important;
    background-size: contain !important;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: 100%;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    margin-inline: auto;
}

/* ==========================================================================
   5. FORM WRAPPER
   ========================================================================== */

.login form {
    background: #fff;
    padding: 30px 25px;
    margin-top: 20px;
    margin-left: 0;
    box-shadow: 0px 12px 30px 0px rgba( 0, 0, 0, 0.10 );
    border: none;
    overflow: visible;
}

/* ==========================================================================
   6. LABELS
   ========================================================================== */

.login label {
    color: #2C3338;
    font-size: 14px;
    line-height: 19px;
    margin: 0 0 10px;
}

.login form .forgetmenot {
    float: none !important;
}

.login form .forgetmenot label {
    display: inline-block;
    margin: 0;
}

/* ==========================================================================
   7. TEXT / PASSWORD INPUTS
   ========================================================================== */

.login form .input,
.login input[type="text"],
.login input[type="password"] {
    height: 48px;
    background: #fff;
    margin-bottom: 20px;
    font: normal 15px "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
    color: #7f7f7f;
    border: 1px solid #C3C4C7;
    border-radius: 0;
    padding-left: 15px;
    font-weight: normal;
    box-shadow: none;
    margin-right: 0;
}

/* User/pass field grouping — margin handled on the wrapper */
#loginform .user-pass-fields input {
    margin-bottom: 0;
}

#loginform .user-pass-fields {
    margin-bottom: 18px;
    position: relative;
}

#loginform input[type="text"],
#loginform input[type="password"] {
    box-shadow: 0 0 0px rgba( 0, 0, 0, 0.8 );
}

/* ==========================================================================
   8. SHOW/HIDE PASSWORD BUTTON
   ========================================================================== */

.login .button.wp-hide-pw {
    height: 48px;
}

.login .button.wp-hide-pw .dashicons {
    color: #363636;
}

/* ==========================================================================
   9. CHECKBOXES
   ========================================================================== */

input[type="checkbox"],
input[type="checkbox"]:checked {
    border-color: #F6366A !important;
}

input[type="checkbox"]:hover {
    border-color: #C3C4C7 !important;
}

input[type="checkbox"]:checked::before {
    /* Custom pink checkmark — inline SVG data URI */
    content: url( 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z" fill="%23F6366A"/></svg>' );
    height: 1.3125rem;
    width: 1.3125rem;
    margin: -0.35rem 0 0 -0.375rem;
}

.login form input[type="checkbox"]:focus {
    box-shadow: none;
    outline: none;
}

/* ==========================================================================
   10. SUBMIT / BUTTON PRIMARY
   ========================================================================== */

.wp-core-ui #login .button-primary,
.wp-core-ui #login .wp-generate-pw,
body.wp-core-ui #login .two-factor-email-resend .button,
.login input[type="submit"],
.wp-core-ui.login .button-primary {
    padding: 12px 15px;
    background: #F6366A;
    border-color: #F6366A;
    color: #fff;
    margin: 20px 0 0;
    font: normal 15px "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
    width: 100%;
    float: none;
    height: auto;
    min-height: 46px;
    line-height: 1.33333;
    border-radius: 5px;
    min-width: fit-content;
    box-shadow: 0 0 0px rgba( 0, 0, 0, 0.8 );
    text-shadow: none;
}

.wp-core-ui #login .wp-generate-pw {
    background: rgba( 246, 54, 106, 0.20 );
    color: #F6366A;
    font-family: inherit;
}

.wp-core-ui #login .wp-generate-pw:hover {
    background: rgba( 246, 54, 106, 0.30 );
}

.login .button-primary {
    float: none;
}

/* Submit wrapper */
#login form p.submit {
    position: relative;
    clear: both;
}

#login form p + p:not( .forgetmenot ) {
    padding-top: 0 !important;
    margin-top: 20px !important;
}

#login form p + p:not( .forgetmenot ) input[type="submit"] {
    margin-top: 0;
}

/* ==========================================================================
   11. DASHICONS (visibility toggle)
   ========================================================================== */

.dashicons-visibility:before,
.dashicons-hidden:hover::before {
    color: inherit !important;
}

/* ==========================================================================
   12. NAV LINKS (lost password, back to blog)
   ========================================================================== */

.login #nav {
    padding: 0;
    display: flex;
    justify-content: space-between;
    color: #2C3338;
    text-align: center;
    font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
}

#backtoblog {
    text-align: center;
}

.loginpress-seprator {
    display: none;
}

/* ==========================================================================
   13. PRIVACY POLICY LINK
   ========================================================================== */

.login .privacy-policy-page-link {
    text-align: center;
    width: 100%;
    margin: 0 0 2em;
    clear: both;
    padding-top: 10px;
}

.login .privacy-policy-page-link > a.privacy-policy-link {
    color: inherit;
    text-decoration: none;
}

.login .privacy-policy-page-link > a.privacy-policy-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   14. MESSAGES & ERRORS
   ========================================================================== */

#login_error {
    display: block;
}

.login .message,
.login .success,
.login .custom-message {
    border-left: 4px solid #00a0d2;
    background-color: #fff;
    padding: 12px;
    margin-left: 0;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
}

/* ==========================================================================
   15. CAPS LOCK INDICATOR
   ========================================================================== */

.loginpress-caps-lock {
    background: rgba( 51, 56, 61, 0.9 );
    color: #fff;
    display: none;
    font-size: 14px;
    width: 120px;
    padding: 5px 10px;
    line-height: 20px;
    position: absolute;
    left: calc( 100% + 10px );
    top: 50%;
    transform: translateY( -50% );
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    text-align: center;
    box-shadow: 0 0 9px 0px rgba( 0, 0, 0, 0.20 );
    margin: 0;
    font-weight: normal;
}

.loginpress-caps-lock::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 5px 5px 0;
    border-color: transparent rgba( 51, 56, 61, 0.9 ) transparent transparent;
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    transition: all 0.3s ease-in-out;
    z-index: 1;
}

/* ==========================================================================
   16. LANGUAGE SWITCHER
   ========================================================================== */

body .language-switcher {
    margin-top: 10px;
    clear: both;
    z-index: 1;
    left: 0;
    width: 100%;
    position: static;
}

#language-switcher {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    flex-wrap: wrap;
}

#language-switcher label {
    margin-bottom: 0;
}

#language-switcher input[type="submit"] {
    padding: 0 10px;
}

/* ==========================================================================
   17. FOOTER / POWERED BY
   ========================================================================== */

body .footer-wrapper {
    margin-top: 30px;
    position: static;
    width: 100%;
    overflow: hidden;
}

.footer-cont {
    right: 0;
    bottom: 0;
    left: 0;
    text-align: center;
    vertical-align: bottom;
}

.loginpress-show-love {
    color: #222;
    float: right;
    font-style: italic;
    padding-right: 20px;
    padding-bottom: 10px;
    position: absolute;
    bottom: 3px;
    right: 0;
    z-index: 10;
}

.loginpress-show-love a {
    color: #263466;
    text-decoration: none;
}

.loginpress-show-love a:hover {
    color: #4d5d95;
}

/* ==========================================================================
   18. SHAKE ANIMATION (login error)
   ========================================================================== */

body.login form.shake {
    transform: none;
    animation: loewen-login-shake 0.2s cubic-bezier( 0.19, 0.49, 0.38, 0.79 ) both;
}

@keyframes loewen-login-shake {
    25%  { margin-left: -20px; }
    75%  { margin-left:  20px; }
    100% { margin-left:     0; }
}

/* ==========================================================================
   19. TWO-FACTOR / BACKUP METHODS
   ========================================================================== */

.login .backup-methods-wrap a,
#login form p:not( [class] ) {
    color: #555d66;
}

.login .backup-methods-wrap a:hover {
    color: #00a0d2;
}

/* ==========================================================================
   20. WORDFENCE 2FA TRANSPARENCY FIX
   ========================================================================== */

#loginform[style="position: relative;"] > .user-pass-wrap,
#loginform[style="position: relative;"] > .forgetmenot,
#loginform[style="position: relative;"] > .submit,
#loginform[style="position: relative;"] > p {
    visibility: hidden !important;
}

#wfls-prompt-overlay {
    background: transparent;
    padding: 0;
}

#wfls-prompt-wrapper input[type="text"] {
    padding-left: 20px;
}

/* ==========================================================================
   21. INTERIM / POPUP LOGIN
   ========================================================================== */

.interim-login.login {
    min-height: 520px;
    height: 100vh;
}

.interim-login #login {
    width: 100%;
    max-width: 380px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
}

.interim-login.login form {
    margin: 30px !important;
}

.interim-login #login_error,
.interim-login.login .message {
    margin: 0 20px 16px !important;
}

.interim-login #login .submit {
    margin-top: 10px;
}

/* ==========================================================================
   22. WP ENGINE ADMIN EMAIL CONFIRM FORM
   ========================================================================== */

.admin-email__actions-primary .button:first-child {
    font: 400 15px "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    height: auto;
    line-height: 20px !important;
    padding: 13px;
    width: 100%;
    text-align: center;
    background-color: #008ec2;
    border: 0;
    margin-bottom: 8px;
    border-radius: 5px;
}

.admin-email__actions-primary .button:first-child:hover {
    background-color: #008ec2;
}

.login form.admin-email-confirm-form {
    max-width: 360px;
    margin: 0 auto;
}

.login-action-confirm_admin_email #backtoblog a {
    color: #008ec2 !important;
}

/* ==========================================================================
   23. RTL SUPPORT
   ========================================================================== */

html[dir="rtl"] .login form .input,
html[dir="rtl"] .login input[type="text"] {
    margin-right: 0;
}

html[dir="rtl"] #loginpress_showPasswordWrapper {
    right: auto;
    left: 0;
}

/* ==========================================================================
   24. RESPONSIVE
   ========================================================================== */

@media screen and ( max-width: 767px ) {

    #login {
        width: 300px;
    }

    .loginpress-show-love {
        display: none !important;
    }

    .loginpress-caps-lock {
        left: auto;
        right: 0;
        top: 149%;
    }

    .loginpress-caps-lock::before {
        border-width: 0 5px 5px 5px;
        border-color: transparent transparent rgba( 51, 56, 61, 0.9 ) transparent;
        top: 0;
        left: 5px;
        right: auto;
    }
}
