/* ═══════════════════════════════════════════════════════
   password-meter.css — Reusable inline password strength
   ═══════════════════════════════════════════════════════ */

/* ── Input wrapper (input + buttons) ───────────────── */
.pw-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.pw-input-wrapper input.pw-input {
  flex: 1;
  min-width: 0;
  width: auto;
}

/* ── Visibility toggle ──────────────────────────────── */
.pw-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--green-300);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.3rem;
  line-height: 1;
  transition: color .2s;
}

.pw-toggle:hover {
  color: var(--green-100);
}

/* ── Generate button ────────────────────────────────── */
.pw-generate {
  flex-shrink: 0;
  background: var(--green-200);
  color: #1a1a1a;
  font-family: 'Exo', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s ease;
  line-height: 1.3;
}

.pw-generate:hover {
  background: var(--green-300);
}

/* ── Meter container ────────────────────────────────── */
.pw-meter {
  margin-top: 0.55rem;
}

/* ── Indicators row ─────────────────────────────────── */
.pw-indicators {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.pw-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #444;
  color: #ff5757;
  font-size: 0.85rem;
  transition: background .3s, color .3s, transform .2s;
  position: relative;
  cursor: default;
}

.pw-icon.active {
  background: var(--green-300);
  color: #2b2b2b;
  transform: scale(1.1);
}

/* ── Tooltip ────────────────────────────────────────── */
.pw-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 115%;
  left: 50%;
  transform: translateX(-50%);
  background: #666;
  color: #fff;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.65rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 10;
}

.pw-icon::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: #666;
  opacity: 0;
  transition: opacity .2s;
  z-index: 10;
}

.pw-icon:hover::after,
.pw-icon:hover::before {
  opacity: 1;
}

/* ── Strength bar ───────────────────────────────────── */
.pw-strength {
  margin-top: 0.4rem;
}

.pw-bar-bg {
  width: 100%;
  height: 0.5rem;
  background: #444;
  border-radius: 6px;
  overflow: hidden;
}

.pw-bar-fill {
  height: 100%;
  width: 0%;
  background: #ff5757;
  transition: width .35s ease, background .35s ease;
}

/* ── Strength text ──────────────────────────────────── */
.pw-strength-text {
  font-size: 0.8rem;
  margin: 0.25rem 0 0;
  transition: color .3s;
}

.pw-strength-text.muy-débil,
.pw-strength-text.débil { color: #ff5757; }
.pw-strength-text.moderada { color: #f6e500; }
.pw-strength-text.fuerte { color: var(--green-200); }
.pw-strength-text.muy-fuerte { color: var(--green-300); }

/* ── Crack time ─────────────────────────────────────── */
.pw-crack-time {
  font-size: 0.75rem;
  color: #5b9bd5;
  margin: 0.25rem 0 0;
}

/* ── Suggestions ────────────────────────────────────── */
.pw-suggestions {
  font-size: 0.75rem;
  margin: 0.15rem 0 0;
  color: #ff6666;
}

.pw-suggestions ul {
  margin: 0.15rem 0 0;
  padding-left: 1.1rem;
}

.pw-suggestions a {
  color: #f6e500;
}
