/*
 * AQUILA_FINANCE_F3_R4_4_R2_DECK_CLEARANCE
 *
 * Scope:
 * - Chart of Accounts workspace only
 * - keep the workspace below the floating application menu deck
 * - preserve F3 authenticated transport
 * - preserve existing accounting content and controls
 */

#aquila-finance-f3-r4-overlay.is-open {
    top: 112px !important;
    bottom: 0 !important;
    height: auto !important;
    max-height: calc(100vh - 112px) !important;

    box-sizing: border-box !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/*
 * The direct workspace surface must remain inside the
 * deck-safe viewport rather than extending back underneath it.
 */
#aquila-finance-f3-r4-overlay.is-open > * {
    max-height: calc(100vh - 128px) !important;
    box-sizing: border-box !important;
}

/* Tablet / compact laptop */
@media (max-width: 1024px) {
    #aquila-finance-f3-r4-overlay.is-open {
        top: 100px !important;
        max-height: calc(100vh - 100px) !important;
    }

    #aquila-finance-f3-r4-overlay.is-open > * {
        max-height: calc(100vh - 116px) !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    #aquila-finance-f3-r4-overlay.is-open {
        top: 94px !important;
        max-height: calc(100vh - 94px) !important;
    }

    #aquila-finance-f3-r4-overlay.is-open > * {
        max-height: calc(100vh - 110px) !important;
    }
}
