/* --- LAYOUT & BACKGROUND (Desktop Default) --- */
body.login {
    background-color: #0b0b0b !important; /* Brand Black */
    font-family: "Space Grotesk", sans-serif !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end; /* Push content to the right */
    height: 100vh;
    overflow: hidden;
    color: #fff;
    position: relative;
}

/* Left Side Image (Desktop) */
body.login::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-image: url("/wp-content/uploads/rcans-roofer01.webp");
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 1;
    filter: grayscale(100%);
}

/* Left Side Overlay (Darken) */
body.login::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: rgba(11, 11, 11, 0.6);
    z-index: 2;
    pointer-events: none;
}

/* --- LOGIN CONTAINER --- */
#login {
    position: relative;
    z-index: 10;
    width: 50% !important; /* Occupy right half */
    max-width: 100% !important;
    height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #0b0b0b; /* Match body bg */
}

/* Wrapper for content inside the right side */
#login > * {
    width: 100%;
    max-width: 400px; /* Limit form width */
    padding: 0 20px;
}

/* --- LOGO --- */
.login h1 {
    width: 100%;
    text-align: center;
    margin-bottom: 20px !important;
}

.login h1 a {
    background-image: url("/wp-content/uploads/rcans-logo-wh.svg") !important;
    background-size: contain !important;
    background-position: center bottom !important;
    width: 100% !important;
    height: 80px !important;
    margin: 0 auto !important;
    background-repeat: no-repeat;
}

/* --- NOTIFICATIONS & ERRORS --- */
.login .message, 
.login .success, 
.login #login_error {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-left: 4px solid #b57915 !important; /* Brand Accent Border */
    color: #fff !important;
    box-shadow: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 20px !important;
    border-radius: 0 !important;
	padding: 10px !important;
}

/* Error specific border color */
.login #login_error {
    border-left-color: #dc3232 !important;
}

/* Links in Success/Notification Messages */
.login .message a,
.login .success a,
.login #login_error a {
    color: #b57915 !important; /* Brand Accent */
    text-decoration: none !important;
    font-weight: 600 !important;
}

.login .message a:hover,
.login .success a:hover,
.login #login_error a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

/* --- FORM STYLING --- */
.login form {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 20px 0 !important;
    margin-top: 20px !important;
    overflow: visible !important;
}

.login label {
    color: #b57915 !important; /* Brand Accent */
    text-transform: uppercase;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

/* --- INPUT FIELDS --- */
.login form .input, 
.login input[type="text"],
.login input[type="password"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    font-size: 16px !important;
    padding: 15px !important;
    margin-bottom: 20px !important;
    border-radius: 0 !important;
    font-weight: 400 !important;
    box-shadow: none !important;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
    border-color: #b57915 !important;
    box-shadow: 0 0 0 1px #b57915 !important;
    outline: none !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Eye Icon Color */
.wp-core-ui .button.wp-hide-pw {
    color: #b57915 !important;
}
.wp-core-ui .button.wp-hide-pw .dashicons {
    color: #b57915 !important;
}
.wp-core-ui .button.wp-hide-pw:hover,
.wp-core-ui .button.wp-hide-pw:focus {
    color: #fff !important;
    background: transparent !important;
}

/* --- BUTTON --- */
.wp-core-ui .button-primary {
    background-color: #b57915 !important;
    border-color: #b57915 !important;
    color: #fff !important;
    text-transform: uppercase;
    font-weight: 700 !important;
    padding: 15px 24px !important;
    height: auto !important;
    width: 100% !important;
    border-radius: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
    margin-top: 10px !important;
    font-size: 14px !important;
    line-height: normal !important;
}

.wp-core-ui .button-primary:hover {
    background-color: #fff !important;
    border-color: #fff !important;
    color: #0b0b0b !important;
}

/* --- LINKS --- */
.login #nav, .login #backtoblog {
    padding: 0 !important;
    margin: 10px 0 0 !important;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.login #nav a, .login #backtoblog a {
    color: #666 !important;
    transition: color 0.3s ease;
    font-size: 13px !important;
}

.login #nav a:hover, .login #backtoblog a:hover {
    color: #b57915 !important;
}

.forgetmenot {
    margin-bottom: 20px !important;
    color: #888;
}

/* --- MOBILE RESPONSIVENESS --- */
@media screen and (max-width: 900px) {
    body.login {
        justify-content: center !important;
        background-color: #0b0b0b !important;
    }

    body.login::before {
        width: 100% !important;
        height: 100% !important;
        background-image: url("/wp-content/uploads/rcans-roofer01.webp");
        background-size: cover;
        background-position: center;
        opacity: 0.15 !important;
        filter: grayscale(100%) !important;
        z-index: 0;
    }
    
    body.login::after {
        display: none;
    }

    #login {
        width: 100% !important;
        max-width: 400px !important;
        height: auto !important;
        padding: 20px !important;
        background: transparent !important;
        margin: 0 auto !important;
    }
    
    .login form {
        background: rgba(11, 11, 11, 0.95) !important;
        padding: 30px !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    }
}