/**
 * tab-embed.css — styles for the read-only embed viewer.
 *
 * All rules are scoped under .embed-mode (set on <html> very early by an
 * inline script in tab-editor.html), so this file is inert on the normal
 * editor and safe to load unconditionally.
 */

/* ── Hide editor chrome ───────────────────────────────────────
   Keep the score (<main>), the track tab bar (slimmed below) and the footer
   status-bar, which doubles as the playback transport. */
.embed-mode .app-header,           /* top bar: Save / Import / Print / … */
.embed-mode .toolbar,              /* note-entry toolbar: durations, etc. */
.embed-mode .section-label,        /* "TAB" / "Notation" labels */
.embed-mode .shortcuts-btn,        /* floating "Shortcuts" button */
.embed-mode #btn-shortcuts,
.embed-mode .tab-volume-controls,  /* volume popup (floats oddly when framed) */
.embed-mode .drag-handle,
.embed-mode .tab-score-settings-btn,
.embed-mode #restore-prompt {
  display: none !important;
}

/* Slim down the track tab bar: keep the track picker, "Show All", and the
   relocated Layout / Scroll controls; drop add-track, the view filters,
   the display-mode widget and the Chords / Notes / Lyrics buttons. */
.embed-mode .track-tab-add,
.embed-mode .view-section-label,
.embed-mode .conductor-toggle,     /* Tab Only / Notation Only + display widget */
.embed-mode .annotation-buttons-wrap {
  display: none !important;
}

/* Per-track header: keep the track name (Guitar / Bass), drop editing/mix. */
.embed-mode .track-settings-btn,
.embed-mode .track-mute-btn,
.embed-mode .track-solo-btn,
.embed-mode .track-view-icon,
.embed-mode .track-view-select {
  display: none !important;
}

/* ── Layout ───────────────────────────────────────────────────
   Keep String Map's dark background on <html> so it fills the viewport on
   large monitors / when the embed is viewed standalone. Collapse <body> and
   <main> to natural height so the iframe auto-sizes with no dead space. */
.embed-mode html {
  background: var(--bg);
}
.embed-mode,
.embed-mode body {
  margin: 0;
}
.embed-mode body {
  display: block;
  min-height: 0;
}
.embed-mode main {
  display: block;
  flex: none;
  /* The editor pads the bottom of <main> so you can scroll past the last
     measure while editing — dead space in a read-only embed. */
  padding-bottom: 0 !important;
}
/* Keep the track bar pinned to the top of the window while scrolling. (Its
   editor sticky offset assumes a header/toolbar above it; with those hidden
   we reset top to 0.) */
.embed-mode .track-tab-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 50;
}
/* Keep the playback transport pinned to the bottom of the window so Play /
   tempo stay reachable while scrolling a long tab. */
.embed-mode footer.status-bar {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 50;
}

/* Loading / error overlay shown while the published tab is fetched. */
.embed-loading,
.embed-error {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  font: 500 1rem/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #e8e8e8;
  background: var(--bg, #08080e);
  z-index: 9999;
}

.embed-error {
  color: #ff9a8a;
}
