/* ==========================================================================
   IMPL 22 auth + customer dashboard responsive fixes.
   Loaded only by the auth views (@push('styles')) and layouts/dashboard.blade.php.
   Hooks: .sys-auth-shell (auth page shells), .sys-dash-shell / .sys-dash-col / .sys-dash-main (dashboard layout).
   ========================================================================== */

/* --- hit area (same pattern as .sys-tap in sys-listing.css; the dashboard layout does not load that file) --- */
.sys-dash-shell .sys-tap:not(.absolute),
.sys-auth-shell .sys-tap:not(.absolute) {
    position: relative;
}

.sys-dash-shell .sys-tap::before,
.sys-auth-shell .sys-tap::before,
.sys-auth-shell .password-toggle::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(100%, 32px);
    height: max(100%, 32px);
    transform: translate(-50%, -50%);
}

/* register checkbox (13px): extend the sentence label's hit area over the checkbox */
.sys-auth-shell label[for="terms"] {
    position: relative;
}

.sys-auth-shell label[for="terms"]::before {
    content: '';
    position: absolute;
    left: -35px;
    top: -6px;
    width: 32px;
    height: 32px;
}

/* --- 100vh shells -> 100dvh (mobile browser toolbars); <1024 keeps the page's own height:auto rules --- */
@supports (height: 100dvh) {
    body .sys-auth-shell {
        min-height: 100dvh;
    }

    body .sys-auth-shell.h-screen {
        height: 100dvh;
    }

    @media (max-width: 1023px) {
        body .sys-auth-shell {
            min-height: 100dvh !important;
        }
    }

    @media (min-width: 1024px) {
        html:has(.sys-auth-shell),
        body:has(.sys-auth-shell) {
            height: 100dvh;
        }

        body .auth-container {
            min-height: 90dvh;
            height: 90dvh;
            max-height: 90dvh;
        }
    }

    .sys-dash-shell.h-screen,
    .sys-dash-col.h-screen {
        height: 100dvh;
    }
}

/* --- dashboard content area: centred, 1440px max, fluid gutters (children keep their own padding) --- */
.sys-dash-main > * {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.sys-dash-main > [class*="mx-4"] {
    margin-left: clamp(1rem, 4.5vw, 4rem);
    margin-right: clamp(1rem, 4.5vw, 4rem);
}

/* review modal card: keep a gutter at 360 */
.sys-dash-shell #reviewModal > .relative {
    width: calc(100% - 2rem);
    max-width: 28rem;
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
}
