CSS
.lf-show {
width: 100%;
max-width: 320px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 14px;
padding: 26px 24px;
display: grid;
gap: 12px;
}
.lf-show-title {
margin: 0;
font-size: 17px;
font-weight: 700;
color: #f0eeff;
}
.lf-show-row {
display: grid;
gap: 5px;
font-size: 11px;
color: #b8b6d4;
}
.lf-show-row input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
color: #f0eeff;
outline: none;
transition: border-color 0.15s;
}
.lf-show-row input:focus {
border-color: #7c6cff;
}
.lf-show-pw {
position: relative;
display: block;
}
.lf-show-pw input {
width: 100%;
box-sizing: border-box;
padding-right: 38px;
}
.lf-show-eye {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
width: 28px;
height: 28px;
display: grid;
place-items: center;
background: transparent;
border: 1px solid transparent;
border-radius: 6px;
color: #b8b6d4;
cursor: pointer;
transition:
color 0.15s,
background 0.15s,
border-color 0.15s;
}
.lf-show-eye:hover {
color: #f0eeff;
background: rgba(255, 255, 255, 0.04);
}
.lf-show-eye[aria-pressed="true"] {
color: #7c6cff;
border-color: rgba(124, 108, 255, 0.4);
background: rgba(124, 108, 255, 0.08);
}
.lf-show-meta {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 11px;
color: #b8b6d4;
}
.lf-show-meta input {
accent-color: #7c6cff;
margin-right: 4px;
}
.lf-show-meta a {
color: #a78bfa;
text-decoration: none;
}
.lf-show-submit {
margin-top: 4px;
padding: 11px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: transform 0.12s;
}
.lf-show-submit:hover {
transform: translateY(-1px);
}
/* ─── tiny JS to toggle reveal ─── */
/*
document.querySelectorAll('[data-lf-eye]').forEach(btn => {
btn.addEventListener('click', () => {
const input = btn.previousElementSibling;
const next = input.type === 'password' ? 'text' : 'password';
input.type = next;
btn.setAttribute('aria-pressed', String(next === 'text'));
btn.setAttribute('aria-label', next === 'text' ? 'Hide password' : 'Show password');
});
});
*/ JS
// Show / hide password toggle
document.querySelectorAll('[data-lf-eye]').forEach(function (btn) {
btn.addEventListener('click', function () {
var input = btn.previousElementSibling;
if (!input) return;
var next = input.type === 'password' ? 'text' : 'password';
input.type = next;
var revealed = next === 'text';
btn.setAttribute('aria-pressed', String(revealed));
btn.setAttribute('aria-label', revealed ? 'Hide password' : 'Show password');
});
});