/* Archive Editor modal — timeline, segments, keyframe ticks, file browser. */

.archive-editor-modal .modal-body {
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.archive-editor-modal video {
  width: 100%;
  max-height: 46vh;
  background: #000;
  border-radius: 0.375rem;
}

.archive-editor-transport {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: #adb5bd;
  margin: 0.5rem 0 0.25rem;
}

.archive-editor-transport .archive-editor-kf-info {
  margin-left: auto;
  font-size: 0.75rem;
}

.archive-editor-source-meta {
  font-size: 0.78rem;
  color: #6c757d;
  margin-bottom: 0.35rem;
}

/* Timeline track */
.archive-editor-timeline {
  position: relative;
  height: 56px;
  background: #1a1e21;
  border: 1px solid #32383e;
  border-radius: 0.375rem;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.archive-editor-ticks,
.archive-editor-segments {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.archive-editor-segments {
  pointer-events: auto;
}

.archive-editor-tick {
  position: absolute;
  top: 70%;
  bottom: 0;
  width: 1px;
  background: rgba(255, 193, 7, 0.45);
}

.archive-editor-segment {
  position: absolute;
  top: 6px;
  bottom: 6px;
  background: rgba(55, 90, 127, 0.55);
  border: 1px solid #4e9fd1;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 10px;
}

.archive-editor-segment.selected {
  background: rgba(78, 159, 209, 0.55);
  border-color: #9ed1f0;
  z-index: 2;
}

.archive-editor-segment-label {
  font-size: 0.7rem;
  color: #e9ecef;
  pointer-events: none;
}

.archive-editor-handle {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 10px;
  cursor: ew-resize;
  background: #4e9fd1;
  opacity: 0.85;
}

.archive-editor-segment.selected .archive-editor-handle {
  background: #9ed1f0;
}

.archive-editor-handle-start { left: -5px; border-radius: 3px 0 0 3px; }
.archive-editor-handle-end { right: -5px; border-radius: 0 3px 3px 0; }

.archive-editor-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f8f9fa;
  pointer-events: none;
  z-index: 3;
}

/* Segment list */
.archive-editor-segment-table td {
  vertical-align: middle;
}

.archive-editor-time-group {
  min-width: 15rem;
  flex-wrap: nowrap;
}

.archive-editor-time-group .form-control {
  min-width: 6.8rem;
  font-variant-numeric: tabular-nums;
}

.archive-editor-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.archive-editor-nudge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.archive-editor-nudge .btn {
  font-variant-numeric: tabular-nums;
  min-width: 3.1rem;
}

.archive-editor-history-entry {
  border-top: 1px solid #32383e;
  padding: 0.5rem 0;
}

/* File browser */
#archiveBrowserFiles {
  max-height: 55vh;
  overflow-y: auto;
}
