/* Password Generator — leans on ../css/protium-ui.css tokens. */

.page { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 32px 48px; }
.tool-head { max-width: 1100px; margin: 0 auto 18px; }
.tool-head h1 { font-family: var(--font-display); font-size: 27px; letter-spacing: -0.01em; margin-bottom: 5px; }
.tool-head p { color: var(--text-muted); font-size: 15px; max-width: 74ch; }

.pw-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { font-size: 14px; font-weight: 600; white-space: nowrap; }
.pw-tip { font-size: 12px; color: var(--text-faint); text-align: right; line-height: 1.45; }

/* The password ---------------------------------------------------------- */
.pw-out-wrap { position: relative; }
.pw-out {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-mono); font-size: 20px; font-weight: 500;
  letter-spacing: 0.02em;
  padding: 18px 52px 18px 16px;
  transition: border-color var(--t);
  resize: none; overflow: hidden;
  word-break: break-all; line-height: 1.45;
}
.pw-out:hover { border-color: var(--border-strong); }
.pw-out:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.pw-icon {
  position: absolute; right: 8px; top: 12px;
  width: 34px; height: 34px; padding: 0; justify-content: center;
}
.pw-icon svg { width: 16px; height: 16px; }

.pw-err { margin-top: 10px; font-size: 13px; color: var(--bad); }

.pw-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* Strength meter -------------------------------------------------------- */
.pw-meter-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.pw-meter { display: flex; gap: 4px; flex: 1; }
.pw-meter span {
  flex: 1; height: 6px; border-radius: 99px;
  background: var(--surface-2); transition: background var(--t);
}
.pw-meter.lvl-1 span:nth-child(-n+1),
.pw-meter.lvl-2 span:nth-child(-n+2) { background: var(--bad); }
.pw-meter.lvl-3 span:nth-child(-n+3) { background: var(--warn); }
.pw-meter.lvl-4 span:nth-child(-n+4),
.pw-meter.lvl-5 span { background: var(--ok); }

.pw-strength { font-size: 12.5px; font-weight: 600; min-width: 84px; text-align: right; color: var(--text-muted); }
.pw-strength.is-bad { color: var(--bad); }
.pw-strength.is-warn { color: var(--warn); }
.pw-strength.is-ok { color: var(--ok); }

/* Stats + chips --------------------------------------------------------- */
.pw-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 16px;
}
.pw-stats > div {
  background: var(--surface-2); border: 1px solid var(--border-faint);
  border-radius: var(--r-md); padding: 10px 12px;
}
.pw-stats dt { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.pw-stats dd { font-size: 14px; font-weight: 600; margin-top: 3px; line-height: 1.35; }

.pw-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pw-chip {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border-faint);
  color: var(--text-faint);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.pw-chip.is-on { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok); }

.pw-review, .pw-explain { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-top: 12px; }
.pw-review:empty, .pw-explain:empty { display: none; }
.pw-review b { color: var(--text); }

/* Options -------------------------------------------------------------- */
.pw-label { display: block; font-size: 12.5px; color: var(--text-muted); margin-bottom: 7px; }
.pw-len { display: flex; align-items: center; gap: 12px; }
.pw-len input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--border-faint);
}
.pw-len input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); cursor: pointer;
  box-shadow: var(--shadow);
}
.pw-len input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); cursor: pointer;
}
.pw-len .pt-input { width: 78px; padding: 8px 10px; font-size: 13.5px; text-align: center; }

.pw-checks { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.pw-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-md); cursor: pointer;
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  transition: background var(--t);
}
.pw-check:hover { background: var(--surface-2); }
.pw-check input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex: none; }
.pw-check code {
  font-family: var(--font-mono); font-size: 11.5px;
  background: var(--surface-2); padding: 1px 5px; border-radius: 5px;
  word-break: break-all;
}
.pw-note { font-size: 12.5px; color: var(--text-faint); line-height: 1.55; margin-top: 14px; }

/* Explainer ------------------------------------------------------------ */
.pw-info { max-width: 1100px; margin: 24px auto 0; }
.pw-info h2 { font-family: var(--font-display); font-size: 17px; margin-bottom: 12px; }
.pw-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.pw-card {
  background: var(--surface); border: 1px solid var(--border-faint);
  border-radius: var(--r-md); padding: 14px 16px;
}
.pw-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.pw-card p { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.pw-card code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

@media (max-width: 900px) {
  .page { padding: 18px 16px 40px; }
  .pw-grid { grid-template-columns: 1fr; }
  .pw-out { font-size: 16px; }
  .pw-stats { grid-template-columns: 1fr; }
  .pw-tip { display: none; }
}

/* Phone: a bigger checkbox, easier to tap (was 15px). */
@media (max-width: 600px) { .pw-check input { width: 22px; height: 22px; } }
