/**
 * Show/hide password toggle. Works on both the front-end theme and the admin
 * theme (colours fall back to neutral values when theme variables are absent).
 */

.lotus-pw-wrap {
  position: relative;
  display: block;
}

/* Leave room for the button so text never sits under the eye. */
.lotus-pw-wrap > input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 2.75rem;
}

.lotus-pw-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem;
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 0;
  color: var(--gold, #777);
  opacity: 0.8;
}

.lotus-pw-toggle:hover,
.lotus-pw-toggle:focus {
  opacity: 1;
}

.lotus-pw-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Show the "eye" by default; swap to "eye-off" when the password is visible. */
.lotus-pw-toggle .icon-eye-off {
  display: none;
}

.lotus-pw-toggle.is-shown .icon-eye {
  display: none;
}

.lotus-pw-toggle.is-shown .icon-eye-off {
  display: inline;
}
