/* ============================================================
   WONDA_AUTH_CHROME
   Wraps the auth pages (login, register, forgot, reset,
   welcome, pending) with the site header at the top and the
   site footer at the bottom. Layout only — colours come from
   theme.css and auth.css / auth-v2.css as before.
   ============================================================ */

/* Turn the body into a column: header / content / footer.
   Content stretches to fill whatever height is left. */
body.wonda-body--with-chrome {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
}

body.wonda-body--with-chrome > .wonda-site-header,
body.wonda-body--with-chrome > .wonda-site-footer {
    flex-shrink: 0;
}

/* ---- Card layout (forgot / reset / welcome / pending) ---- */
body.wonda-body--with-chrome > .wonda-auth {
    flex: 1 1 auto;
    min-height: 0 !important;
    padding: 40px 16px;
}
@media (max-width: 480px) {
    body.wonda-body--with-chrome > .wonda-auth {
        padding: 24px 12px;
    }
}

/* ---- Split layout (login / register) ---- */
/* The wrapper takes over the 2-column grid the body used to have,
   and becomes the only thing stretching between the chrome. */
body.wonda-body--with-chrome.wonda-body--authv2 > .wonda-authv2-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body.wonda-body--with-chrome.wonda-body--authv2 > .wonda-authv2-split > .wonda-authv2__showcase,
body.wonda-body--with-chrome.wonda-body--authv2 > .wonda-authv2-split > .wonda-authv2__form {
    min-height: 0;
}

@media (max-width: 860px) {
    body.wonda-body--with-chrome.wonda-body--authv2 > .wonda-authv2-split {
        grid-template-columns: 1fr;
        overflow: visible;
    }
}

/* The old body-level grid from auth-v2.css must not fire when the
   header is present — otherwise the header becomes a 3rd cell. */
body.wonda-body--with-chrome.wonda-body--authv2 {
    display: flex !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
}

/* ---- Sticky topbar stays pinned while scrolling ---- */
body.wonda-body--with-chrome > .wonda-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}
