/**
 * Shot strip (镜头轨) above timeline — local / website / Eagle only.
 * Height is taken from inside .workspace-transport-stack (--workspace-timeline-h),
 * so the program monitor is not squeezed when the strip opens.
 */

:root {
  --shot-filmstrip-h: 52px;
}

/* Inpage / mirrored shell: never show chrome or strip */
html.cutgo-inpage-shell #shotFilmstrip,
html.cutgo-inpage-shell #btn-shot-filmstrip,
html.cutgo-inpage-shell .shot-filmstrip {
  display: none !important;
}

#btn-shot-filmstrip[hidden] {
  display: none !important;
}

.shot-filmstrip {
  position: relative;
  flex: 0 0 var(--shot-filmstrip-h, 52px);
  height: var(--shot-filmstrip-h, 52px);
  min-height: var(--shot-filmstrip-h, 52px);
  max-height: var(--shot-filmstrip-h, 52px);
  display: none;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--cg-line, rgba(255, 255, 255, 0.09));
  border-bottom: 0;
  border-radius: var(--cg-radius-md, 7px) var(--cg-radius-md, 7px) 0 0;
  background: linear-gradient(180deg, #171a14, #121410);
  overflow: hidden;
  box-sizing: border-box;
}

html.shot-filmstrip-on .shot-filmstrip,
.workspace-transport-stack.shot-filmstrip-on > .shot-filmstrip {
  display: flex;
}

/* When strip is on, timeline module loses top radius so the stack reads as one card */
html.shot-filmstrip-on .workspace-transport-stack > .timeline-module {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Close floats over thumbs — no dedicated header row */
.shot-filmstrip-close {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 20;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  padding: 0;
  cursor: pointer;
  color: rgba(245, 245, 247, 0.88);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.shot-filmstrip-close:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
}

.shot-filmstrip-scroller {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 3px 24px 3px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.shot-filmstrip-scroller[hidden] {
  display: none !important;
}

.shot-filmstrip-scroller::-webkit-scrollbar {
  height: 3px;
}

.shot-filmstrip-scroller::-webkit-scrollbar-track {
  background: transparent;
}

.shot-filmstrip-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.shot-filmstrip-scroller::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.shot-filmstrip-empty {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  padding: 0 28px 0 12px;
  font-size: 11px;
  color: var(--cg-muted, rgba(142, 142, 147, 0.85));
}

.shot-filmstrip-empty[hidden] {
  display: none !important;
}

.shot-filmstrip-cell {
  position: relative;
  flex: 0 0 auto;
  width: calc((var(--shot-filmstrip-h, 52px) - 10px) * 16 / 9);
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #2a2a2e;
  color: inherit;
}

.shot-filmstrip-cell .shot-filmstrip-thumb-wrap.shot-thumb-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: inherit;
  background: #000;
}

.shot-filmstrip-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.shot-filmstrip-cell .shot-hover-video {
  z-index: 10;
}

.shot-filmstrip-cell.is-placeholder {
  background: linear-gradient(135deg, #2a3320, #1a2014);
}

.shot-filmstrip-cell:hover {
  border-color: rgba(163, 230, 53, 0.45);
}

.shot-filmstrip-cell.is-selected {
  border-color: rgba(10, 132, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.45);
}

/* Match bin: playhead follow = soft brand wash; sequence = accent blue */
.shot-filmstrip-cell.is-playback:not(.is-selected):not(.seq-playing) {
  border-color: rgba(163, 230, 53, 0.45);
  box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.28);
}

.shot-filmstrip-cell.seq-playing {
  border-color: rgba(10, 132, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.45);
}

.shot-filmstrip-idx {
  position: absolute;
  top: 3px;
  left: 4px;
  z-index: 12;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.shot-filmstrip-meta {
  position: absolute;
  left: 4px;
  bottom: 3px;
  z-index: 12;
  font-size: 9px;
  font-family: var(--cg-font-timecode, ui-monospace, monospace);
  color: #ffd60a;
  background: rgba(0, 0, 0, 0.55);
  padding: 1px 4px;
  border-radius: 3px;
  pointer-events: none;
}
