I'm making a plotly plot using Dash. When I view it on my desktop it looks good

But when I view it on my phone, the legend position overlaps the graph.

My legend is set up using
legend=dict(
bgcolor='rgba(0,0,0,0)',
orientation="h",
yanchor="bottom",
y=-0.15,
xanchor="left",
x=0
)
How do I fix the legend? Bonus question, how do I fix the modebar?
