/*!
 * password-complexity.css — Feb 2026
 * Styles for the password complexity live feedback + info button.
 * Kept intentionally small (~1.6 KB) — mirrors Bootstrap 5 form conventions
 * so the widget blends into both the light landing card and the darker
 * account pages (Reset).
 */

/* Container wraps the <input> so we can absolutely-position the (i) button. */
.pwd-complex-wrap {
    display: block;
    /* Inputs already sized via Bootstrap .form-control */
}

/* Info (i) button — pinned to the top-right corner of the input.
   Right offset accounts for the input's default padding. */
.pwd-complex-info-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #6c757d;               /* Bootstrap muted */
    cursor: pointer;
    border-radius: 50%;
    transition: color .15s ease, background-color .15s ease;
    z-index: 3;                   /* above the input's inner shadows */
}
.pwd-complex-info-btn:hover,
.pwd-complex-info-btn:focus {
    color: #0d6efd;               /* Bootstrap primary */
    background: rgba(13, 110, 253, 0.08);
    outline: none;
}
.pwd-complex-info-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* Reserve room inside the <input> for the button so the caret does not
   overlap the icon. */
.pwd-complex-wrap > input[type="password"] {
    padding-right: 36px !important;
}

/* Popover list styling — remove default disc bullets to keep it tight. */
.pwd-complex-popover-list {
    list-style-type: disc;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Live feedback panel appears directly under the input. */
.pwd-complex-panel {
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #dee2e6;    /* Bootstrap border color */
    border-radius: 6px;
    background: #f8f9fa;          /* Bootstrap light */
    font-size: 0.85rem;
    animation: pwd-complex-fade-in 120ms ease-out;
}
@keyframes pwd-complex-fade-in {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pwd-complex-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.pwd-complex-rules {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pwd-complex-rule {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 2px 0;
    color: #6c757d;               /* neutral until user types */
    transition: color .15s ease;
}

.pwd-complex-rule .pwd-complex-icon {
    display: inline-block;
    width: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

/* State: rule satisfied — green check */
.pwd-complex-rule.ok {
    color: #198754;               /* Bootstrap success */
}
.pwd-complex-rule.ok .pwd-complex-icon {
    color: #198754;
}

/* State: rule not yet met — red X (only after user starts typing) */
.pwd-complex-rule.fail {
    color: #dc3545;               /* Bootstrap danger */
}
.pwd-complex-rule.fail .pwd-complex-icon {
    color: #dc3545;
}

/* All-good state — subtle background tint hint (optional, minimal). */
.pwd-complex-panel.all-ok {
    border-color: #a3cfbb;
    background: #d1e7dd;
}
.pwd-complex-panel.all-ok .pwd-complex-title {
    color: #0f5132;
}

/* Multi-line preservation for server-side and client-side validation
   summary — jQuery Validation writes into .field-validation-error, and
   the ValidationSummary + ValidationMessage helpers emit .text-danger.
   `display:block` guarantees the multi-line rule list stacks under the
   input rather than staying on the same line as the label on browsers
   with tight default line-height. */
.field-validation-error,
.text-danger {
    white-space: pre-line;
    display: block;
}
