/* ClientArea auth pages: Signin, Signup, ForgetPassword, ResetPassword */

html.auth-page,
html.auth-page body {
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
}

.auth-page-shell {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
}

/* mx-3 + width:100% causes horizontal shift; shell uses padding instead */
.auth-page-shell.mx-3 {
    margin-inline: 0 !important;
}

.auth-page-shell > .card,
.auth-page-shell > .auth-page-card {
    margin-inline: auto !important;
    flex-shrink: 0;
}

.auth-page-shell > .card,
.auth-page-shell .card-body,
.auth-page-shell .form-body,
.auth-page-shell form.row {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

.auth-page-shell .form-control,
.auth-page-shell .input-group {
    max-width: 100%;
    min-width: 0;
}

.auth-page-shell .input-group .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-page-shell .d-grid > .badge,
.auth-page-shell .d-grid > a.badge {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
    padding: 0.65rem 0.75rem;
}

@media (max-width: 767.98px) {
    .auth-page-shell {
        justify-content: center !important;
        align-items: flex-start !important;
        min-height: auto !important;
        padding: 0.75rem max(0.75rem, env(safe-area-inset-right, 0px)) max(1.5rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px)) !important;
    }

    .auth-page-shell > .card,
    .auth-page-shell > .auth-page-card {
        overflow: visible !important;
        margin-top: 0.25rem !important;
        margin-bottom: 1rem !important;
        margin-inline: auto !important;
        width: 100%;
        max-width: 100% !important;
        padding: 1rem !important;
    }

    .auth-page-shell .card-body {
        padding: 0 !important;
        width: 100%;
        overflow-x: clip;
    }

    .auth-page-shell .row.g-4,
    .auth-page-shell form.row,
    .auth-page-shell form.row > [class*="col-"],
    .auth-page-shell .signup-name-row > [class*="col-"],
    .auth-page-shell .col-lg-6.d-flex {
        margin-inline: 0;
        max-width: 100%;
        min-width: 0;
    }

    .auth-page-shell #password-strength-indicator {
        max-width: 100%;
        overflow-x: auto;
    }

    .auth-page-shell #password-strength-indicator .text-success {
        transform: none;
    }

    .auth-page-shell .form-body.mt-4,
    .auth-page-shell .form-body.mt-3 {
        margin-top: 0.75rem !important;
    }

    .auth-page-shell .row.mt-5 {
        margin-top: 0.75rem !important;
    }

    .auth-page-shell .col-12.mt-5 {
        margin-top: 1rem !important;
    }

    .auth-page-shell img[alt="Logo"] {
        max-width: min(260px, 82vw) !important;
        height: auto !important;
    }

    .auth-page-shell .captcha-section {
        min-width: 0 !important;
        width: 100%;
        max-width: 100%;
        padding-inline: 0 !important;
    }

    .auth-page-shell .captcha-section img {
        max-width: min(200px, 70vw) !important;
    }

    .auth-page-shell .d-grid .btn,
    .auth-page-shell .d-grid.gap-2 .btn,
    .auth-page-shell .badge.w-100 {
        white-space: normal;
        line-height: 1.4;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .auth-page-shell .row.d-flex.mt-2 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }

    .auth-page-shell .row.d-flex.mt-2 > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 767.98px) and (max-height: 740px) {
    .auth-page-shell {
        padding-top: 0.5rem !important;
    }

    .auth-page-shell .col-12.mt-5.mb-4 {
        margin-top: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
}
