/* SF SpamShield - Password Strength Indicator */

.sf-pw-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.sf-pw-wrapper input[type="password"] {
  width: 100%;
  box-sizing: border-box;
}

/* JavaScript can attach the indicator to different form layouts. Reserve
 * space below every enhanced field so the hint never overlaps the next one. */
.sf-pw-field-container {
  padding-bottom: 18px;
}

/* Strength bar - positioned by JS inside input field */
.sf-pw-bar-container {
  position: absolute;
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: none;
  pointer-events: none;
  border-radius: 1px;
  z-index: 100;
}

.sf-pw-bar {
  height: 100%;
  width: 0;
  border-radius: 1px;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

/* Strength level colors */
.sf-pw-very-weak {
  background: #dc3545 !important;
}

.sf-pw-weak {
  background: #fd7e14 !important;
}

.sf-pw-fair {
  background: #ffc107 !important;
}

.sf-pw-strong {
  background: #28a745 !important;
}

.sf-pw-very-strong {
  background: #20c997 !important;
}

/* Hint text below field */
.sf-pw-hint {
  font-size: 10px;
  margin-top: 2px;
  padding: 0;
  color: #666;
  display: none;
  line-height: 1;
}

.sf-pw-hint-error {
  color: #dc3545;
  font-weight: 600;
}

/* Shake animation */
@keyframes sf-pw-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-3px);
  }
  40%,
  80% {
    transform: translateX(3px);
  }
}

.sf-pw-hint-shake {
  animation: sf-pw-shake 0.4s ease-in-out;
}

/* WordPress Login page */
.login .sf-pw-wrapper {
  margin-bottom: 16px;
}

/* WordPress Admin */
.wp-admin .sf-pw-wrapper {
  max-width: 25em;
}

@media screen and (max-width: 782px) {
  .wp-admin .sf-pw-wrapper {
    max-width: 100%;
  }

  .sf-pw-hint {
    font-size: 11px;
    line-height: 1.35;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .sf-pw-bar-container {
    background: rgba(255, 255, 255, 0.12);
  }
  .sf-pw-hint {
    color: #aaa;
  }
  .sf-pw-hint-error {
    color: #ff6b6b;
  }
}
