html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: sans-serif;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh; /* Fill the screen */
  overflow: hidden;
}

/* Top section auto-sized */
.top-section {
  padding: 1em;
  text-align: center;
  flex: 0 0 auto;
}

/* Bottom section auto-sized */
.bottom-section {
  padding: 1em;
  text-align: center;
  background-color: #f8f8f8;
  flex: 0 0 auto;
}

/* Middle section expands */
.middle-section {
  flex: 1 1 auto;
  display: flex;
  padding: 0 1em;
  box-sizing: border-box;
  min-height: 150px; /* 👈 prevents chart from collapsing */
}

/* Make canvas fill the chart container */
#bpmChart {
  flex: 1;
  width: 100% !important;
  height: 100% !important;
  min-height: 150px; /* 👈 ensures canvas never collapses */
}

button {
  font-size: 1.2em;
  margin: 0.5em;
  padding: 0.6em 1.2em;
}

input[type="number"] {
  font-size: 1.1em;
  width: 80px;
  text-align: center;
}

.step-controls {
  margin-top: 1em;
  font-size: 1em;
}

.step-controls label {
  margin: 0 0.5em;
}

.custom-tooltip {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5em 1em;
  font-size: 0.9em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  pointer-events: auto;
  z-index: 999;
}

.custom-tooltip button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.2em;
  margin-left: 0.5em;
  vertical-align: middle;
}

#chartTooltip {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  padding: 0.5em;
  border-radius: 6px;
  font-size: 0.9em;
  z-index: 1000;
  pointer-events: auto; /* Make sure tooltip can be clicked */
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#chartTooltip button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1em;
  margin-top: 4px;
}

canvas {
  pointer-events: auto; /* default behavior, unless you override */
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 1em 2em;
  border-radius: 8px;
  text-align: center;
}

#bpmList {
  margin-top: 1em;
  padding: 0 1em;
  font-size: 0.95em;
  line-height: 1em;
  max-height: 200px;
  overflow-y: auto;
}

.bpm-entry {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #ccc;
}

.delete-entry {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
  font-size: 1em;
  padding: 0px;
  margin: 0;
}
