﻿/* Full viewport height + flex column = footer stays bottom */
.cw-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Keep appbar on top of everything */
.cw-appbar {
    z-index: 1300;
}

/* Your logo makes the header taller; set this once */
:root {
    /*--cw-appbar-offset: 128px;*/ /* tweak if needed */
    --cw-appbar-height: 56px;
    --cw-footer-height: 48px; /* tweak to your LegalFooter height */
}

/* Main area takes the remaining space */
.cw-main {
    flex: 1 1 auto;
    display: flex;
    padding-top: var(--cw-appbar-height); /* prevents content under fixed appbar */
    box-sizing: border-box;
}

/* This is the ONLY scroll container */
.cw-scroll {
    flex: 1 1 auto;
    /*height: 100%;*/
    /*overflow: auto;*/
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    box-sizing: border-box;
}
    /* Footer stays at the bottom because cw-shell is flex column */
.cw-footer {
    -ms-flex: inherit;
    -webkit-flex: inherit;
    flex: inherit;
    height: var(--cw-footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0F74BC; /* so white text is visible */
    color: #fff;
    /*border-top: 1px solid rgba(255,255,255,0.25);*/

}

    /* Make sure footer link/button inherits white */
    .cw-footer .app-footer,
    .cw-footer .app-footer-link,
    .cw-footer a {
        color: #fff;
    }

        .cw-footer .app-footer-link:hover,
        .cw-footer a:hover {
            opacity: 0.85;
        }

    /* Minor */
    .cw-logo {
        cursor: pointer;
    }

    .cw-title {
        margin-left: 12px;
    }

    /* Modal backdrop MUST sit above MudBlazor appbar/dialog layers */
    .legal-modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 116, 188, 0.85);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000; /* IMPORTANT */
    }
    /* Modal */
    .legal-modal {
        background: #ffffff;
        color: #202124;
        max-width: 520px;
        width: calc(100% - 32px);
        padding: 24px;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    }

    .legal-modal-actions {
        margin-top: 24px;
        text-align: right;
    }

    /* Print */
    @media print {
        .no-print,
        .legal-modal-backdrop {
            display: none !important;
        }
    }

