/*
 * Reusable password visibility control.
 * Add data-password-toggle to an input[type="password"] to initialize it.
 */
.password-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    vertical-align: middle;
}

.password-field-full {
    width: 100%;
}

.password-field > input[data-password-toggle] {
    width: 100%;
    min-width: 0;
    padding-right: 54px !important;
    box-sizing: border-box;
    flex: 1 1 auto;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 1px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: calc(100% - 2px);
    padding: 0;
    border: 0;
    background: transparent;
    color: #555;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: #f4f6f8;
    color: #222;
}

.password-toggle:focus {
    outline: 2px solid #0056cc;
    outline-offset: -3px;
}

.password-toggle-icon {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
    pointer-events: none;
}
