/* Timeline module chrome — header row above ruler / tracks */

:root {
  --timeline-header-h: 54px;
  --timeline-lane-icon: 16px;
  --timeline-video-accent: rgba(94, 234, 212, 0.82);
  --timeline-audio-accent: rgba(96, 165, 250, 0.82);
  --timeline-playhead: #ff5a4f;
  --timeline-line-subtle: rgba(255, 255, 255, 0.07);
  --timeline-line-muted: rgba(255, 255, 255, 0.045);
  --timeline-shell-radius: 8px;
}

.workspace-transport-stack {
  box-sizing: border-box;
}

.timeline-module {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  background: var(--program-chrome-bg, #18191b);
  border: 1px solid var(--cg-line, rgba(255, 255, 255, 0.09));
  border-radius: var(--cg-radius-md, 7px);
  /* Keep visible for header tooltips; clip top corners via chrome-row radius instead. */
  overflow: visible;
}

.timeline-chrome-row {
  display: flex;
  flex: 0 0 var(--timeline-header-h);
  min-height: var(--timeline-header-h);
  background: var(--program-chrome-bg, #18191b);
  /* Match module top radius; keep overflow visible so snap/focus/zoom tooltips can paint over the ruler. */
  border-top-left-radius: calc(var(--cg-radius-md, 7px) - 1px);
  border-top-right-radius: calc(var(--cg-radius-md, 7px) - 1px);
  overflow: visible;
  position: relative;
  z-index: 60;
}

.timeline-header-divider {
  display: none;
}

.timeline-header {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px 8px 12px;
  container-type: inline-size;
  container-name: timeline-header;
  overflow: visible;
}

.timeline-header-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-width: 0;
}

.timeline-brand-icon {
  width: 15px;
  height: 15px;
  color: rgba(235, 235, 245, 0.42);
  flex-shrink: 0;
}

.timeline-header-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(235, 235, 245, 0.58);
  user-select: none;
}

.timeline-header-timecode {
  font: 400 11px/1.2 var(--cg-font-timecode, 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'zero' 0;
  letter-spacing: 0.02em;
  color: rgba(228, 234, 244, 0.6);
  white-space: nowrap;
  user-select: none;
}

.timeline-header-timecode #curTime,
.timeline-header-timecode #durTime,
.timeline-header-timecode .timecode-sep {
  color: inherit;
  font-weight: 400;
}

.timeline-header-status {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  color: rgba(163, 230, 53, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-header-status[hidden] {
  display: none !important;
}

.timeline-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
  overflow: visible;
  /* Match transport console Option D tokens */
  --tl-icon-size: 26px;
  --tl-icon-svg: 16px;
  --tl-zoom-track: 52px;
  --tl-btn-radius: 4px;
  --tl-strip-h: 30px;
}

.timeline-header-tools.icon-group-capsule {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: var(--tl-strip-h);
  padding: 2px 3px !important;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  position: relative;
  overflow: visible !important;
}

.timeline-header-tools-div {
  width: 1px;
  height: 14px;
  margin: 0 3px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.12);
  align-self: center;
}

.timeline-header-actions .ws-timeline-zoom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: var(--tl-icon-size);
  position: relative;
  overflow: visible;
}

.timeline-header-actions .ws-zoom-slider {
  width: var(--tl-zoom-track);
  height: 12px;
}

.timeline-header-actions .ws-zoom-btn {
  width: var(--tl-icon-size);
  height: var(--tl-icon-size);
  font-size: 12px;
  line-height: 1;
  border-radius: var(--tl-btn-radius);
}

.timeline-header-actions .ws-zoom-btn:hover {
  border-radius: var(--tl-btn-radius);
}

.timeline-header-actions .icon-btn {
  width: var(--tl-icon-size) !important;
  height: var(--tl-icon-size) !important;
  border-radius: var(--tl-btn-radius) !important;
  position: relative;
  overflow: visible !important;
}

.timeline-header-actions .icon-btn:hover {
  border-radius: var(--tl-btn-radius) !important;
}

.timeline-header-actions .icon-btn svg {
  width: var(--tl-icon-svg);
  height: var(--tl-icon-svg);
  display: block;
  fill: currentColor;
}

.timeline-header-actions .icon-btn.ws-stroke-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-header-actions #btn-focus-selection.active-blue {
  color: var(--cg-brand, #a3e635) !important;
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12)) !important;
  border-radius: var(--tl-btn-radius) !important;
}

.timeline-header-actions #btn-timeline-marker .timeline-marker-icon {
  width: calc(var(--tl-icon-svg) - 1px);
  height: calc(var(--tl-icon-svg) - 1px);
}

.timeline-header-actions #btn-timeline-marker:hover {
  color: var(--cg-brand, #a3e635) !important;
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12)) !important;
}

.timeline-header-actions #btn-timeline-snap.active-blue {
  color: var(--cg-brand, #a3e635) !important;
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12)) !important;
  border-radius: var(--tl-btn-radius) !important;
}

.timeline-header-actions #btn-timeline-snap:not(.active-blue) .timeline-snap-icon {
  opacity: 0.55;
}

@container timeline-header (max-width: 860px) {
  .timeline-header-actions {
    --tl-zoom-track: 40px;
  }
}

@container timeline-header (max-width: 640px) {
  .timeline-header-actions {
    --tl-icon-size: 24px;
    --tl-icon-svg: 14px;
    --tl-zoom-track: 32px;
    --tl-strip-h: 28px;
  }

  .timeline-header-actions #btn-focus-selection {
    display: none;
  }
}

@container timeline-header (max-width: 520px) {
  .timeline-header-actions .ws-timeline-zoom-wrap,
  .timeline-header-actions .timeline-header-tools-div {
    display: none;
  }

  .timeline-header-brand .timeline-header-title {
    display: none;
  }

  .timeline-header-brand .timeline-header-timecode {
    font-size: 10px;
  }
}

.timeline-header-chip {
  display: none !important;
}

.timeline-header-chip[hidden] {
  display: none !important;
}

.timeline-chip-icon {
  display: none !important;
}

.timeline-module > .timeline-stack-row {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.workspace-left .timeline-module .timeline-container {
  border-radius: 0 !important;
  border: 0 !important;
  background: var(--program-chrome-bg, #18191b) !important;
}

.workspace-left .timeline-module .timeline-pr-header-corner {
  border-bottom: 0;
}

.workspace-left .timeline-module > .timeline-stack-row .scrollbar-track {
  height: 15px !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  background: var(--program-chrome-bg, #18191b);
}

/* Kill the 1px rail line (.scrollbar-track:before in workspace.css) */
.workspace-left .timeline-module > .timeline-stack-row .scrollbar-track::before {
  content: none !important;
  display: none !important;
}

.workspace-left .timeline-module > .timeline-stack-row #scrollbarThumb {
  top: 3px !important;
  height: 9px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.workspace-left .timeline-module > .timeline-stack-row #scrollbarThumb:active {
  background: rgba(255, 255, 255, 0.3) !important;
}

.workspace-left .timeline-module > .timeline-stack-row .pr-handle {
  top: 1px !important;
  width: 6px !important;
  height: 7px !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}

/* Lane header SVG icons — opaque solid gray strokes. */
.timeline-lane-icon {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 1;
}

.timeline-lane-icon--video,
.timeline-lane-icon--audio {
  color: #8e8e93;
}
