/* JointJS Canvas Customization */
#paper {
    width: 100%;
    height: 100%;
    background-color: transparent;
}

/* Hide default JointJS unneeded styles or override them */
.joint-paper {
    border: none;
}

/* Custom styles for diagram components in the toolbox */
.toolbox-item {
    cursor: grab;
    user-select: none;
    transition: all 0.2s ease;
}

.toolbox-item:active {
    cursor: grabbing;
}

/* Custom scrollbar for sidebars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent; 
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* A4 Paper visualization */
#paper-wrapper {
    transition: transform 0.2s ease-out;
    transform-origin: top left;
}

/* Rubberband Selection Box */
#selection-box {
    position: absolute;
    border: 1px solid #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    pointer-events: none;
    z-index: 100;
    display: none;
}

/* Resize Handle Overlay */
#resize-overlay {
    position: absolute;
    border: 1px dashed #3b82f6;
    pointer-events: none;
    z-index: 90;
    display: none;
}

.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ffffff;
    border: 1px solid #3b82f6;
    pointer-events: auto;
}

.resize-handle.se {
    bottom: -5px;
    right: -5px;
    cursor: se-resize;
}
.resize-handle.e {
    top: 50%;
    right: -5px;
    margin-top: -5px;
    cursor: e-resize;
}
.resize-handle.s {
    bottom: -5px;
    left: 50%;
    margin-left: -5px;
    cursor: s-resize;
}
