/* ==========================================================================================
   Password helpers shared by the backend forms (Profilo / Cambia password) and the public pages (password recovery):
   strength meter, live list of rules, show/hide button, and the "sending" state of a submit button.
   Part of the Backend bundle; linked by Views/Shared/_LayoutAuth.cshtml.
   ========================================================================================== */
.account-strength {
    margin-top: 6px;
}
.account-strength-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.account-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #c0392b;
    transition: width 0.2s ease, background-color 0.2s ease;
}
.account-strength[data-level='2'] .account-strength-bar span { background: #e67e22; }
.account-strength[data-level='3'] .account-strength-bar span { background: #d4ac0d; }
.account-strength[data-level='4'] .account-strength-bar span,
.account-strength[data-level='5'] .account-strength-bar span { background: #27ae60; }
.account-strength small {
    display: block;
    margin-top: 4px;
    opacity: 0.75;
}
.account-rules {
    list-style: none;
    margin: 0;
    padding: 6px 0 0;
}
.account-rules li {
    padding-left: 22px;
    position: relative;
    opacity: 0.75;
}
.account-rules li::before {
    content: '○';
    position: absolute;
    left: 2px;
}
.account-rules li.ok { opacity: 1; color: #1e8449; }
.account-rules li.ok::before { content: '✓'; }
.account-rules li.ko { opacity: 1; color: #c0392b; }
.account-rules li.ko::before { content: '✗'; }

/* show / hide button next to a password field (the eye is two drawings: the CSS shows the right one) */
.pw-reveal .eye-off { display: none; }
.pw-reveal.is-visible .eye { display: none; }
.pw-reveal.is-visible .eye-off { display: inline; }
.pw-reveal svg { width: 18px; height: 18px; vertical-align: -3px; }

/* a form being sent: spinner in the button, no second click */
.btn.is-loading { pointer-events: none; opacity: 0.9; }
.btn.is-loading::before {
    content: '';
    display: inline-block;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    margin: -3px 9px 0 0;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: middle;
    animation: pw-spin 0.8s linear infinite;
}
@keyframes pw-spin { to { transform: rotate(360deg); } }
