/* Reuse the secondary-auth dialog layout for the registration challenge. */
.swal2-container.register-captcha-mask {
    z-index: 200000;
    padding: 16px;
}

.swal2-container.register-captcha-mask.swal2-backdrop-show {
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(2px);
}

.swal2-popup.register-captcha-dialog {
    --captcha-line: #d0d5dd;
    --captcha-muted: #667085;
    --captcha-primary: #2563eb;
    --captcha-focus: rgba(37, 99, 235, .22);
    --captcha-error: #b42318;
    display: block !important;
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 0;
    color: #172033;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    background: #fff;
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
}

.register-captcha-dialog .swal2-html-container.register-captcha-content {
    margin: 0;
    padding: 0;
    overflow: visible;
    color: inherit;
    font-size: inherit;
    line-height: 1.5;
    text-align: left;
}

.register-captcha-form > label:first-child {
    margin-top: 0;
}

.register-captcha-row {
    --system-captcha-gap: 12px;
}

.register-captcha-row .secondary-auth-control {
    min-width: 0;
}

.register-captcha-dialog p.register-captcha-help {
    margin-top: 8px;
    color: var(--captcha-muted);
    font-size: 13px;
    line-height: 1.5;
}

.register-captcha-dialog input[aria-invalid="true"] {
    box-shadow: 0 0 0 1px var(--captcha-error) inset;
}

.register-captcha-dialog .swal2-validation-message.register-captcha-error {
    margin: 10px 24px 0;
    padding: 0;
    color: var(--captcha-error);
    font-size: 13px;
    line-height: 1.5;
    background: transparent;
}

.register-captcha-dialog .swal2-actions.register-captcha-actions {
    width: 100%;
    box-sizing: border-box;
    margin: 22px 0 0;
    padding: 16px 24px;
    flex-wrap: nowrap;
}

.register-captcha-actions button {
    min-height: 44px;
    margin: 0;
    touch-action: manipulation;
}

.register-captcha-actions button:focus-visible {
    outline: 3px solid var(--captcha-focus);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .swal2-container.register-captcha-mask {
        padding: 12px;
    }

    .swal2-container.register-captcha-mask.swal2-center > .register-captcha-dialog {
        align-self: end;
        grid-row: 3;
        width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .register-captcha-row {
        --system-captcha-gap: 8px;
    }

    .register-captcha-dialog input {
        font-size: 16px;
    }

    .register-captcha-dialog .swal2-validation-message.register-captcha-error {
        margin-right: 18px;
        margin-left: 18px;
    }

    .register-captcha-dialog .swal2-actions.register-captcha-actions {
        padding: 14px 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .swal2-container.register-captcha-mask *,
    .register-captcha-dialog input {
        animation: none !important;
        transition: none !important;
    }
}
