/* On-chart controls for spot wizard Plotly charts (#2791).
   A small styled toolbar (pan/zoom drag-mode toggle + reset-zoom) injected
   top-right of each chart by static/js/domain/varial-colors.js, in place of
   Plotly's native modebar. */

.varial-chart-has-controls {
  position: relative;
}

.varial-chart-controls {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  z-index: 5;
  display: flex;
  gap: 0.25rem;
}

.varial-chart-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid var(--varial-border, #e8e4d8);
  border-radius: var(--varial-radius-sm, 0.25rem);
  background-color: var(--varial-card-bg, #fff);
  color: var(--varial-gray-600, #6b6a68);
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.varial-chart-ctrl:hover,
.varial-chart-ctrl:focus-visible {
  opacity: 1;
  color: var(--varial-primary, #1b3aa0);
  border-color: var(--varial-primary, #1b3aa0);
  outline: none;
}

/* Pan / Box-zoom are two discrete buttons (#3145 point 1). The active one carries
   aria-pressed="true" and gets a subtle "selected" affordance — a low-contrast fill
   + border, deliberately lighter than the strong primary :hover/:focus-visible
   treatment above, so the current tool reads at a glance without a heavy highlight. */
.varial-chart-ctrl-pan[aria-pressed="true"],
.varial-chart-ctrl-zoom-box[aria-pressed="true"] {
  opacity: 1;
  color: var(--varial-gray-800, #2b2a28);
  border-color: var(--varial-gray-400, #b8b4ad);
  background-color: var(--varial-gray-100, #f3f1ec);
}

/* Copy-data button: brief green "copied" confirmation after a successful copy. */
.varial-chart-ctrl-copied,
.varial-chart-ctrl-copied:hover {
  opacity: 1;
  color: var(--varial-green, #16a34a);
  border-color: var(--varial-green, #16a34a);
}
