/* Shared wrapper for plain password fields that don't already have .input-wrapper */
.pw-wrap {
  position: relative;
  display: block;
}

/* Ensure existing .input-wrapper can anchor the toggle when we add it */
.input-wrapper.has-pw-toggle {
  position: relative;
}

/* Reserve space on the right so the toggle doesn't overlap typed text.
   Targets both 'password' and 'text' because the input type flips at runtime. */
.pw-wrap > input,
.input-wrapper.has-pw-toggle > input {
  padding-right: 42px;
}

.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #8a8a8a;
  cursor: pointer;
  line-height: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.pw-toggle:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.04);
}

.pw-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.pw-toggle svg {
  display: block;
}
