/* §6 password-requirements checklist + mask toggles. A plain, directly-served stylesheet (not
   part of the Content/sass build) so the checklist never needs an inline style="" attribute,
   keeping the existing Content-Security-Policy inline-free (no unsafe-inline). */

.fp-hidden {
    display: none;
}

.fp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The "?" info trigger sits inline after the "New Password" label. Strip the default button
   chrome so it reads as a plain question-mark glyph in the label's own (black) text color,
   vertically centered with the text — not a boxed button. */
.fp-info-trigger {
    padding: 0;
    margin-left: 0.25rem;
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
}

.fp-info-trigger:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Constrain the heading so it does not inherit the theme's oversized default h3. */
.fp-password-requirements-heading {
    margin: 0.5rem 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.fp-password-requirements {
    margin: 0.5rem 0 1rem;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.fp-password-rule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.125rem 0;
}

.fp-password-rule-icon {
    display: inline-block;
    width: 1rem;
    text-align: center;
}

/* Icon + color together, never color alone: each state also carries its own glyph. */
.fp-password-rule[data-state="pending"] .fp-password-rule-icon::before {
    content: "\2022"; /* bullet */
    color: #6c757d;
}

.fp-password-rule[data-state="pass"] .fp-password-rule-icon::before {
    content: "\2713"; /* check mark, ~4.6:1 on white */
    color: #1a7f37;
}

.fp-password-rule[data-state="fail"] .fp-password-rule-icon::before {
    content: "\2717"; /* cross mark, ~5.9:1 on white */
    color: #b42318;
}

.fp-password-rule[data-state="server-checked"] .fp-password-rule-icon::before {
    content: "\21BB"; /* clockwise arrow */
    color: #6c757d;
}

.fp-mask-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    padding: 0.25rem 0.5rem;
    margin-left: 0.25rem;
    background: transparent;
    border: 1px solid #6c757d;
    border-radius: 0.2rem;
    color: #212529;
    font-size: 0.8rem;
    cursor: pointer;
}

.fp-mask-toggle:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.fp-mask-toggle-revealed {
    background: #e9ecef;
}

.fp-password-field-row {
    display: flex;
    align-items: center;
}

.fp-password-field-row .form-control {
    flex: 1 1 auto;
}

/* DA-2: visible page-level submit error (role="alert" in markup). Dark text on a light red
   background clears the 4.5:1 contrast floor with margin — #611a15 on #fdecea is well over 7:1. */
.fp-error-summary {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #b42318;
    border-radius: 0.2rem;
    background: #fdecea;
    color: #611a15;
    font-size: 0.9rem;
}
