/* cf-tracks-desktop.css: the owner's track-timeline look on the desktop beat timeline (task 434). Scoped to body.cftd,
 * set by cf-tracks-desktop.js. Rows top to bottom: beat marks · captions · song · clips, on dark bands with an icon
 * column, a white playhead. Colours match the phone editor (cf-tracks.css). */
body.cftd {
  --cftd-bg: #0b0b0e;
  --cftd-row: #15151a;
  --cftd-cut: #e04bd6;
  --cftd-cap: #6b3df5;
  --cftd-song: #d9264f;
  --cftd-handle: #f6c21c;
}
body.cftd .sb-bt-tracks { background: var(--cftd-bg) !important; gap: 4px; padding: 4px 0; }
body.cftd .sb-bt-track { --sb-track-label: 56px; border-top: 0 !important; background: var(--cftd-row); }
body.cftd .sb-bt-track-head { background: var(--cftd-bg) !important; border-right: 0 !important; justify-content: center !important; padding: 0 !important; color: rgba(255, 255, 255, .78) !important; }
body.cftd .sb-bt-track-head > .sb-bt-track-name { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.cftd .sb-bt-track-head .sb-bt-track-icon { display: none !important; }
body.cftd .cftd-eye { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .78); display: grid; place-items: center; cursor: pointer; padding: 0; }
body.cftd .cftd-eye:hover { background: rgba(255, 255, 255, .07); color: #fff; }
body.cftd .cftd-eye.off { color: rgba(255, 255, 255, .32); }
body.cftd .cftd-eye:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
body.cftd .cftd-film { display: grid; place-items: center; color: rgba(255, 255, 255, .6); }

/* order: beats, captions, (transitions stay on the clip buttons), song, clips */
body.cftd .cftd-beats { order: 1; }
body.cftd .sb-bt-track--captionwords { order: 2; }
body.cftd .sb-bt-track--transitions { order: 3; }
body.cftd #audioLaneTrack { order: 4; }
body.cftd .sb-bt-track--edit { order: 5; }

/* 1 beat marks */
body.cftd .cftd-beats { min-height: 30px; flex: 0 0 30px !important; height: 30px !important; }
body.cftd .cftd-beats-view { position: relative; overflow: hidden; }
body.cftd .cftd-beats-in { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; will-change: transform; }
body.cftd .cftd-bar { position: absolute; top: 6px; bottom: 6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--cftd-cut); }
body.cftd.cftd-hide-beats .cftd-beats-in { visibility: hidden; }

/* 2 captions: purple bars with the words */
body.cftd .sb-bt-word-chip { background: var(--cftd-cap) !important; border-color: transparent !important; color: #fff !important; border-radius: 6px !important; }
body.cftd .sb-bt-word-chip--emphasis { background: #8b5cff !important; }
body.cftd.cftd-hide-caps #laneCaptionWords { visibility: hidden; }

/* 3 the song */
body.cftd .sb-bt-track-scroll--audio { padding-left: 24px !important; }
body.cftd .sb-bt-audio-lane { overflow: visible !important; background: var(--cftd-song) !important; border: 0 !important; border-radius: 8px !important; box-shadow: inset 0 2px 0 var(--cftd-handle), inset 0 -2px 0 var(--cftd-handle); }
body.cftd .sb-bt-audio-lane-canvas { opacity: .35; }   /* no CSS filter: the canvas redraws while playing */
body.cftd .cftd-song { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); color: #fff; font: 600 13px/1 -apple-system, BlinkMacSystemFont, Inter, system-ui, sans-serif; white-space: nowrap; pointer-events: none; z-index: 2; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
body.cftd .cftd-song b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
body.cftd .cftd-song em { font-style: normal; font-weight: 500; opacity: .75; font-size: 12px; }
body.cftd .cftd-cap { position: absolute; left: -18px; top: 0; bottom: 0; width: 18px; padding: 0; border: 0; border-radius: 8px 0 0 8px; background: var(--cftd-handle); display: grid; place-items: center; cursor: pointer; z-index: 3; }
body.cftd .cftd-cap::after { content: ""; position: absolute; inset: -4px -6px -4px -8px; }
body.cftd .cftd-cap i { width: 7px; height: 7px; border-left: 2.4px solid #121214; border-bottom: 2.4px solid #121214; transform: translateX(1.5px) rotate(45deg); }
body.cftd .cftd-cap:hover { filter: brightness(1.08); }
body.cftd .cftd-cap:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 4 the clips: a filmstrip */
body.cftd .sb-bt-track-scroll--montage { background: var(--cftd-row); }

/* the playhead: white */
body.cftd .sb-bt-playhead, body.cftd.lyrc-tokens .sb-bt-playhead { background: #fff !important; box-shadow: 0 0 6px rgba(255, 255, 255, .55) !important; }
body.cftd .sb-bt-playhead::after, body.cftd.lyrc-tokens .sb-bt-playhead::after { background: #fff !important; box-shadow: none !important; width: 12px; height: 12px; }
body.cftd .sb-bt-audio-lane-playhead { background: #fff !important; }
body.cftd .sb-bt-track--edit .sb-bt-track-head--static { min-width: 0 !important; }
