/* password-toggle.css — the show/hide eye inside a password box (GCO-566).
   Paired with assets/js/password-toggle.js, which wraps each enabled password
   input in .pw-field and adds the button. Its own small file with its own
   version tag on each page, because components.css is not version-tagged and a
   day-old cached copy must never leave a bare, unstyled button under a box.
   Uses the site's tokens (base.css); no motion beyond the input's own. */

.pw-field {
  position: relative;
  display: block;
}

/* Room for the eye so a long password never runs under it. */
.pw-field .pw-field__input {
  padding-right: 52px;
}

/* Edge draws its own reveal eye in a password box: one eye only. A rule of its
   own, never in a selector list (other browsers drop an unknown
   pseudo-element, and with it the whole list). */
.pw-field .pw-field__input::-ms-reveal {
  display: none;
}

.pw-field__toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pw-field__toggle svg {
  width: 22px;
  height: 22px;
}

.pw-field__toggle:hover {
  color: var(--color-primary-dark);
}

/* A solid ring in the dark brand blue (4.73:1 on white), like the page's own
   links. A soft tint alone measured 1.24:1 and was nearly invisible. */
.pw-field__toggle:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: -2px;
  color: var(--color-primary-dark);
}

/* Spoken only: "Your password is showing." / "...is hidden." */
.pw-field__said {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (forced-colors: active) {
  .pw-field__toggle { color: ButtonText; }
  .pw-field__toggle:focus-visible { outline: 2px solid Highlight; }
}
