/* Global password visibility toggle — shared across auth, settings, coop, forms */

.modal-password-field,
.ss-password-field {
  position: relative;
  display: block;
  width: 100%;
}

.modal-password-field input[type="password"],
.modal-password-field input[type="text"],
.ss-password-field input[type="password"],
.ss-password-field input[type="text"] {
  width: 100%;
  padding-right: 48px;
}

.modal-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(154, 216, 255, 0.38);
  border-radius: 999px;
  background: rgba(8, 18, 32, 0.88);
  color: #e8f7ff;
  cursor: pointer;
  transform: translateY(-50%);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.modal-password-toggle:hover,
.modal-password-toggle:focus-visible {
  color: #00ff9f;
  border-color: rgba(0, 255, 159, 0.48);
  background: rgba(0, 255, 159, 0.14);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 0 16px rgba(0, 255, 159, 0.24);
  outline: none;
}

.modal-password-toggle:active {
  transform: translateY(-50%) scale(0.96);
}

.modal-password-toggle__icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.modal-password-toggle__icon--off,
.modal-password-toggle.is-visible .modal-password-toggle__icon--eye {
  display: none;
}

.modal-password-toggle.is-visible .modal-password-toggle__icon--off {
  display: block;
}

.settings-field .modal-password-field,
.ss-form-grid .modal-password-field,
.coop-form .modal-password-field {
  margin-top: 4px;
}

.coop-form__row-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coop-form__row-fields .modal-password-field {
  flex: 1 1 180px;
  min-width: 0;
}
