/* Intermo embed — YouTube/MuseScore-shaped score player in Markdown.
 *
 * Default frame is 16:9. Authors may set width / aspect on the cell comment:
 *   <!-- intermo-cell {"dialect":"auto","width":720,"aspect":"16:9"} -->
 */

.intermo-score-cell,
.intermo-notation-player.intermo-embed {
  --intermo-embed-ar: 16 / 9;
  --intermo-embed-w: 100%;

  display: block;
  position: relative;
  width: var(--intermo-embed-w);
  max-width: 100%;
  aspect-ratio: var(--intermo-embed-ar);
  margin: 1.5rem 0;
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: 12px;
  background: #0e0e10;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

/* createNotationBar replaces the cell contents with .notation-panel —
   pin that panel to the embed frame so height:100% resolves. */
.intermo-score-cell > .notation-panel,
.intermo-notation-player > .notation-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #f7f7f5;
}

.intermo-score-cell .notation-content-area,
.intermo-notation-player .notation-content-area {
  /* Room for the floating bar; keep the score scroll inside the 16:9. */
  padding-bottom: 72px;
}

.intermo-score-cell .intermo-systems,
.intermo-notation-player .intermo-systems {
  width: 100%;
  max-width: 100%;
}

.intermo-score-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem 1.25rem;
  color: #f5c2c2;
  background: #1a1010;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  text-align: center;
}
