/* The Arranger's clips and playhead. Split out of css/arranger.css along
   its own section banners. */
/* ---------- Clips ---------- */

.arr-clip {
  position: absolute;
  top: 3px;
  bottom: 3px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(var(--c-rgb), 0.85);
  border-radius: 5px;
  background: rgba(var(--c-rgb), 0.1);
  cursor: pointer;
  transition: filter 0.1s, box-shadow 0.1s;
}

.arr-clip:hover {
  filter: brightness(1.18);
}

/* Picked up. It rides on the canvas rather than in a lane while it moves, so it
   can cross tracks, and it stops taking pointer events so the lane underneath
   is what the drop asks for. */
.arr-clip.is-dragging {
  bottom: auto;
  z-index: 8;
  cursor: grabbing;
  pointer-events: none;
  filter: brightness(1.12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

/* The track the clip would land on. */
.arr-lane.is-drop-target {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.arr-clip.is-selected {
  box-shadow: 0 0 0 1.5px #ffffff, 0 4px 14px rgba(0, 0, 0, 0.55);
}

.arr-clip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 6px;
  background: var(--c-band);
  border-bottom: 1px solid rgba(var(--c-rgb), 0.85);
  flex-shrink: 0;
}

.arr-clip-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-text);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
}

.arr-clip-more {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.arr-clip-body {
  flex: 1;
  min-height: 0;
}

.arr-clip-body svg {
  display: block;
  width: 100%;
  height: 100%;
}

.arr-prev-svg {
  fill: currentColor;
  color: rgba(var(--c-rgb), 0.9);
}

.arr-prev-line {
  fill: currentColor;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Playhead ---------- */

.arr-playhead {
  position: absolute;
  top: var(--arr-ruler-h);
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 1px;
  border-left: 1px dashed rgba(255, 255, 255, 0.6);
  pointer-events: none;
  will-change: transform;
}

/* Held for the length of a drag, so the pointer stays a hand over whatever it
   happens to be passing. */
body.is-moving-clip,
body.is-moving-clip * {
  cursor: grabbing !important;
}
