/* (c) 2026 Zero Mile Contract Limited. All rights reserved. */
/* /split/ only: the song splitter. Uses the site's tokens and classes; adds the drop area, the progress block,
   the transport and the lanes of the multitrack. */
.sp-song > .sp-drop, .sp-split > *:not(.sheet-h), .sp-mix > *:not(.sheet-h) { margin-inline: 14px; }
.sp-drop { margin-block: 14px; padding: 14px; border: 1px dashed var(--field); }
.sp-drop.over { border-style: solid; border-color: var(--blue); background: var(--press); }
.sp-drop p { margin: 0 0 8px; }
.sp-drop p:last-child { margin-bottom: 0; }
.sp-songline { color: var(--ink); font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.sp-len { color: var(--mute); font: 500 14px var(--mono); margin-left: 6px; }
.sp-songnote, .sp-or, .sp-small { color: var(--mute); font-size: 14px; }
/* the message line stays in the page while it is empty (it takes no room): a screen reader speaks a live line
   only when the line was already there before its text arrived */
.sp-msg { color: var(--warn); font-size: 14.5px; }
.sp-msg.bad { color: var(--bad); }

.sp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-block: 12px; }
.sp-row .lab { font: 500 13px var(--mono); color: var(--mute); min-width: 9em; }
.sp-more { margin-block: 4px 8px; }
.sp-more summary { cursor: pointer; color: var(--blue); font-size: 14.5px; width: max-content; }
.sp-threads { width: 6em; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 14px 8px; }

/* the progress block keeps its height, so nothing above or below moves while a split runs */
.sp-progress { min-height: 112px; margin-block: 4px 14px; }
.sp-progress progress { display: block; width: 100%; height: 12px; accent-color: var(--ink); }
.sp-stage { margin: 8px 0 2px; color: var(--ink); font-size: 15px; }
.sp-progress .sp-small { margin: 2px 0; min-height: 1.4em; }

.sp-transport { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-block: 14px 10px; }
.sp-time { font: 500 15px var(--mono); color: var(--ink); min-width: 9.5em; }
.sp-loop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-block: 0 12px; }
.sp-loop .lab { font: 500 13px var(--mono); color: var(--mute); }
.sp-loop .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sheet); }

/* lanes: a fixed name column, then the waveform; the playhead and the loop band span the waveform column */
.sp-lanes { --name-w: 230px; position: relative; border-top: 1px solid var(--rule); }
.sp-lane { display: grid; grid-template-columns: var(--name-w) minmax(0, 1fr); border-bottom: 1px solid var(--rule); min-height: 64px; }
.sp-lane-ctl { display: grid; grid-template-columns: 1fr auto auto; grid-template-rows: auto auto; gap: 4px 6px; align-items: center; padding: 6px 8px 6px 0; }
.sp-lane-name { font: 600 13px var(--mono); color: var(--ink); text-transform: capitalize; }
.sp-lane-ctl .chip { min-height: 28px; padding: 3px 8px; font-size: 12px; }
.sp-lane-ctl .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.sp-volrow { grid-column: 1 / span 2; display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-vol { flex: 1; min-width: 0; accent-color: var(--ink); }
.sp-volv { font: 500 11px var(--mono); color: var(--mute); min-width: 3.2em; text-align: right; }
.sp-lane-save { font: 500 12px var(--mono); color: var(--blue); background: none; border: 0; padding: 2px 0; cursor: pointer; text-decoration: underline; justify-self: end; }
.sp-wave { display: block; width: 100%; height: 64px; cursor: pointer; background: var(--tint); }
.sp-lane.off .sp-wave { opacity: .35; }
.sp-head, .sp-loopband { position: absolute; top: 0; bottom: 0; left: var(--name-w); pointer-events: none; z-index: 2; }
.sp-head[hidden] { display: none; }
.sp-head { width: 2px; margin-left: -1px; background: var(--bad); will-change: transform; }
.sp-loopband { background: rgba(31, 95, 191, .12); border-inline: 1px solid var(--blue); transform-origin: 0 0; }

.sp-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-block: 12px 14px; }
.sp-notes p { margin: 6px 0; max-width: 46em; }
.sp-credits { font-size: 14px; color: var(--mute); }

@media (max-width: 640px) {
  .sp-lanes { --name-w: 132px; }
  .sp-lane-ctl { grid-template-columns: 1fr auto; }
  .sp-lane-ctl .sp-solo { grid-column: 2; }
  .sp-row .lab { min-width: 0; width: 100%; }
  .sp-time { min-width: 0; }
}

/* printing: the song's name and the lanes, no controls */
@media print {
  .sp-drop .btn, .sp-or, .sp-msg, .sp-split, .sp-transport, .sp-loop, .sp-save, .sp-help, .sp-lane-ctl .chip, .sp-volrow, .sp-lane-save, .sp-head, .sp-loopband, .sp-notes { display: none !important; }
  .sp-lane { grid-template-columns: 9em minmax(0, 1fr); break-inside: avoid; }
  .sp-lanes { --name-w: 9em; }
  .sp-drop { border: 0; padding: 0; }
}
