/* ========== BUG HUNT ========== */

/* Program blocks with step numbers */
.bh-block {
  position: relative;
  padding-left: 32px !important;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.1s;
  border: 3px solid transparent;
}

.step-badge {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.25);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Selected command block */
.bh-block.selected {
  border-color: #fdcb6e;
  box-shadow: 0 0 0 3px rgba(253, 203, 110, 0.4);
  transform: scale(1.05);
}

/* Changed command block */
.bh-block.changed {
  border-color: #00b894;
  box-shadow: 0 0 0 2px rgba(0, 184, 148, 0.3);
}

/* Selected + changed */
.bh-block.selected.changed {
  border-color: #fdcb6e;
  box-shadow: 0 0 0 3px rgba(253, 203, 110, 0.4);
}

/* Executing highlight during run */
.bh-block.executing {
  border-color: #0984e3;
  box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.4);
  transform: scale(1.05);
}

/* Successfully executed step */
.bh-block.step-ok {
  opacity: 0.6;
  border-color: transparent;
}

/* Error step */
.bh-block.step-error {
  border-color: #e17055;
  box-shadow: 0 0 0 3px rgba(225, 112, 85, 0.4);
  animation: flash-red-block 0.5s ease;
}

@keyframes flash-red-block {
  0% { background-color: inherit; }
  30% { filter: brightness(0.7); }
  100% { filter: brightness(1); }
}

/* Replace buttons disabled state */
.replace-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Responsive adjustments */
@media (max-height: 800px) {
  .bh-block {
    padding-left: 28px !important;
  }
  .step-badge {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }
}

@media (max-height: 650px) {
  .bh-block {
    padding-left: 24px !important;
  }
  .step-badge {
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }
}
