/* Sound and picture match (js/soundMatch.js).
   Two columns, clips on the left and sounds on the right. Nothing here animates on its own: the
   only thing that ever moves is the one clip the player pressed play on. */

.smgGameContainer {
  max-width: 720px;
  margin: 0 auto;
}

.smgPrompt {
  text-align: center;
  font-weight: 600;
  margin: 0 0 4px;
}

.smgCount {
  text-align: center;
  font-size: 13px;
  color: var(--bia-muted);
  margin: 0 0 14px;
}

.smgBoard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.smgColumnHead {
  margin: 0 0 8px;
  text-align: center;
  font-size: 14px;
  color: var(--bia-muted);
}

.smgTile {
  position: relative;
  border: 2px solid var(--bia-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #fff;
  transition: border-color 0.15s ease;
}

/* State is never colour alone: a picked tile also gets its button's aria-pressed, a paired one
   carries the "Paired" label, and a rejected pair says so through a_announce. */
.smgTile.isSelected { border-color: var(--bia-accent); }
.smgTile.isMatched { border-color: var(--bia-border); opacity: 0.55; }
.smgTile.isWrong { border-color: var(--bia-fg); }
.smgTile.isPlaying { border-color: var(--bia-accent); }

.smgVideo {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #000;
}

/* The sound tiles have nothing to show, so they get a plain numbered face rather than a fake
   waveform: a waveform would leak which sounds are loud and turn this into a picture-matching
   task through the back door. */
.smgSoundFace {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--bia-muted);
  background: var(--bia-bg-soft, #F1EEFC);
}

.smgTileBar {
  display: flex;
  gap: 6px;
  padding: 8px;
}

.smgTileBar button {
  flex: 1 1 auto;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--bia-border);
  background: #fff;
  color: var(--bia-link);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.smgTileBar button[aria-pressed="true"] {
  background: var(--bia-accent);
  color: #fff;
  border-color: var(--bia-accent);
}

.smgTileBar button:disabled {
  color: var(--bia-muted);
  cursor: default;
}

.smgMatchedFlag {
  padding: 0 8px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--bia-muted);
}

.smgControls {
  text-align: center;
  margin-top: 6px;
}

.smgHint {
  min-height: 40px;
  padding: 8px 22px;
  border-radius: 50px;
  border: 1px solid var(--bia-border);
  background: #fff;
  color: var(--bia-link);
  font: inherit;
  cursor: pointer;
}

.smgDone {
  text-align: center;
  font-weight: 600;
  padding: 24px 0;
}

@media (max-width: 520px) {
  .smgBoard { gap: 10px; }
  .smgVideo, .smgSoundFace { height: 110px; }
  .smgTileBar { flex-wrap: wrap; }
}
