/* WordPress login page styling - matches magic link login without hiding elements */

/* Import design system font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Lato:wght@400;700&display=swap');

/* Body styling - matches magic link gradient background */
body.login {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #0e3c44 0%, #8acbc0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Login container - matches magic link white card */
#login {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    padding: 3rem;
    margin: 0 auto 1.5rem auto;
    position: relative;
    z-index: 10;
}

/* Language switcher - position below login form */
.language-switcher {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* Logo/Heading area */
#login h1 a {
    background-size: contain;
    width: 100%;
    height: 140px;
    margin-bottom: 2rem;
    background-image: url(https://knowledgequity.com.au/wp-content/uploads/2015/02/logo.png);
}

/* Form styling */
#loginform,
#registerform,
#lostpasswordform {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* Labels */
#loginform label,
#registerform label,
#lostpasswordform label {
    display: block;
    font-weight: 700;
    color: #0e3c44;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
}

/* Input fields */
#user_login,
#user_email,
#user_pass,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    width: 100% !important;
    padding: 0.875rem 1rem !important;
    font-size: 1rem !important;
    font-family: 'Lato', sans-serif !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    margin: 0 0 1.5rem 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    height: auto !important;
}

#user_login:focus,
#user_email:focus,
#user_pass:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    outline: none !important;
    border-color: #8acbc0 !important;
    box-shadow: 0 0 0 3px rgba(138, 203, 192, 0.1) !important;
}

/* Submit buttons */
#wp-submit,
#wp-submit-ke,
.wp-core-ui .button-primary {
    width: 100%;
    padding: 0.875rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    font-family: 'Lato', sans-serif !important;
    color: #0e3c44 !important;
    background: #fcb900 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-height: 44px !important;
    text-shadow: none !important;
    box-shadow: none !important;
    height: auto !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 100;
}

#wp-submit:hover,
#wp-submit-ke:hover,
.wp-core-ui .button-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(252, 185, 0, 0.3) !important;
    background: #fcb900 !important;
}

#wp-submit:active,
#wp-submit-ke:active,
.wp-core-ui .button-primary:active {
    transform: translateY(0) !important;
}

/* Register/Cancel buttons */
#wp-register-ke, 
#wp-cancel-ke {
    border-radius: 8px !important;
    font-size: 1rem !important;
    padding: 0.875rem !important;
    margin: 10px 0 !important;
    font-family: 'Lato', sans-serif !important;
}

/* Custom submit wrapper */
#custom-submit-wrapper { 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 1rem;
}

/* Success messages */
.ke-success {
    font-size: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.login .message,
.login .success {
    border-left: 4px solid #fcb900;
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Error messages */
#login_error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #e74c3c;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Navigation links */
#nav,
#backtoblog {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

#nav a,
#backtoblog a {
    color: #0e3c44;
    text-decoration: none;
    font-weight: 700;
}

#nav a:hover,
#backtoblog a:hover {
    color: #8acbc0;
    text-decoration: underline;
}

/* Privacy policy link */
.privacy-policy-page-link {
    text-align: center;
    margin-top: 1rem;
}

.privacy-policy-page-link a {
    color: #8acbc0;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
}

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

/* Spinners */
.spinner {
    background: url(../images/spinner.gif) no-repeat;
    background-size: 20px 20px;
    display: inline-block;
    visibility: hidden;
    float: right;
    vertical-align: middle;
    opacity: 0.7;
    filter: alpha(opacity=70);
    width: 20px;
    height: 20px;
    margin: 4px 10px 0;
}

.lds-dual-ring {
    color: #0e3c44;
}

.lds-dual-ring,
.lds-dual-ring:after {
    box-sizing: border-box;
}

.lds-dual-ring {
    display: inline-block;
    width: 80px;
    height: 80px;
}

.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 25px;
    height: 25px;
    margin: 8px;
    border-radius: 50%;
    border: 6.4px solid currentColor;
    border-color: currentColor transparent currentColor transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Wordfence 2FA overlay - ensure it covers the original form properly */
#wfls-prompt-overlay {
    z-index: 100 !important;
}

/* Hide original submit button when 2FA overlay is active */
form:has(#wfls-prompt-overlay) .submit:not(:has(#wfls-token-submit)) {
    display: none !important;
}

/* Alternative approach for browsers that don't support :has() */
#wfls-prompt-overlay ~ * {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 767px) {
    body.login {
        padding: 1rem;
    }
    
    #login {
        padding: 2rem 1.5rem;
    }
}
