/* toolbar_main.css */
#courseCanvas { touch-action: none; }
/* --- Fix for Mobile / Touch Overlays Blocking Canvas --- */

/* 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;
}

.toolbar-main-class{
    position: relative; /* Stays locked in the normal document flow so it never teleports */
    width: 100%;
    display: flex; /* Compact and scalable tool bar with buttons */
    flex-wrap: wrap; /* Wraps if the screen gets too narrow */
    gap: 2px;
    padding: 2px;
    border-radius: 2px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.toolbar-main-class button{
    width: auto;
    flex: 1 1 auto; /* Allows buttons to shrink and grow fluidly */
    min-width: 60px; /* Keeps the buttons from getting squished (quish that cat)*/
    padding: 4px 8px;
    font-size: 16px;
    margin-bottom: 0;
    line-height: 1.2;
    background-color: #1e0637 !important;
}

.toolbar-main-class button.active{
    background-color: #e20cb7 !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

.toolbar-hidden {
    position: absolute; /* Only absolute when hidden so it steps out of the way */
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(50px); 
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}