/* Chords as notes (chordnotes.js, docs/chord-notes.md): the popover that writes chord symbols out in
 * a part, following notes on the score and the piano roll, their follow lines, and the bar that asks
 * before they are edited by hand. */

/* The chords' gold, as the paper takes it: deeper on the day paper, lighter at night. */
.score,
.hybrid {
  --made: #9a7414;
  --made-lit: #c98a00;
  --made-line: rgba(154, 116, 20, 0.7);
}
.score.night,
.hybrid.night {
  --made: #e6c36a;
  --made-lit: #ffd970;
  --made-line: rgba(230, 195, 106, 0.6);
}

/* Following notes: their heads in the chords' gold; lit with their chord's symbol under the pointer;
 * a flash when they were just written again. */
.score-sys .glyphs.made {
  fill: var(--made);
}
.score-sys .glyphs.made.lit {
  fill: var(--made-lit);
  filter: drop-shadow(0 0 0.3px var(--made-lit)) drop-shadow(0 0 0.7px var(--made-lit));
}
.score-sys .glyphs.made.flash {
  fill: var(--made-lit);
  animation: made-flash 1.2s ease-out 1;
}
@keyframes made-flash {
  0% {
    filter: drop-shadow(0 0 1.2px var(--made-lit));
    opacity: 0.4;
  }
  40% {
    filter: drop-shadow(0 0 0.8px var(--made-lit));
    opacity: 1;
  }
  100% {
    filter: none;
  }
}

/* The follow line, under its part's staff: solid where the notes follow, dashed where a chord was
 * let go of; the chords' names small over it, a link where it starts. */
.score-sys .follow-line {
  stroke: var(--made-line);
  stroke-width: 0.13px;
  stroke-linecap: round;
}
.score-sys .follow-line.free {
  stroke-dasharray: 0.45 0.35;
  stroke-opacity: 0.6;
}
.score-sys .follow-chord {
  font: italic 600 0.95px var(--serif);
  fill: var(--made);
  pointer-events: none;
}
.score-sys .follow-chord.free {
  fill-opacity: 0.55;
  text-decoration: line-through;
}
.score-sys .follow-link {
  font: 1.15px var(--sans);
  fill: var(--made);
}

/* The piano roll: following notes outlined in gold, dashed. */
.note.made {
  outline: 1.5px dashed rgba(230, 195, 106, 0.85);
  outline-offset: 1px;
}
.note.made.sel {
  outline: 2px solid var(--ivory);
}

/* The chord editor's "Followed by". */
.chord-followed {
  flex-wrap: wrap;
}
.chord-follow {
  font: 600 11px var(--sans);
  color: var(--gold);
}
.chord-follow.free {
  color: var(--muted);
  text-decoration: line-through;
}
.btn.chord-follow-again {
  padding: 1px 7px;
}

/* The chord symbol's menu: its parts under a small heading. */
.sym-group {
  padding-top: 8px;
  padding-bottom: 2px;
  font: 600 9.5px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.sym-follows {
  color: var(--gold);
  font-size: 11px;
}

/* The popover. */
.auto-menu.write-out {
  width: 360px;
  padding-bottom: 10px;
}
.wo-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  flex-wrap: wrap;
}
.wo-key {
  width: 64px;
  flex: none;
  font: 600 10px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.wo-fixed {
  color: var(--champagne);
}
.wo-part,
.wo-style,
.wo-bass {
  min-width: 170px;
}
.wo-to {
  color: var(--dim);
}
.wo-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--lacquer-hi);
  color: var(--champagne);
  font: 600 11px var(--sans);
  cursor: pointer;
}
.wo-chip.on {
  border-color: var(--gold);
  background: var(--metal);
  color: #251a06;
}
.wo-chip:disabled {
  opacity: 0.4;
  cursor: default;
}
.wo-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 0;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}
.wo-spacer {
  flex: 1;
}
.btn.wo-hear.on {
  background: var(--metal);
  border-color: rgba(255, 230, 160, 0.7);
  color: #251a06;
}
.btn.wo-write {
  background: var(--metal);
  color: #251a06;
  border-color: rgba(255, 230, 160, 0.7);
}

/* The bar that asks before following notes are edited by hand: over the views, at the top. */
.follow-ask-root {
  position: fixed;
  left: 0;
  right: 0;
  top: 64px;
  z-index: 95;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.follow-ask {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(760px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2b2416, #17130b);
  border: 1px solid var(--gold);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(212, 175, 55, 0.25);
  flex-wrap: wrap;
}
.follow-ask-link {
  font-size: 20px;
  color: var(--gold);
}
.follow-ask-text {
  flex: 1 1 280px;
  min-width: 0;
}
.follow-ask-what {
  font: 600 13px/1.35 var(--sans);
  color: var(--champagne);
}
.follow-ask-why {
  font: 12px/1.35 var(--sans);
  color: var(--muted);
}
.follow-ask-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn.follow-yes {
  background: var(--metal);
  color: #251a06;
  border-color: rgba(255, 230, 160, 0.7);
}
.follow-ask-always {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 11px var(--sans);
  color: var(--muted);
  cursor: pointer;
}

/* The explorer's "Use and write out…". */
.btn.hx-usein {
  white-space: nowrap;
}
