/* ── Password Field Utilities ──────────────────── */

.login-form__pw-wrap {
  position: relative;
}

/* Show/hide toggle */
.pw-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--ink-faint);
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
}

.pw-toggle:hover {
  color: var(--ink-dim);
}

.pw-toggle__icon {
  width: 18px;
  height: 18px;
}

.pw-toggle__icon--hide {
  display: none;
}

.pw-req__icon--yes {
  display: none;
}

/* Make room for the toggle icon in the input */
.login-form__input[type="password"],
.login-form__input[type="text"] {
  padding-right: 2.5rem;
}

/* ── Requirements Checklist ───────────────────── */
.pw-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.pw-req {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: opacity 0.2s ease;
}

.pw-req__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--ink-faint);
  transition: color 0.2s ease;
}

.pw-req__icon--yes {
  color: var(--teal);
}

.pw-req__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--ink-faint);
  transition: color 0.2s ease;
}

.pw-req--pass .pw-req__label {
  color: var(--teal);
}

.pw-req--pass .pw-req__icon--no {
  display: none;
}

/* ── Strength Meter ──────────────────────────── */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  margin-bottom: 0.5rem;
}

.pw-strength__bar {
  flex: 1;
  height: 3px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}

.pw-strength__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.pw-strength--weak .pw-strength__fill,
.pw-strength--weak { color: #FF6B6B; }
.pw-strength--weak .pw-strength__fill { background: #FF6B6B; }

.pw-strength--fair .pw-strength__fill,
.pw-strength--fair { color: #E8AE2A; }
.pw-strength--fair .pw-strength__fill { background: #E8AE2A; }

.pw-strength--good .pw-strength__fill,
.pw-strength--good { color: var(--teal); }
.pw-strength--good .pw-strength__fill { background: var(--teal); }

.pw-strength--strong .pw-strength__fill,
.pw-strength--strong { color: #34D399; }
.pw-strength--strong .pw-strength__fill { background: #34D399; }

.pw-strength__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-width: 3rem;
  transition: color 0.3s ease;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 600px) {
  .pw-reqs {
    gap: 0.3rem 0.75rem;
  }

  .pw-req__label {
    font-size: 0.6rem;
  }
}

@media (max-width: 380px) {
  .pw-reqs {
    flex-direction: column;
    gap: 0.25rem;
  }
}
