/*
  Classic Bongos — "Spotlight Stage" concept.
  Once a child opens an activity, the whole screen becomes a dark,
  immersive stage so the instrument itself is the star.
*/

.bongos-page {
  background: var(--t2t-stage-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Was `overflow: hidden`, which silently clipped content (with no
     way to scroll to it) whenever the page was taller than the
     visible window — invisible in fullscreen (no browser chrome
     eating into the viewport) but real in a normal window. Allowing
     vertical scroll is a safety net; the width formula below also
     keeps the artwork from needing it in the first place. */
  overflow-x: hidden;
  overflow-y: hidden;
}

.bongos-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: var(--t2t-space-2);
  padding: var(--t2t-space-3);
  position: relative;
}

.bongos-instructions {
  color: var(--t2t-stage-text-soft);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 700;
  text-align: center;
}

/* ---- The bongo pair artwork ---- */
/* All three supplied assets use the exact same 4168 x 3242 canvas.
   Keep ONE image element at the same size and position for every state.
   A hit only swaps the image source; it never resizes or transforms the artwork. */

.bongo-visual {
  position: relative;
  width: min(680px, 92vw, calc((100vh - 280px) * 1.2857));
  aspect-ratio: 4168 / 3242;
}

.bongo-visual__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.bongo-hit {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  position: absolute;
  cursor: pointer;
  z-index: 2;
}


/* No scale/resize animation is used. The physical appearance changes only
   because the full-canvas image is replaced with the matching tapped asset. */
.bongo-visual__image.is-transitioning {
  animation: bongo-image-flash 260ms ease-out;
}

@keyframes bongo-image-flash {
  0%   { opacity: 0.82; }
  18%  { opacity: 1; }
  100% { opacity: 1; }
}

/* ---- Input status indicator: helpful, not distracting ---- */

.input-indicator {
  position: absolute;
  bottom: var(--t2t-space-2);
  right: var(--t2t-space-3);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--t2t-stage-text-soft);
  background: rgba(255,255,255,0.06);
  padding: 4px 12px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 200ms ease;
}

.input-indicator.is-visible { opacity: 1; }

/* ---- Inline controls: a labeled dropdown under each bongo. No pop-up. ---- */

.bongo-controls {
  display: flex;
  justify-content: center;
  gap: var(--t2t-space-3);
  width: min(680px, 92vw);
}

.bongo-controls__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bongo-controls__col--a { flex: 1.66 1 0; }
.bongo-controls__col--b { flex: 1 1 0; }

.bongo-controls__label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--t2t-stage-text-soft);
  text-align: center;
}

.bongo-controls__select {
  width: 100%;
  max-width: 220px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid rgba(253, 246, 255, 0.35);
  background: rgba(253, 246, 255, 0.08);
  color: var(--t2t-stage-text);
}

.bongo-controls__select:hover { background: rgba(253, 246, 255, 0.18); }

.bongo-controls__reset {
  appearance: none;
  border: none;
  background: none;
  color: var(--t2t-stage-text-soft);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 4px 8px;
  cursor: pointer;
}

.bongo-controls__reset:hover { color: var(--t2t-stage-text); }

@media (max-width: 560px) {
  .input-indicator { position: static; margin-top: var(--t2t-space-1); }
  .bongo-controls { gap: var(--t2t-space-2); }
}
