/**
 * LearnDash Login Dialog Styles
 *
 * Overrides the LearnDash default modal positioning so the login popup is
 * always centered in the current viewport. Applied only at viewports 1024px
 * and wider, matching the JS threshold in singleGroups.js.
 *
 * The key changes from the LearnDash default:
 *
 *  - position: fixed  (was: absolute) — anchors the element to the viewport
 *    so scroll position has no effect.
 *  - top: 50%; left: 50%  — positions the top-left corner at the viewport
 *    centre, giving the existing transform something to offset from.
 *  - margin: 0  (was: auto 50% auto) — removes the margin-based nudge that
 *    conflicted with the transform centering.
 *
 * The existing transform: translateY(-50%) translateX(-50%) then pulls the
 * element back by half its own dimensions, perfectly centering it.
 *
 * Note: LearnDash JS (learndash.js openLoginModal) also animates a scrollTop
 * to the modal's document-flow position when it opens, which causes the page
 * to scroll unexpectedly. That scroll is suppressed in singleGroups.js via
 * a preventModalScroll() handler — no CSS override is needed here for that.
 *
 * @package dmc-bridge-child
 * @see     scripts/learndash/singleGroups.js  preventModalScroll()
 */

@media (min-width: 1024px) {
    body.single-groups .learndash-wrapper .ld-modal {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        margin: 0 !important;
    }
}