/* Shared password rules: desktop anchored dialog and small-screen bottom sheet. */
.ftx-password-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin: -2px 0 16px;
    text-align: left;
}
.ftx-password-help__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    border: 0;
    background: none;
    color: #53657e;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}
.ftx-password-help__trigger:hover,
.ftx-password-help__trigger:focus-visible {
    color: var(--ftx-primary, #6941c6);
    text-decoration: underline;
}
.ftx-password-help__info {
    width: 16px;
    height: 16px;
    display: inline-flex;
    flex: 0 0 16px;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #eaf0ff;
    color: #476aa9;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.ftx-password-help__progress {
    color: #637083;
    font-size: 12px;
}
.ftx-password-help__dialog[hidden],
.ftx-password-help__backdrop[hidden] { display: none !important; }
.ftx-password-help__dialog {
    position: fixed;
    z-index: 1102;
    width: min(330px, calc(100vw - 32px));
    max-height: min(76vh, 470px);
    padding: 18px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(24, 32, 51, 0.20);
    text-align: left;
    box-sizing: border-box;
    color: #344054;
}
.ftx-password-help__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}
.ftx-password-help__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #202938;
}
.ftx-password-help__close {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #53657e;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.ftx-password-help__close:hover { background: #f2f4f7; }
.ftx-password-help__close:focus-visible,
.ftx-password-help__done:focus-visible { outline: 2px solid var(--ftx-primary, #6941c6); outline-offset: 2px; }
.ftx-password-help__rules {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ftx-password-help__rule {
    position: relative;
    margin: 0;
    padding: 7px 0 7px 23px;
    color: #596779;
    font-size: 13px;
    line-height: 1.45;
    word-break: normal;
}
.ftx-password-help__rule::before {
    content: "\25CB";
    position: absolute;
    left: 0;
    top: 6px;
    color: #98a2b3;
    font-size: 16px;
}
.ftx-password-help__rule.is-valid { color: #277541; }
.ftx-password-help__rule.is-valid::before { content: "\2713"; color: #1b964a; font-weight: 700; }
.ftx-password-help__handle,
.ftx-password-help__done { display: none; }
.ftx-password-help__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1101;
    background: rgba(18, 25, 38, 0.48);
}
/* Center the desktop popup when it cannot fit beside the form. */
.ftx-password-help__dialog--centered {
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%);
    max-height: calc(100dvh - 32px);
}
@media (max-width: 991px) {
    .ftx-password-help__dialog {
        left: 0 !important;
        top: auto !important;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: min(76dvh, 610px);
        padding: 10px 20px max(18px, env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .ftx-password-help__handle {
        display: block;
        width: 36px;
        height: 4px;
        margin: 2px auto 16px;
        border-radius: 5px;
        background: #d0d5dd;
        flex: 0 0 auto;
    }
    .ftx-password-help__rules {
        overflow-y: auto;
        flex: 1 1 auto;
        min-height: 0;
        overscroll-behavior: contain;
    }
    .ftx-password-help__rule { font-size: 14px; padding-top: 9px; padding-bottom: 9px; }
    .ftx-password-help__done {
        display: block;
        width: 100%;
        margin-top: 12px;
        padding: 12px 16px;
        border: 0;
        border-radius: 8px;
        background: var(--ftx-primary, #6941c6);
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        flex: 0 0 auto;
    }
}
@media (prefers-reduced-motion: reduce) {
    .ftx-password-help__dialog { scroll-behavior: auto; }
}