/* Shared Bootstrap responsive foundation for guest and authenticated layouts. */
:root { --pulse-header-height: 64px; }
/* Keep the authentication logo clear of the top edge without vertical centering. */
.auth-screen {
    justify-content: center;
    padding-top: 35px;
    padding-bottom: 35px;
}
.auth-screen > :empty { display: none; }
.auth-screen .card.mb-5 { margin-bottom: 0 !important; }
/* This source image has blurred bands outside its central 50%.
   Crop them from auth backgrounds without modifying the shared image asset. */
.auth-page-background { display: none; }
#main_content_container:has(.auth-screen) {
    position: relative;
    background-image: none;
}
#main_content_container:has(.auth-screen) > .auth-page-background {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.auth-page-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/images/credit-score-one.png') center / cover no-repeat;
    transform: scale(2);
}
/* The shade is the layout background; the entire yielded page is foreground. */
#darkShade {
    position: relative;
    isolation: isolate;
}
#darkShade .guest-page-content {
    position: relative;
    z-index: 1;
}
#main_content_container, #darkShade {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: visible !important;
}
#authMainMenuContentArea { min-width: 0; overflow-wrap: anywhere; }
#main_dashboard_navigation_menu { top: 0; left: 0; min-height: 64px; z-index: 1030; }
#main_dashboard_container { margin-top: var(--pulse-header-height); }
#main_dashboard_navigation_menu .navbar-brand { white-space: normal; font-size: clamp(.9rem, 2.5vw, 1.25rem); }
#authMenuNavigation { flex-shrink: 0; }
.pulse-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pulse-table-scroll table, .table-responsive table { overflow-wrap: normal; }
.pulse-table-scroll:focus-visible { outline: 2px solid #758738; outline-offset: -2px; }
.modal-dialog { max-width: min(var(--bs-modal-width, 500px), calc(100vw - 2rem)); }
.modal-content { max-height: calc(100dvh - 3.5rem); overflow-y: auto; }
.modal-body { overflow-y: auto; min-height: 0; }
.modal-header, .modal-footer { flex-shrink: 0; }
.modal-footer, [data-modal-form-actions] { flex-wrap: wrap; gap: .5rem; }
.pulse-nav-close { display: none; }
@media (min-width: 1200px) {
    #authMenuNavigation { flex: 0 0 250px; width: 250px; }
    #authMenuNavigation.smaller-side-menu { flex-basis: 145px; width: 145px; }
    #authMainMenuContentArea { flex: 1 1 0%; width: auto; margin-left: 0 !important; }
    #authMenuNavigation, #authMainMenuContentArea {
        height: calc(100dvh - var(--pulse-header-height));
        min-height: 0 !important;
    }
}
@media (max-width: 1199.98px) {
    #main_dashboard_navigation_menu .navbar-toggler,
    #main_dashboard_navigation_menu #navbarSupportedContent { display: none; }
    #toggleButton { margin-right: 0 !important; min-width: 44px; min-height: 44px; }
    #authMenuNavigation.offcanvas-xl {
        position: fixed !important;
        inset: 0 auto 0 0;
        width: min(320px, 88vw) !important;
        height: 100dvh;
        min-height: 0 !important;
        z-index: 1045 !important;
        overflow-y: auto;
        transition: transform .25s ease-in-out !important;
    }
    .pulse-nav-close { display: flex; justify-content: flex-end; padding: .75rem; }
    #authMainMenuContentArea {
        flex: 1 1 100%; width: 100%; max-width: 100%;
        margin-left: 0 !important; height: auto; min-height: calc(100dvh - var(--pulse-header-height));
        overflow-y: visible;
    }
    #authMainMenuContentArea > .container-fluid { padding-inline: .75rem; }
    .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length {
        float: none; text-align: start; margin-bottom: .75rem;
    }
    .dataTables_wrapper .dataTables_filter input { max-width: 100%; margin-left: 0; }
    .pagination { flex-wrap: wrap; }
    .card-header { display: flow-root; }
    .card-header h5 { overflow-wrap: anywhere; }
    #main_content_container .auth-right { flex: 0 0 100%; width: 100%; min-height: 100dvh; padding: 4rem 1rem 2rem !important; }
    #main_content_container .auth-left { display: none !important; }
}
@media (max-width: 991.98px) {
    #main_content_container .col-md-4 { width: 100%; }
    #main_content_container form { max-width: 40rem; margin-inline: auto; }
    .form-control, .form-select, .select2-container { max-width: 100%; }
    .form-control, .form-select { font-size: 16px; min-height: 44px; }
    .btn { min-height: 44px; white-space: normal; }
    .btn-close { min-width: 24px; min-height: 24px; }
    .modal-dialog { margin: .5rem auto; max-width: calc(100vw - 1rem); }
    .modal-content { max-height: calc(100dvh - 1rem); }
    .modal-body { padding: 1rem; }
    .modal-title { overflow-wrap: anywhere; }
    img, video { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    #authMenuNavigation, #authMainMenuContentArea { transition: none !important; }
}
