/* DebugChatTimeline.css */
.ChatDebugViewTimelinePresetInput {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  contain: content;
}

.ChatDebugViewTimeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ChatDebugViewTimelineTop {
  display: flex;
  align-items: center;
  min-width: 0;
}

.ChatDebugViewTimelineSummary {
  margin: 0;
  color: var(--vscode-descriptionForeground, inherit);
  font-size: 11px;
  font-weight: 600;
}

.ChatDebugViewTimelineInteractive {
  position: relative;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--vscode-widget-border, rgba(255, 255, 255, 0.14));
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  contain: strict;
  user-select: none;
}

.ChatDebugViewTimelineBadges {
  position: absolute;
  inset: 4px 8px auto 8px;
  height: 12px;
  pointer-events: none;
  z-index: 2;
}

.ChatDebugViewTimelineBadge {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  height: 12px;
  padding: 0 5px;
  border: 1px solid color-mix(in srgb, var(--vscode-widget-border, rgba(255, 255, 255, 0.18)) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--vscode-editorWidget-background, rgba(30, 30, 30, 0.92)) 90%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
  color: var(--vscode-descriptionForeground, inherit);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.ChatDebugViewTimelineBuckets {
  position: absolute;
  inset: 20px 8px 8px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.ChatDebugViewTimelineBucket {
  display: flex;
  flex: 1;
  align-items: flex-end;
  height: 100%;
  min-width: 0;
  cursor: pointer;
}

.ChatDebugViewTimelineBucketBar {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  height: 100%;
}

.ChatDebugViewTimelineBucketUnit {
  flex: none;
  height: 4px;
  border-radius: 999px;
  background: var(--vscode-charts-blue, rgba(91, 151, 255, 0.9));
}

.ChatDebugViewTimelineBucketUnitEmpty {
  opacity: 0.18;
}

.ChatDebugViewTimelineBucketSelected .ChatDebugViewTimelineBucketUnit,
.ChatDebugViewTimelineBucketBarSelected .ChatDebugViewTimelineBucketUnit {
  background: var(--vscode-charts-orange, rgba(255, 174, 0, 0.95));
}

.ChatDebugViewTimelineSelectionOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.ChatDebugViewTimelineCursorGuide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  pointer-events: none;
  background: color-mix(in srgb, var(--vscode-foreground, rgba(255, 255, 255, 0.88)) 58%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--vscode-editorWidget-background, rgba(30, 30, 30, 0.92)) 70%, transparent);
}

.ChatDebugViewTimelineCursorGuideVisible {
  left: var(--ChatDebugViewTimelineCursorGuideLeft);
}

.ChatDebugViewTimelineSelectionRange {
  position: absolute;
  top: 20px;
  bottom: 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--vscode-charts-orange, rgba(255, 174, 0, 0.95)) 18%, transparent);
  outline: 1px solid color-mix(in srgb, var(--vscode-charts-orange, rgba(255, 174, 0, 0.95)) 55%, transparent);
}

.ChatDebugViewTimelineSelectionMarker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  margin-left: -7px;
  padding: 0;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent calc(50% - 1px),
    var(--vscode-charts-orange, rgba(255, 174, 0, 0.95)) calc(50% - 1px),
    var(--vscode-charts-orange, rgba(255, 174, 0, 0.95)) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

.ChatDebugViewTimelineSelectionHandle {
  pointer-events: auto;
  cursor: ew-resize;
}

.ChatDebugViewTimelineSelectionHandleStart,
.ChatDebugViewTimelineSelectionMarkerStart {
  left: var(--ChatDebugViewTimelineSelectionStartLeft);
}

.ChatDebugViewTimelineSelectionHandleEnd,
.ChatDebugViewTimelineSelectionMarkerEnd {
  left: var(--ChatDebugViewTimelineSelectionEndLeft);
}

.ChatDebugViewTimelineSelectionHandle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 14px;
  height: 16px;
  transform: translateX(-50%);
  border: 1px solid var(--vscode-widget-border, rgba(255, 255, 255, 0.22));
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.ChatDebugViewTimelineSelectionHandle::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  width: 7px;
  height: 6px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent 0,
    transparent 1px,
    var(--vscode-foreground, rgba(255, 255, 255, 0.88)) 1px,
    var(--vscode-foreground, rgba(255, 255, 255, 0.88)) 2px,
    transparent 2px,
    transparent 4px,
    var(--vscode-foreground, rgba(255, 255, 255, 0.88)) 4px,
    var(--vscode-foreground, rgba(255, 255, 255, 0.88)) 5px,
    transparent 5px,
    transparent 100%
  );
  opacity: 0.8;
}

.ChatDebugViewTimelineSelectionHandle:hover::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
}

.ChatDebugViewTimelineSelectionHandle:focus-visible {
  outline: 2px solid var(--vscode-focusBorder, rgba(255, 255, 255, 0.45));
  outline-offset: 1px;
}
