/**
 * Dedicated /login and /signup page — auth UI only (no homepage chrome).
 */
html:has(.psx-auth-standalone),
.psx-auth-standalone {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

.psx-auth-standalone {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 45%, #ffffff 100%);
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.psx-auth-webapp {
    background: #ffffff;
}

.psx-auth-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

/*
 * Each auth panel occupies the same centered slot inside the shell.
 * Bootstrap's default position:fixed + sibling flex items caused the card
 * to shift right on mobile / webapp WebViews.
 */
.psx-auth-standalone .psx-auth-shell > .modal {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100%;
    margin: 0 !important;
    padding: 16px !important;
    overflow: visible !important;
    opacity: 1 !important;
    z-index: 1;
}

.psx-auth-standalone .psx-auth-shell > .modal.show {
    display: flex !important;
}

/* Kill Bootstrap modal backdrop and scroll lock on this page */
.psx-auth-standalone .modal-backdrop {
    display: none !important;
}

.psx-auth-standalone .psx-auth-shell > .modal .modal-dialog {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 420px !important;
    transform: none !important;
    flex: 0 1 420px;
    pointer-events: auto;
}

.psx-auth-standalone .psx-auth-shell > .modal .modal-dialog.axm-dialog--sm {
    max-width: 360px !important;
    flex-basis: 360px;
}

.psx-auth-standalone .psx-auth-shell > .modal .modal-content {
    width: 100% !important;
    box-shadow: 0 20px 50px rgba(15, 27, 61, 0.14);
}

/* Bootstrap adds padding-right when modal opens; kill it on this page */
.psx-auth-standalone.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

@media (max-width: 479px) {
    .psx-auth-shell {
        padding: 12px;
    }

    .psx-auth-standalone .psx-auth-shell > .modal {
        padding: 12px !important;
    }

    .psx-auth-standalone .psx-auth-shell > .modal .modal-dialog {
        max-width: 100% !important;
        flex-basis: 100%;
    }
}
