/**
 * Signup password + confirm fields — parity with Windows app
 * Scoped under .login-card / .signup-password-field
 */

/* Wrapper: input + eye toggle */
.signup-password-field {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  background: #23272f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.signup-password-field input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.signup-password-field input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Password: before typing, focus keeps same border as email/name (no blue ring) */
.signup-password-field input:focus {
  outline: none;
}

.signup-password-field input:focus:not(.password--has-typed) {
  box-shadow: none;
}

.signup-password-field input.password--has-typed:focus {
  box-shadow: none;
}

/* Strength + rules block */
.password-strength-block {
  display: none;
  margin-top: 10px;
  margin-bottom: 4px;
}

.password-strength-block.is-visible {
  display: block;
}

.password-strength-meter {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.password-strength-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #2d3748;
  transition: background 0.2s;
}

/* Meter fill colors — applied with modifier on meter container */
.password-strength-meter.meter--neutral .password-strength-seg {
  background: #2d3748;
}

.password-strength-meter.meter--red .password-strength-seg.filled {
  background: #f87171;
}

.password-strength-meter.meter--orange .password-strength-seg.filled {
  background: #fb923c;
}

.password-strength-meter.meter--green .password-strength-seg.filled {
  background: #4ade80;
}

.password-rules {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-rules li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #94a3b8;
}

.password-rules li:last-child {
  margin-bottom: 0;
}

.password-rules li.is-met {
  color: #4ade80;
}

.password-rule-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hollow circle (not met) */
.password-rule-icon--pending {
  width: 14px;
  height: 14px;
  border: 2px solid #6b7280;
  border-radius: 50%;
  box-sizing: border-box;
}

/* Check (met) */
.password-rule-icon--ok {
  width: 18px;
  height: 18px;
  color: #4ade80;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border: none;
}

/* Border strength — only meaningful when .password--has-typed */
.signup-password-field input.password--has-typed.password--border-red {
  border-color: transparent;
}

.signup-password-field input.password--has-typed.password--border-orange {
  border-color: transparent;
}

.signup-password-field input.password--has-typed.password--border-green {
  border-color: transparent;
}

.signup-password-field.password--border-red {
  border-color: #f87171;
}

.signup-password-field.password--border-orange {
  border-color: #fb923c;
}

.signup-password-field.password--border-green {
  border-color: #4ade80;
}

.password-lock-icon {
  position: absolute;
  left: 12px;
  color: rgba(255, 255, 255, 0.5);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.password-lock-icon svg {
  width: 18px;
  height: 18px;
}

/* Eye toggle */
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 2px;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}
