:root {
    --modebar-btn : 2.5rem;   /* ~40px */
    --modebar-ico : 1.5rem;   /* ~28px */
    --modebar-add : #198754;  /* zielony */
    --modebar-del : #dc3545;  /* czerwony */
}
@media (max-width: 576px) {
    :root {
        --modebar-btn : 2.25rem;  /* ~36px */
        --modebar-ico : 1.5rem;   /* ~24px */
    }
}

/* Rozmiar wszystkich przycisków modebara w panelach Plotly */
.panel[data-type="Plotly Panel"] .js-plotly-plot .modebar-btn {
    width: var(--modebar-btn) !important;
    height: var(--modebar-btn) !important;
}

/* Ikonki mają w Plotly width/height = 1em → skalujemy font-size */
.panel[data-type="Plotly Panel"] .js-plotly-plot .modebar-btn .icon {
    font-size: var(--modebar-ico) !important;
}

/* Ikony kolorowane bieżącym kolorem przycisku */
.panel[data-type="Plotly Panel"] .js-plotly-plot .modebar-btn .icon path {
    fill: currentColor !important;
    stroke: currentColor !important;
    fill-opacity: 1 !important;
    stroke-opacity: 1 !important;
}

/* Kolory: Add (zielony), Delete (czerwony) po data-title/title */
.panel[data-type="Plotly Panel"] .js-plotly-plot
  .modebar-btn[data-title="Add new period"],
.panel[data-type="Plotly Panel"] .js-plotly-plot
  .modebar-btn[title="Add new period"] {
    color: var(--modebar-add) !important;
}

.panel[data-type="Plotly Panel"] .js-plotly-plot
  .modebar-btn[data-title="Delete selected period"],
.panel[data-type="Plotly Panel"] .js-plotly-plot
  .modebar-btn[title="Delete selected period"] {
    color: var(--modebar-del) !important;
}

/* Kursory: edycja legendy = I-beam na tekście; toggle/linie/punkt = pointer */
.panel[data-type="Plotly Panel"] .js-plotly-plot .legend .legendtext,
.panel[data-type="Plotly Panel"] .js-plotly-plot .legend .legendtext tspan {
    cursor: text !important;
}
.panel[data-type="Plotly Panel"] .js-plotly-plot .legend .legendtoggle,
.panel[data-type="Plotly Panel"] .js-plotly-plot .legend .legendlines path,
.panel[data-type="Plotly Panel"] .js-plotly-plot .legend .legendpoints path {
    cursor: pointer !important;
}

