/**
 * Show/hide password toggle — Insider login + Chai settings (scoped).
 * No effect on authentication; UX only.
 */

.chai-pw-toggle-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
}

.chai-pw-toggle-wrap:last-child {
    margin-bottom: 0;
}

.chai-pw-toggle-wrap > input[type="password"],
.chai-pw-toggle-wrap > input[type="text"].chai-pw-toggle-input {
    width: 100%;
    box-sizing: border-box;
    padding-inline-end: 48px;
    margin-bottom: 0 !important;
}

.chai-pw-toggle-btn {
    position: absolute;
    top: 50%;
    inset-inline-end: 10px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: color 0.15s ease, background 0.15s ease;
}

.chai-pw-toggle-btn:hover {
    color: #1d394f;
    background: rgba(29, 57, 79, 0.06);
}

.chai-pw-toggle-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.chai-pw-toggle-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Icons: default = masked (show “reveal” cue — eye with slash); revealed = open eye */
.chai-pw-toggle-wrap .chai-pw-toggle-icon--open {
    display: none;
}

.chai-pw-toggle-wrap.chai-pw-toggle-wrap--revealed .chai-pw-toggle-icon--slash {
    display: none;
}

.chai-pw-toggle-wrap.chai-pw-toggle-wrap--revealed .chai-pw-toggle-icon--open {
    display: block;
}

/* Settings lock box: tighter vertical center */
#chai-settings-login-unlock-box .chai-pw-toggle-wrap > input {
    margin-bottom: 15px;
}
