/* =========================================================
   Password Generator — tool-specific styles.
   Layered on top of /tools/_shared/tool.css.
   Only the widget's unique pieces live here.
   ========================================================= */

/* ---------- Output password display ---------- */
.password-display { margin-bottom: var(--space-6); }

.password-box {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  transition: var(--transition-colors);
}

.password-text {
  display: block;
  min-height: 48px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  word-break: break-all;
  user-select: all;
}
@media (min-width: 640px) {
  .password-text { font-size: 20px; }
}

.display-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
/* Generate is the primary action, so it gets the widest column; Copy and
   Clear flank it at equal, smaller widths. */
@media (min-width: 640px) {
  .display-actions { grid-template-columns: 1fr 1.6fr 1fr; }
}

/* Generate is the solid (.btn-primary) action; Copy and Clear are outline
   styles so Generate stands out. Copy is .btn-outline, so re-create the
   green "Copied" confirmation that .btn-primary.is-success used to give it. */
#btn-copy.is-success {
  background: var(--success);
  color: var(--success-fg);
  border-color: var(--success);
}

/* ---------- Strength meter ---------- */
.strength {
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.strength-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.strength-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.strength-value {
  font-size: 14px;
  font-weight: 600;
}
.strength-value.weak   { color: var(--danger); }
.strength-value.medium { color: var(--warning); }
.strength-value.strong { color: var(--success); }

.strength-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.3s ease, background 0.3s ease;
  width: 0;
}
.strength-fill.weak   { width: 33.3333%; background: var(--danger);  }
.strength-fill.medium { width: 66.6667%; background: var(--warning); }
.strength-fill.strong { width: 100%;     background: var(--success); }

/* ---------- Options block ---------- */
.options { margin-bottom: var(--space-6); }

.length-control {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: var(--transition-colors);
}
.length-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.length-header label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
/* The shared range track is var(--surface-2), the same color as this
   panel's background — which makes the track vanish. Give it a contrasting
   track (works in both light and dark). The thumb keeps the accent color. */
.length-control input[type="range"] {
  background: var(--border);
}
.length-bounds {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--text-subtle);
}
