/* ============================================================
   Password Toggle — Componente Centralizado — RapDez Control
   Todos os campos sensíveis usam .pw-wrap + .pw-btn
   ============================================================ */

.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-wrap input[type="password"],
.pw-wrap input[type="text"] {
  padding-right: 2.8rem !important;
  box-sizing: border-box !important;
  width: 100%;
}

.pw-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: opacity 0.15s ease, transform 0.15s ease;
  opacity: 0.5;
  flex-shrink: 0;
  color: transparent;
  font-size: 0;
  outline: none;
}

.pw-btn:hover {
  opacity: 0.8;
  transform: translateY(-50%) scale(1.12);
}

.pw-btn:focus-visible {
  outline: 2px solid var(--cor-principal, #e94560);
  outline-offset: 2px;
  opacity: 1;
}

.pw-btn:active {
  transform: translateY(-50%) scale(0.93);
}

.pw-icon {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

/* Tema escuro — inverte os ícones para ficarem visíveis */
[data-theme="dark"] .pw-icon,
.dark .pw-icon {
  filter: invert(1) brightness(0.82);
}

/* Responsivo — área de toque confortável em mobile */
@media (max-width: 768px) {
  .pw-btn {
    padding: 0.4rem 0.45rem;
    right: 0.3rem;
  }
  .pw-icon {
    width: 22px;
    height: 22px;
  }
}
