/* Sticky Toolbar */
#music-toolbar {
  position: sticky;
  bottom: 0;
  background: #282828;
  color: white;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
  width: calc(100% - 0rem); /* Prevents edge clipping */
  max-width: 800px; /* Looks better on desktop */
  margin: 1rem auto 0 auto; /* Top margin + centered */
  box-sizing: border-box;
}

.music-toolbar-button,
.music-toolbar-select,
#transpose-meter {
  font-size: clamp(13px, 1.8vw, 15px);
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  box-sizing: border-box;
}

.music-toolbar-button {
  background: #0073aa;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.music-toolbar-button:hover {
  background: #005d85;
}

.music-toolbar-select {
  background: #f0f0f0;
  color: #333;
}

#transpose-meter {
  background: #444;
  font-weight: bold;
  text-align: center;
  min-width: 30px;
}

/* Tighter responsive breakpoint for small phones only */
@media (max-width: 360px) {
  #music-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .music-toolbar-button,
  .music-toolbar-select,
  #transpose-meter {
    width: 100%;
    text-align: center;
  }
}

/* ------------------------------------------
🎵 Core Music Content Styles
------------------------------------------ */
#music-post-content {
  padding-bottom: 80px;
  background-color: var(--bg-color, #fff);

  transition: all 0.3s ease;
}

#music-post-content .lyrics-text,
#music-post-content .notation-text,
#music-post-content .chord-text {
  font-weight: bold;
}

.lyrics-text {
  color: var(--lyrics-color);
  margin: 0.5em 0 0.2em 0;
}

.notation-text {
  background-color: var(--notation-bg, transparent);
  color: var(--notation-color);
  display: block;
  border-radius: 4px;
  margin: 0 0 0.8em 0;
}

.chord-text {
  background-color: var(--chords-bg, transparent);
  color: var(--chords-color);
  padding: 4px 10px;
  margin: 2px;
  border-radius: 999px;
  display: inline-block;
}

.notes-heading {
  color: var(--heading-color);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  margin-top: 1em;
}

/* ------------------------------------------
🎵 Note Bubbles (with Dynamic Colors)
------------------------------------------ */
.note {
  display: inline-block;
  padding: 4px 8px;
  margin: 2px;
  font-weight: bold;
  border-radius: 6px;
  color: #fff;
  line-height: 1.6;
  transition: all 0.2s ease-in-out;
}

/* Dynamic Note Class */
.note-A {
  background-color: var(--note-A);
}
.note-B {
  background-color: var(--note-B);
}
.note-C {
  background-color: var(--note-C);
}
.note-D {
  background-color: var(--note-D);
}
.note-E {
  background-color: var(--note-E);
}
.note-F {
  background-color: var(--note-F);
}
.note-G {
  background-color: var(--note-G);
}

/* Fallback Explicit Colors */
.note-C,
.note-C-flat {
  background-color: #f44336;
}
.note-C-sharp,
.note-D-flat {
  background-color: #e91e63;
}
.note-D,
.note-Dn {
  background-color: #9c27b0;
}
.note-D-sharp,
.note-E-flat {
  background-color: #673ab7;
}
.note-E,
.note-En {
  background-color: #3f51b5;
}
.note-F,
.note-Fn {
  background-color: #2196f3;
}
.note-F-sharp,
.note-G-flat {
  background-color: #03a9f4;
}
.note-G,
.note-Gn {
  background-color: #00bcd4;
}
.note-G-sharp,
.note-A-flat {
  background-color: #009688;
}
.note-A,
.note-An {
  background-color: #4caf50;
}
.note-A-sharp,
.note-B-flat {
  background-color: #8bc34a;
}
.note-B,
.note-Bn {
  background-color: #cddc39;
}

.note-eb {
  background-color: #c0392b;
}
.note-ab {
  background-color: #e67e22;
}
.note-bb {
  background-color: #bdc3c7;
  color: #000;
}

/* Neon Pulse Style */
.neon-pulse .note {
  box-shadow: 0 0 8px currentColor;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------
🎨 Themes
------------------------------------------ */
/* [unchanged] Themes below remain intact — optional to optimize */

/* ------------------------------------------
🎨 Themes (Bubble + Typography + Background)
------------------------------------------ */

/* Default Pop */
#music-post-content.default {
  --bg-color: #ffffff;
  --lyrics-color: #000080;
  --notation-color: #800000;
  --chords-color: #ff9800;
  --heading-color: #4caf50;
}

/* Neon Pulse */
#music-post-content.neon-pulse {
  --bg-color: #ffffff;
  --lyrics-color: #e91e63;
  --notation-color: #3f51b5;
  --chords-color: #ff9800;
  --heading-color: #4caf50;
  --note-A: #673ab7;
  --note-B: #ff5722;
  --note-C: #03a9f4;
  --note-D: #009688;
  --note-E: #8bc34a;
  --note-F: #f44336;
  --note-G: #00bcd4;
}

#music-post-content.neon-pulse .note {
  background-color: #333;
  color: #fff;
}
#music-post-content.neon-pulse .note-c {
  background-color: #9b59b6;
}
#music-post-content.neon-pulse .note-csharp {
  background-color: #8e44ad;
}
#music-post-content.neon-pulse .note-d {
  background-color: #3498db;
}
#music-post-content.neon-pulse .note-dsharp {
  background-color: #2980b9;
}
#music-post-content.neon-pulse .note-e {
  background-color: #1abc9c;
}
#music-post-content.neon-pulse .note-f {
  background-color: #2ecc71;
}
#music-post-content.neon-pulse .note-fsharp {
  background-color: #27ae60;
}
#music-post-content.neon-pulse .note-g {
  background-color: #f1c40f;
  color: #000;
}
#music-post-content.neon-pulse .note-gsharp {
  background-color: #f39c12;
  color: #000;
}
#music-post-content.neon-pulse .note-a {
  background-color: #e67e22;
}
#music-post-content.neon-pulse .note-asharp {
  background-color: #d35400;
}
#music-post-content.neon-pulse .note-b {
  background-color: #e74c3c;
}

/* Dark Elegant */
#music-post-content.dark-elegant {
  --bg-color: #383838;
  --lyrics-color: #ffffff;
  --notation-color: #ff2469;
  --chords-color: #d7c9aa;
  --heading-color: #ff8b80;
  --note-A: #19535f;
  --note-B: #0b7a75;
  --note-C: #d7c9aa;
  --note-D: #7b2d26;
  --note-E: #f0f3f5;
  --note-F: #19535f;
  --note-G: #0b7a75;
  padding: 10px;
}

#music-post-content.dark-elegant .note {
  background-color: #ffffff;
  color: #000000;
}
#music-post-content.dark-elegant .note-c {
  background-color: #ffabab;
}
#music-post-content.dark-elegant .note-d {
  background-color: #dd6cf3;
}
#music-post-content.dark-elegant .note-e {
  background-color: #ffb451;
}
#music-post-content.dark-elegant .note-f {
  background-color: #c5ffab;
}
#music-post-content.dark-elegant .note-g {
  background-color: #38cdfa;
}
#music-post-content.dark-elegant .note-a {
  background-color: #ff6f6f;
}
#music-post-content.dark-elegant .note-b {
  background-color: #bbb;
  color: #222;
}
#music-post-content.dark-elegant .note-csharp,
#music-post-content.dark-elegant .note-dsharp,
#music-post-content.dark-elegant .note-fsharp,
#music-post-content.dark-elegant .note-gsharp,
#music-post-content.dark-elegant .note-asharp {
  background-color: #0084ff;
}
