/* MitaBase Pro — a product of ETMITA · https://etmita.com
   Copyright © ETMITA. All rights reserved. */
/*
 * pw-eye.css — the eye on every password field (MT.passwordEye,
 * src/shared/password-eye.ts; operator rule 2026-11-09). One sheet for
 * the three surfaces that ask for a password: the panel, the login page
 * and the hiring form. No colour of its own — the eye takes the field's
 * text colour, quieter until it is hovered or focused, so it sits in
 * every theme the field sits in. Logical insets: in a right-to-left
 * page the eye moves to the left without a branch.
 * Suite: scripts/test-password-eye.js
 */
.mt-pw-wrap { position: relative; display: block; }
.mt-pw-wrap > input { padding-inline-end: 2.75rem; }

.mt-pw-eye {
  position: absolute;
  inset-inline-end: 0.25rem;
  inset-block-start: 50%;
  transform: translateY(-50%);
  inline-size: 2.25rem;
  block-size: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity var(--mb-dur-fast, 150ms);
}
.mt-pw-eye:hover,
.mt-pw-eye:focus-visible { opacity: 1; }
.mt-pw-eye:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.mt-pw-eye svg {
  inline-size: 1.125rem;
  block-size: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.mt-pw-eye .mt-pw-eye-off { display: none; }
.mt-pw-eye[aria-pressed="true"] .mt-pw-eye-on { display: none; }
.mt-pw-eye[aria-pressed="true"] .mt-pw-eye-off { display: block; }

/* The step-up prompt reuses one field for text and for passwords: the eye
   shows only while the field is a password or one being shown, and never
   beside a hidden field. An author `display` beats the UA's [hidden]. */
.mt-pw-eye[hidden],
.mt-pw-wrap > input.hidden + .mt-pw-eye,
.mt-pw-wrap > input:not([type="password"]) + .mt-pw-eye:not([aria-pressed="true"]) { display: none; }

@media (prefers-reduced-motion: reduce) {
  .mt-pw-eye { transition: none; }
}
