/* Timeline Panel - COMPLETE-04 */
#timeline-panel {
  grid-row: 4;
  grid-column: 1 / -1;
  width: 100%;
  height: 110px;
  background-color: #1c1c2e;
  border-top: 2px solid #2a2a4a;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 0 14px;
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

/* Row 1 */
#timeline-controls {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tl-btn {
  background: #2a2a4a;
  border: 1px solid #444466;
  color: #ffffff;
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}

.tl-btn:hover {
  background: #3a3a6a;
  color: #ffffff;
}

.tl-btn.playing {
  background: #4a4a8a;
  color: #ffffff;
}

#speed-label {
  color: #ffffff;
  font-size: 11px;
  min-width: 32px;
}

#speed-range {
  width: 70px;
  accent-color: #5555aa;
}

#time-display {
  margin-left: auto;
  color: #ffffff;
  font-size: 12px;
  font-family: monospace;
  white-space: nowrap;
}

/* Row 2 */
#timeline-scrub-row {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
}

.tl-time-label {
  color: #ffffff;
  font-size: 10px;
  font-family: monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

#scrub-track-wrapper {
  flex: 1;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

#scrub-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  background: #2e2e50;
  border-radius: 3px;
  overflow: hidden;
  transition: height 0.15s, background 0.15s;
}

#scrub-track:hover {
  height: 8px;
  background: #3e3e60;
}

#scrub-fill {
  height: 100%;
  width: 0%;
  background: #5555aa;
  border-radius: 3px;
  pointer-events: none;
}

#scrub-markers {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}

.tl-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  line-height: 1;
  pointer-events: auto;
  cursor: default;
  z-index: 3;
}

.tl-marker.snap {
  color: #63b3ed;
}

.tl-marker.handoff {
  color: #ff8c00;
}

.tl-marker.throw {
  color: #f5c518;
}

.tl-marker.lateral {
  color: #aa44dd;
}

#scrub-handle {
  position: absolute;
  width: 15px;
  height: 15px;
  background: #ffffff;
  border-radius: 50%;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  box-shadow: 0 1px 5px rgba(0,0,0,0.7);
  z-index: 4;
  cursor: grab;
  transition: width 0.15s, height 0.15s, border-color 0.15s;
}

#scrub-handle:hover {
  width: 18px;
  height: 18px;
  border: 2px solid #5555aa;
}

#scrub-handle.dragging {
  cursor: grabbing;
  width: 18px;
  height: 18px;
  border: 2px solid #5555aa;
}

#scrub-input {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  top: 0;
  bottom: 0;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 5;
  -webkit-appearance: none;
}

/* Row 3 */
#timeline-labels {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.tl-event-label {
  white-space: nowrap;
  font-family: monospace;
}

.tl-event-label.snap {
  color: #4a7ab5;
}

.tl-event-label.handoff {
  color: #cc7000;
}

.tl-event-label.throw {
  color: #c9a500;
}

.tl-event-label.lateral {
  color: #9944cc;
}
