/* Video Playback & Timeline Styles - iSurveillance VMS 4.0 */

.view-replay {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sync-play-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

.replay-body-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  height: calc(100vh - 165px);
  overflow: hidden;
}

.replay-stage-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.replay-4-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  flex: 1;
  background: #02040b;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.replay-screen-slot {
  background: #000;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.replay-screen-slot.active {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

.replay-video-canvas {
  flex: 1;
  position: relative;
}

.timeline-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 12px;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  letter-spacing: 2px;
  white-space: nowrap;
  pointer-events: none;
}

.stream-state {
  font-size: 8px;
  font-weight: bold;
}

.font-glow-green { color: var(--green); text-shadow: 0 0 5px var(--green-glow); }
.font-glow-cyan { color: var(--primary); text-shadow: 0 0 8px var(--primary-glow); }

/* GPU timeline */
.gpu-timeline-container {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(0, 242, 254, 0.08);
  border-radius: 4px;
  padding: 10px 15px;
}

.time-rulers-row {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 6px;
}

.timeline-slider-wrapper {
  position: relative;
  height: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  margin-bottom: 8px;
}

.timeline-scrubber {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  accent-color: var(--primary);
  cursor: pointer;
  -webkit-appearance: none;
}

.timeline-scrubber::-webkit-slider-runnable-track {
  background: transparent;
}

.timeline-track-alerts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.alert-mark {
  position: absolute;
  width: 4px;
  height: 100%;
  opacity: 0.6;
}
.alert-mark.red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.alert-mark.orange { background: var(--amber); box-shadow: 0 0 6px var(--amber); }

.timeline-current-time {
  font-size: 11px;
  text-align: center;
  color: rgba(255,255,255,0.6);
}

.primary-text {
  font-weight: bold;
}

/* Playback Control bar */
.playback-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(14, 21, 46, 0.4);
  padding: 8px 15px;
  border-radius: 4px;
  border: 1px solid var(--border-glass);
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-label {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
}

.play-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.play-btn:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--primary);
  color: #fff;
}

.play-btn.active-g {
  background: var(--green);
  color: #070b19;
  border-color: var(--green);
  font-weight: 700;
  box-shadow: 0 0 10px var(--green-glow);
}

/* Replay Sidebar */
.replay-sidebar-section {
  padding: 15px;
  display: flex;
  flex-direction: column;
  background: rgba(14, 21, 46, 0.5);
  overflow-y: auto;
}

.search-params-box {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 12px;
}

.param-row {
  margin-bottom: 10px;
}

.param-row.double {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field span {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}

.input-ctrl {
  background: rgba(7, 11, 25, 0.9);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 3px;
  padding: 6px;
  font-size: 11px;
}

.btn-primary-large {
  width: 100%;
  background: var(--primary);
  color: #070b19;
  border: none;
  font-weight: bold;
  padding: 8px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-glow);
  transition: all 0.2s;
}

.btn-primary-large:hover {
  transform: translateY(-1px);
}

.btn-primary-large.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Export progress */
.export-progress-bar-container {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.export-progress-bar-fill {
  height: 100%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  width: 0%;
  transition: width 0.3s;
}

.export-settings-box {
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(0, 242, 254, 0.05);
  border-radius: 4px;
  padding: 12px;
}

.export-desc {
  font-size: 9px;
  color: rgba(255,255,255,0.35);
  line-height: 1.4;
  margin-bottom: 8px;
}
