/* Password requirement checkmarks.
 *
 * One stylesheet, loaded by templates/partials/_password_policy.html, so the
 * portal, the account settings page, the storefront checkout and the admin
 * dashboard all show the same list in the same way. Splitting it across
 * portal_redesign.css, dashboard.css and the storefront's inline <style> would
 * have been a fourth, fifth and sixth definition of one rule, which is the
 * defect shape this whole change exists to remove.
 *
 * The markup is built by static/js/password_policy.js from the policy the
 * server printed into the page. Display only.
 *
 * Colours are inherited or taken from custom properties with literal
 * fallbacks, because the four host pages do not share a token set.
 */

.pw-rules {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.pw-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-tertiary, var(--pr-text-3, #7a8ba0));
  transition: color 140ms ease;
}

.pw-rule-mark {
  flex: 0 0 auto;
  width: 14px;
  text-align: center;
  font-size: 12px;
  transition: color 140ms ease;
}

/* A met rule is marked three ways at once: the glyph changes from a ring to a
   tick, the colour lifts, and the aria-label says "met". Colour alone is not a
   signal everyone can read. */
.pw-rule.met {
  color: var(--text-secondary, var(--pr-text-2, #a8b6c8));
}

.pw-rule.met .pw-rule-mark {
  color: #22c55e;
}

@media (prefers-reduced-motion: reduce) {
  .pw-rule,
  .pw-rule-mark {
    transition: none;
  }
}
