/*
 * Copyright 2026 DoorDash, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.clip {
  margin: 1.25em 0 1.5em;
  max-width: 780px;
}
.clip audio {
  display: block;
  width: 100%;
}
.clip-link {
  display: block;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #57606a;
  margin-top: 2px;
  word-break: break-all;
}

/* Customer transcript band above the audio. */
.clip-transcript-customer {
  position: relative;
  height: 80px;
  margin: 0 60px 4px 130px;
  overflow: visible;
}
.clip-transcript-customer .clip-turn {
  position: absolute;
  bottom: 0;
  transform: rotate(-15deg);
  transform-origin: 0 100%;
  white-space: nowrap;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 1px 5px;
  border-radius: 2px;
  line-height: 1.3;
  background: rgba(243, 232, 255, 0.85);
  border-left: 2px solid #6f42c1;
  color: #44337a;
}

/* Single integrated zone below audio. Top→bottom inside this box:
   - dashed axis line (border-top)
   - arrows ▲ pointing up at the axis
   - agent transcript (rotated 30°), overlapping the connector lines
   - tool-call labels, staggered with extra vertical spacing
   Connector lines run from each arrow down to its label, layered BEHIND
   the transcript and labels via z-index. */
.clip-timeline {
  position: relative;
  height: 320px;
  margin: 4px 60px 0 130px;
  border-top: 1px dashed #cbd5e0;
  padding-top: 2px;
}

.clip-arrow {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  color: #157878;
  font-size: 14px;
  line-height: 1;
  font-weight: bold;
  z-index: 3;
}

.clip-event-line {
  position: absolute;
  top: 18px;
  width: 1px;
  height: calc(114px + var(--row, 0) * 40px);
  background: #157878;
  transform: translateX(-50%);
  z-index: 1;
}

.clip-call {
  position: absolute;
  top: calc(132px + var(--row, 0) * 40px);
  transform: translateX(-50%);
  display: inline-block;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #24292f;
  white-space: nowrap;
  z-index: 3;
}

.clip-transcript-agent {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 110px;
  z-index: 2;
  overflow: visible;
}
.clip-transcript-agent .clip-turn {
  position: absolute;
  top: 0;
  transform: rotate(15deg);
  transform-origin: 0 0;
  white-space: nowrap;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 1px 5px;
  border-radius: 2px;
  line-height: 1.3;
  background: rgba(221, 240, 255, 0.85);
  border-left: 2px solid #0969da;
  color: #0a3069;
}
