/**
 * MedLink Scroll Fix CSS
 * Enhances the nicescroll-cursors to make them more visible and draggable
 * on both mobile devices and desktop with mouse
 */

/* Make scrollbar cursor more visible and draggable */
.nicescroll-cursors {
    background-color: rgba(54, 63, 72, 0.8) !important;
    width: 10px !important;
    border: 1px solid #fff !important;
    border-radius: 4px !important;
    cursor: grab !important; /* Show grab cursor for better UX */
    touch-action: pan-y;
    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    opacity: 0.8 !important; /* Always somewhat visible */
    transition: width 0.2s ease, background-color 0.2s ease, opacity 0.2s ease !important;
}

/* Change cursor on active drag */
.nicescroll-cursors:active {
    cursor: grabbing !important;
    background-color: rgba(54, 63, 72, 1) !important;
    opacity: 1 !important;
    width: 12px !important; /* Slightly wider when active for better control */
}

/* Hover effects for better desktop UX */
.nicescroll-cursors:hover {
    background-color: rgba(54, 63, 72, 0.9) !important;
    opacity: 1 !important;
}

/* Ensure rails are properly visible and positioned */
.nicescroll-rails {
    z-index: 999999 !important;
    width: 12px !important; /* Slightly wider rail for easier targeting */
    background-color: rgba(247, 247, 247, 0.2) !important; /* Subtle rail background */
}

/* Ensure the rail is clickable */
.nicescroll-rails:hover {
    background-color: rgba(247, 247, 247, 0.3) !important;
}

/* Mobile specific enhancements */
@media (max-width: 767px) {
    .nicescroll-cursors {
        width: 12px !important; /* Slightly wider for mobile touch targets */
        opacity: 1 !important; /* Always fully visible on mobile */
    }
    
    /* Ensure dropdown is properly scrollable on mobile */
    #input-dropdown {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto !important;
    }
}

/* Prevent text selection when dragging scrollbar */
#input-dropdown .nicescroll-cursors,
#input-dropdown .nicescroll-rails {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
