/* --- Fix for Mobile / Touch Overlays Blocking Canvas --- */

/* --- Global Mobile Touch Lockout --- */
html, body {
    touch-action: none;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

#courseCanvas { touch-action: none; }

/* Ensure UI overlay containers don't block touch/pointer interactions with the canvas underneath */
.toolbar-container-wrapper, 
.ui-overlay, 
.toolbar-sidebar {
    pointer-events: none;
}

/* Re-enable pointer events specifically on interactive elements inside those wrappers so buttons still work */
.toolbar-container-wrapper button, 
.toolbar-sidebar button, 
input, 
select, 
.interactive-element {
    pointer-events: auto;
}

#courseCanvas {
    touch-action: none; /* Disables default pinch-zoom, panning, and scroll gestures on the canvas */
    -webkit-user-select: none; /* Prevents text/element highlighting on mobile */
    user-select: none;
}

canvas[resize]{
    width: 100%;
    height: 100%;
    display: block;
}

.course-class{
    background-color:lightgray;
    flex: 1; /* Takes up all remaining vertical space dynamically */
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    overflow: hidden; /* Keeps the paper.js canvas bounded */
    margin-top:0px; /* Gap at the top of the page */
}
