/* Keep wait cursor while callbacks are running */
body.dash-loading,
._dash-loading-callback {
  cursor: wait !important;
}

/* Global callback overlay: transparent backdrop + centered spinner */
._dash-loading-callback {
  position: fixed !important;
  inset: 0 !important;
  background: transparent !important;
  pointer-events: none !important;
  z-index: 2100 !important;
}

._dash-loading-callback::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 36px;
  margin-top: -18px;
  margin-left: -28px;
  border-bottom: 2px solid rgba(0, 77, 26, 0.35);
  background:
    linear-gradient(#004d1a 0 0) 2px 100% / 8px 35% no-repeat,
    linear-gradient(#004d1a 0 0) 16px 100% / 8px 65% no-repeat,
    linear-gradient(#004d1a 0 0) 30px 100% / 8px 85% no-repeat,
    linear-gradient(#004d1a 0 0) 44px 100% / 8px 50% no-repeat;
  animation: dash-global-graph 0.9s ease-in-out infinite;
}

@keyframes dash-global-graph {
  0% {
    background-size: 8px 35%, 8px 65%, 8px 85%, 8px 50%;
  }
  25% {
    background-size: 8px 75%, 8px 40%, 8px 60%, 8px 85%;
  }
  50% {
    background-size: 8px 50%, 8px 85%, 8px 35%, 8px 65%;
  }
  75% {
    background-size: 8px 85%, 8px 55%, 8px 75%, 8px 40%;
  }
  100% {
    background-size: 8px 35%, 8px 65%, 8px 85%, 8px 50%;
  }
}

/* Initial Dash loader layer without white backdrop */
._dash-loading {
  background: transparent !important;
}

/* Prevent Plotly internals from forcing horizontal page overflow */
#page-content .dash-graph,
#page-content .js-plotly-plot,
#page-content .plot-container,
#page-content .svg-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
