/* Proper Mobile Scrolling & Slider Fix */

/* Fix panel scrolling on iOS/mobile */
.panel-content {
    /* Enable smooth momentum scrolling */
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent overscroll bounce */
    overscroll-behavior-y: contain;
}

/* Fix sliders - prevent scroll hijacking */
.slider input[type="range"] {
    /* This is the key - let horizontal swipes work on sliders */
    touch-action: pan-y pinch-zoom;
}

/* Prevent entire panel from being draggable while using sliders */
.sliders {
    /* Block vertical scroll when interacting with sliders */
    touch-action: pan-x pinch-zoom;
}

/* Make panel handle smoother */
.panel-handle {
    /* Only allow vertical dragging on handle */
    touch-action: pan-x;
    cursor: grab;
}

.panel-handle:active {
    cursor: grabbing;
}

/* Improve scroll performance */
.control-panel {
    /* Hardware acceleration */
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Fix sticky scrolling on iOS */
@supports (-webkit-touch-callout: none) {
    .panel-content {
        /* iOS-specific fixes */
        -webkit-overflow-scrolling: touch;
    }

    .control-panel {
        /* Prevent rubber-banding */
        position: fixed;
    }
}