/* Minimal styles for CPR heart HUD and interactions */
.heart-container {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 24px auto;
  padding: 16px; /* breathing room around heart + overlays */
  background: transparent; /* prevent any boxy backdrop */
  border-radius: 12px;
  box-shadow: none;
  height: auto;
  min-height: 0;
}
@media (max-width: 900px) {
  .heart-container {
    padding: 40px;
    margin: 16px auto;
  }
}

.heart-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}

#cpr-heart {
  width: 100%;
  max-width: 100%;
  height: auto;
  user-select: none;
  position: relative;
  z-index: 0;
}

/* Ensure heart area sizes to content; avoid forcing full-viewport height */
/* (No full-height rules for #cpr-heart) */

/* Ensure the WebGL canvas stays below UI overlays */
#cpr-heart #heart-canvas,
.sim-heart #heart-canvas {
  position: relative;
  z-index: 0;
}

/* Show pointer over the actual canvas on hover */
#heart-canvas:hover {
  cursor: pointer !important;
}

/* If badge is inside heart in fallback, ensure it stays on top */
#cpr-heart .bpm-badge {
  z-index: 2147483647 !important;
  position: absolute;
  top: 14px;
  right: 14px;
  pointer-events: none;
}

.heart-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.heart-hud .hud-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.heart-hud .label {
  font-size: 12px;
  color: #4b5563;
}

.heart-hud .value {
  font-weight: 700;
  font-size: 18px;
  color: #111827;
}

.reset-btn {
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
}
.reset-btn:hover {
  background: #d1d5db;
}

/* Pulse feedback from cpr-heart-minimal.js */
/* Replace drop-shadow pulse with scale pulse to avoid blur box */
.pulse {
  animation: heart-scale 0.22s ease-out;
}
@keyframes heart-scale {
  0% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.035);
  }
  100% {
    transform: scale(1);
  }
}

/* Positive/negative visual hints */
.status-positive {
  transform: scale(1.2);
  transition: transform 0.2s ease;
}
.status-negative {
  transform: scale(0.9);
  transition: transform 0.2s ease;
}
.bpm-positive {
  color: #059669 !important;
}
.bpm-negative {
  color: #dc2626 !important;
}

/* Screen flash overlay */
.screen-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 16px;
}
.screen-flash-positive {
  background: rgba(16, 185, 129, 0.18);
}
.screen-flash-negative {
  background: rgba(220, 38, 38, 0.18);
}
