/* Dev hub — Video Cut sub-mode */

.composer-topbar {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 14px;
}

.composer-tagline-canvas,
.composer-tagline-video,
.composer-tagline-chat {
  flex: 1 1 100%;
  margin: 0;
}

.composer-mode-tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.composer-mode-tab {
  padding: 6px 14px;
  border: 1px solid var(--border, #ccc);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--text, #1a1a1a);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.composer-mode-tab.active {
  background: var(--accent, #0078d4);
  color: #fff;
  border-color: var(--accent, #0078d4);
}

.composer-mode-tab--dev {
  border-style: dashed;
}

.composer-chat-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.composer-mode-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.composer-mode-panel.hidden {
  display: none !important;
}

.composer-chat-panel .archive-app.chat-app {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
}

.designer-subtopbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border, rgba(128, 128, 128, 0.25));
  background: var(--surface-muted, #eef0f4);
}

.cv-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 14px 14px;
  gap: 10px;
  overflow: hidden;
}

.cv-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .cv-compare {
    grid-template-columns: 1fr;
  }
}

.cv-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cv-feed__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #666);
}

.cv-feed--orig .cv-feed__label {
  color: #6b7280;
}

.cv-feed--edit .cv-feed__label {
  color: var(--accent, #0078d4);
}

.cv-feed__time {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
}

.cv-video {
  width: 100%;
  max-height: min(38vh, 320px);
  background: #0a0a0a;
  border-radius: 8px;
  border: 2px solid var(--border, rgba(128, 128, 128, 0.35));
}

.cv-canvas {
  display: block;
  object-fit: contain;
}

.cv-video-engine {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
  top: 0;
}

.cv-feed--orig .cv-video {
  border-color: rgba(107, 114, 128, 0.5);
}

.cv-feed--edit .cv-video {
  border-color: rgba(0, 120, 212, 0.55);
}

.cv-transport,
.cv-precision {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cv-duration-label,
.cv-status {
  font-size: 13px;
  color: var(--text-muted, #666);
  margin: 0;
}

.cv-status--error {
  color: #b42318;
}

.cv-time-input {
  width: 6.5rem;
  padding: 4px 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border, #ccc);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--text, inherit);
}

.cv-sync-label,
.cv-zoom-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted, #666);
  margin-left: auto;
}

.cv-zoom-label input[type="range"] {
  width: 100px;
}

.cv-timeline-wrap {
  flex: 1 1 auto;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, rgba(128, 128, 128, 0.3));
  border-radius: 8px;
  background: var(--surface-muted, #f0f2f5);
  overflow: hidden;
}

.cv-timeline-ruler {
  height: 22px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border, rgba(128, 128, 128, 0.25));
  background: var(--surface, #fff);
  position: relative;
  overflow: hidden;
}

.cv-timeline-scroll {
  flex: 1 1 auto;
  overflow: auto;
  position: relative;
}

.cv-timeline-inner {
  position: relative;
  min-height: 88px;
  padding: 4px 0 8px;
}

.cv-track {
  display: flex;
  align-items: stretch;
  min-height: 36px;
  margin-bottom: 4px;
}

.cv-track__label {
  flex: 0 0 52px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #888);
  padding: 10px 6px 0 8px;
  letter-spacing: 0.03em;
}

.cv-track__lane {
  position: relative;
  flex: 1 1 auto;
  min-height: 32px;
  margin-right: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.04);
}

.cv-source-bar {
  position: absolute;
  top: 6px;
  height: 20px;
  left: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #9ca3af, #6b7280);
  opacity: 0.45;
  pointer-events: none;
}

.cv-clip {
  position: absolute;
  top: 4px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, #4a9eff, #0078d4);
  border: 1px solid rgba(0, 60, 120, 0.5);
  box-sizing: border-box;
  cursor: grab;
  user-select: none;
  touch-action: none;
  min-width: 6px;
}

.cv-clip--selected {
  outline: 2px solid #ffb900;
  outline-offset: 1px;
  z-index: 3;
}

.cv-clip__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  z-index: 2;
}

.cv-clip__handle--in {
  left: 0;
  border-radius: 4px 0 0 4px;
}

.cv-clip__handle--out {
  right: 0;
  border-radius: 0 4px 4px 0;
}

.cv-clip__label {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.cv-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e11d48;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.cv-playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  border: 6px solid transparent;
  border-top-color: #e11d48;
}

.cv-hint {
  flex-shrink: 0;
  margin: 0;
}

.cv-export-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.cv-export-overlay.hidden {
  display: none;
}

.cv-timeline-ruler .cv-ruler-tick {
  position: absolute;
  top: 0;
  height: 100%;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 9px;
  padding-left: 3px;
  color: var(--text-muted, #888);
  white-space: nowrap;
  pointer-events: none;
}

.cv-export-overlay__card {
  background: var(--surface, #fff);
  color: var(--text, #1a1a1a);
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  min-width: 240px;
  text-align: center;
}
