/* Move Plotly modebar buttons to the bottom-right */
.js-plotly-plot .modebar {
    transform: scale(1.8) !important;  /* Increase button size */
    position: absolute !important;
    top: 40px !important;  /* Move it down from the top */
    right: 40px !important; /* Move it more toward the center */
    opacity : 1 !important;
    visibility : visible !important;
    transition : none !important;
    border-radius : 5px !important;
    pointer-events: all !important;
}

/* Prevent modebar from disappearing when not hovered */
.js-plotly-plot .modebar:hover {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hide unwanted buttons - target both data-title and aria-label */
.modebar-btn[data-title="Lasso Select"],
.modebar-btn[aria-label="Lasso Select"],
.modebar-btn[data-title="Box Select"],
.modebar-btn[aria-label="Box Select"],
.modebar-btn[data-title="Download plot as a png"],
.modebar-btn[aria-label="Download plot as a png"],
.modebar-btn[data-title="Produced with Plotly"],
.modebar-btn[aria-label="Produced with Plotly"] {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Hide the Plotly logo */
.js-plotly-plot .modebar div[title="Produced with Plotly"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}