/* ==========================================================================
   CAPK password_toggle.css
   The show/hide button /js/password_toggle.js adds to password fields.
   Used on the sign-in pages and both portals, so colours fall back through
   each area's tokens.
   ========================================================================== */

/*
 * Takes the place the field had: full width of its container, also inside
 * flex or grid parents that would otherwise shrink it to fit.
 */
.password-field {
    display: block;
    position: relative;
    width: 100%;
}

/* Room for the button, so typed text never runs underneath it. */
.password-field input {
    padding-right: 3rem;
}

.password-toggle {
    display: flex;
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--admin-muted, var(--muted, #5b6470));
    cursor: pointer;
}

.password-toggle:hover {
    background: rgba(127, 127, 127, 0.16);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--capk-blue, #0b6682);
    outline-offset: -2px;
}
