/* ========== Base Matrix Settings ========== */
body, input, textarea, canvas, #matrixCanvas {
    font-family: 'Courier New', Courier, monospace;
    background-color: black;
    color: #00ff00;
}

body {
    overflow: hidden;
    position: relative;
}

#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#devcognito-wrapper {
    position: relative;
    z-index: 10;
}

#devcognito-logo {
    text-align: center;
    font-size: 2.5rem;
    color: #00ff00;
    margin-top: 50px;
}

/* ========== Login Box ========== */
.login form {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    box-shadow: 0 0 30px #00ff00;
    padding: 26px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.login label {
    color: #00ff00;
    font-weight: bold;
}

/* ========== Input Fields ========== */
input[type="text"],
input[type="password"] {
    background-color: black !important;
    color: #00ff00;
    border: 2px solid #00ff00 !important;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    padding: 7px 7px !important;
    height: 48px;
    box-sizing: border-box;
    vertical-align: middle;
    line-height: 1;
}

input[type="text"]:focus,
input[type="password"]:focus {
    background-color: black;
    border-color: #00ff00;
    box-shadow: 0 0 10px #00ff00;
    outline: none;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #00ff00;
    opacity: 0.7;
}

/* ========== Password Wrapper and [show] Button ========== */
.user-pass-wrap,
.user-pass1-wrap,
.password-input-wrapper {
    position: relative;
    width: 100%;
}

/* ========== Password Field with Enough Padding ========== */
.user-pass-wrap input[type="password"],
.user-pass1-wrap input[type="password"],
.password-input-wrapper input[type="password"],
.user-pass-wrap input[type="text"],
.user-pass1-wrap input[type="text"],
.password-input-wrapper input[type="text"] {
    background-color: black !important;
    color: #00ff00;
    border: 2px solid #00ff00;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    padding: 10px 80px 10px 9px !important; /* Right padding for [ show ] or [ hide ] button */
    width: 1000;
    box-sizing: border-box;
    font-size: 24px;
    position: relative;
    z-index: 2;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    line-height: 1.2;
    height: 48px;
    padding: 12px 16px;
    color: #00ff00;
    background: black;
    border: 2px solid #00ff00;
    border-radius: 6px;
    box-sizing: border-box;
}




/* [show]/[hide] button inside password field */
.show-hide-toggle,
.wp-hide-pw {
    position: absolute;
    right: 12px;
    top: 37%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #00ff00;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 5;
    padding: 2px 4px;
    line-height: 1;
}

.show-hide-toggle:hover,
.wp-hide-pw:hover {
    text-shadow: 0 0 8px #00ff00;
}

/* ========== Login Button ========== */
.wp-core-ui .button-primary {
    background: black;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    padding: 0 20px !important;         /* remove vertical padding */
    height: 48px;
    line-height: 48px;       /* match height exactly */
    box-sizing: border-box;
    vertical-align: middle;
    text-transform: uppercase;
    text-align: center;
}

/* ========== Lost Password and Go to Devcognito Links ========== */
#nav, #backtoblog {
    text-align: center;
    margin-top: 20px;
    opacity: 1;
}

/* Hide duplicate Go to Devcognito link */
#backtoblog {
    display: none;
}

#nav a, #backtoblog a {
    color: #00ff00;
    text-decoration: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

#nav a::after, #backtoblog a::after {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    top: 2px;
    color: #00ff00;
    opacity: 0.3;
    z-index: -1;
    text-shadow: 
        2px 2px 0 #00ff00,
        -2px -2px 0 #00ff00;
    animation: glitch-flicker 3s infinite alternate;
}

#nav a:hover::after, #backtoblog a:hover::after {
    opacity: 0.9;
    text-shadow:
        2px 2px 5px #00ff00,
        -2px -2px 5px #00ff00;
}

/* ========== Hide Language Switcher ========== */
#language-switcher {
    display: none !important;
}

/* ========== Matrixify Error Messages ========== */

#login_error {
    background-color: black;
    border-left: 4px solid #00ff00;
    color: #00ff00;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    box-shadow: 0 0 15px #00ff00;
    animation: glitch-flicker 2.5s infinite alternate;
}

#login_error a {
    color: #00ff00;
    text-decoration: underline;
}

.login .message,
.login .error,
.login .success {
    background: black;
    border-left: 4px solid #00ff00;
    color: #00ff00;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    box-shadow: 0 0 15px #00ff00;
    animation: glitch-flicker 2.5s infinite alternate;
}

.login .message a,
.login .error a,
.login .success a {
    color: #00ff00;
    text-decoration: underline;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: black;
    border: 2px solid #00ff00;
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 8px;
    vertical-align: middle;
    outline: none; /* <-- Prevents white outline */
    box-shadow: none; /* <-- Prevents browser adding default glow */
}

/* Hide the default checkbox */
input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

input[type="checkbox"] + label {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    line-height: 1.2;
    vertical-align: middle;
}

/* Create custom checkbox */
input[type="checkbox"] + label::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: black;
    border: 2px solid #00ff00;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    position: relative;
}

/* Checkbox hover effect */
input[type="checkbox"]:hover + label::before {
    box-shadow: 0 0 5px #00ff00;
}

/* Show checkmark when checked */
input[type="checkbox"]:checked + label::before {
    background-color: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

/* Draw checkmark */
input[type="checkbox"]:checked + label::after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 0px;
    color: black;
    font-size: 14px;
    font-weight: bold;
}

.wp-login-lost-password {
    text-align: center;
    margin-top: 20px;
    font-family: 'Courier New', Courier, monospace;
}

.wp-login-lost-password a {
    color: #00ff00 !important;
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    display: inline-block;
    transition: all 0.3s ease;
}

/* Glitch/flicker hover effect */
.wp-login-lost-password a::after {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    top: 2px;
    color: #00ff00;
    opacity: 0.3;
    z-index: -1;
    text-shadow: 
        2px 2px 0 #00ff00,
        -2px -2px 0 #00ff00;
    animation: glitch-flicker 3s infinite alternate;
}

.wp-login-lost-password a:hover {
    color: #c5c5c5 !important;
    text-shadow: none;
}

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

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

/* Group the checkbox and button inline */

/* Wrap checkbox and button in a row */
.login .rememberme-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

/* Ensure checkbox stays inline */
.login .forgetmenot {
    margin: 0;
    display: flex;
    align-items: center;
}

/* Shrink the login button */
.login .submit input.button-primary {
    width: auto;
    padding: 6px 20px;
    white-space: nowrap;
}
