/* Shared password field with persistent show/hide toggle — desktop + mobile auth */
.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input[type="password"],
.password-field input[type="text"] {
  width: 100%;
  padding-right: 2.75rem !important;
}

.password-field__toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-light, #64748b);
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.password-field__toggle:hover {
  color: var(--primary, #7209b7);
  background: rgba(114, 9, 183, 0.06);
}

.password-field__toggle:focus-visible {
  outline: 2px solid var(--primary, #7209b7);
  outline-offset: 1px;
}

.password-field__toggle i {
  font-size: 0.95rem;
  pointer-events: none;
}

/* Hide native browser reveal/clear controls so our toggle is the only one */
.password-field input[type="password"]::-ms-reveal,
.password-field input[type="password"]::-ms-clear {
  display: none;
}

.m-auth .password-field__toggle {
  color: var(--m-text-muted, #64748b);
}

.m-auth .password-field__toggle:hover {
  color: var(--m-primary, #7209b7);
  background: rgba(114, 9, 183, 0.08);
}

@media (max-width: 480px) {
  .password-field__toggle {
    width: 2.5rem;
    height: 2.5rem;
    right: 0.25rem;
  }

  .password-field input[type="password"],
  .password-field input[type="text"] {
    padding-right: 3rem !important;
  }
}
