/**
 * Online Video Cutter — editor UI (extends online-video-converter theme)
 */

.online-video-cutter-page {
  --ovct-teal: #07D2B8;
}

.online-video-cutter-page .ovct-editor-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 1.25rem;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.07);
}

.online-video-cutter-page .ovct-dropzone {
  border: 2px dashed rgba(148, 163, 184, 0.55);
  border-radius: 16px;
  padding: 2.25rem 1.25rem 1.85rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fafcfd;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.online-video-cutter-page .ovct-dropzone:hover,
.online-video-cutter-page .ovct-dropzone:focus-visible {
  border-color: rgba(7, 210, 184, 0.65);
  background: #f0fdfa;
}

.online-video-cutter-page .ovct-dropzone.ovct-dropzone-active {
  border-color: var(--ovct-teal);
  border-style: solid;
  background: rgba(7, 210, 184, 0.06);
}

.online-video-cutter-page .ovct-dropzone-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  color: var(--ovct-teal);
  background: rgba(7, 210, 184, 0.12);
}

.online-video-cutter-page .ovct-media-stage {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0f172a;
  overflow: hidden;
}

.online-video-cutter-page .ovct-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(52vh, 480px);
  background: #0f172a;
  overflow: hidden;
  user-select: none;
}

.online-video-cutter-page .ovct-preview-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  background: #000;
}

.online-video-cutter-page .ovct-export-shield {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.32);
  cursor: not-allowed;
}

.online-video-cutter-page .ovct-media-stage.ovct-is-exporting .ovct-export-shield {
  display: block;
}

.online-video-cutter-page .ovct-media-stage.ovct-is-exporting .ovct-player-bar,
.online-video-cutter-page .ovct-media-stage.ovct-is-exporting .ovct-timeline {
  pointer-events: none;
  opacity: 0.55;
}

.online-video-cutter-page .ovct-preview-wrap.ovct-is-exporting::after {
  content: "Exporting…";
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 600;
  pointer-events: auto;
  cursor: not-allowed;
}

.online-video-cutter-page .ovct-player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.7rem 0.85rem;
  background: #1e293b;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.online-video-cutter-page .ovct-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: none;
  background: var(--ovct-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.online-video-cutter-page .ovct-play-btn:hover {
  background: #06bda6;
}

.online-video-cutter-page .ovct-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  min-width: 6.75rem;
  flex-shrink: 0;
}

.online-video-cutter-page .ovct-time-sep {
  color: #94a3b8;
  margin: 0 0.2rem;
}

.online-video-cutter-page .ovct-seek-wrap {
  flex: 1 1 160px;
  min-width: 120px;
}

.online-video-cutter-page .ovct-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 108px;
  flex: 0 1 132px;
}

.online-video-cutter-page .ovct-volume-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.online-video-cutter-page .ovct-volume-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.online-video-cutter-page .ovct-range-track {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
  width: 100%;
}

.online-video-cutter-page .ovct-range-track--volume {
  max-width: 96px;
}

.online-video-cutter-page .ovct-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.online-video-cutter-page .ovct-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--ovct-teal) 0%,
    var(--ovct-teal) var(--ovct-range-pct, 0%),
    rgba(148, 163, 184, 0.45) var(--ovct-range-pct, 0%),
    rgba(148, 163, 184, 0.45) 100%
  );
}

.online-video-cutter-page .ovct-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ovct-teal);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.online-video-cutter-page .ovct-range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.45);
}

.online-video-cutter-page .ovct-range::-moz-range-progress {
  height: 4px;
  border-radius: 2px 0 0 2px;
  background: var(--ovct-teal);
}

.online-video-cutter-page .ovct-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ovct-teal);
}

/* Timeline + thumbnails */
.online-video-cutter-page .ovct-timeline {
  background: #0f172a;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.65rem 0.75rem 0.85rem;
}

.online-video-cutter-page .ovct-timeline-inner {
  position: relative;
  padding: 0 5px 8px;
  overflow: visible;
}

/* Single rail: thumbnails + trim overlay share exact same box */
.online-video-cutter-page .ovct-rail {
  position: relative;
  height: 48px;
  margin-top: 20px;
}

.online-video-cutter-page .ovct-thumbs {
  position: absolute;
  inset: 0;
  background: #1e293b;
  border-radius: 6px;
  overflow: hidden;
}

.online-video-cutter-page .ovct-thumbs-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.online-video-cutter-page .ovct-thumbs-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.online-video-cutter-page .ovct-thumbs-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.78rem;
  color: #94a3b8;
}

.online-video-cutter-page .ovct-trim-track {
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  z-index: 2;
}

.online-video-cutter-page .ovct-trim-shade {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.62);
  pointer-events: none;
  z-index: 2;
  transition: width 0.05s linear;
}

.online-video-cutter-page .ovct-trim-track--dragging .ovct-trim-shade {
  transition: none;
}

.online-video-cutter-page .ovct-trim-shade--left {
  left: 0;
}

.online-video-cutter-page .ovct-trim-shade--right {
  right: 0;
}

/* Frame selection: top/bottom bars + edge handles (reference layout, teal palette) */
.online-video-cutter-page .ovct-trim-range {
  position: absolute;
  top: 0;
  bottom: 0;
  background: transparent;
  cursor: grab;
  z-index: 3;
  box-sizing: border-box;
  transition: left 0.05s linear, width 0.05s linear;
  overflow: visible;
}

.online-video-cutter-page .ovct-trim-range::before,
.online-video-cutter-page .ovct-trim-range::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ovct-teal);
  pointer-events: none;
  z-index: 2;
}

.online-video-cutter-page .ovct-trim-range::before {
  top: 0;
}

.online-video-cutter-page .ovct-trim-range::after {
  bottom: 0;
}

.online-video-cutter-page .ovct-trim-track--dragging .ovct-trim-range {
  transition: none;
}

.online-video-cutter-page .ovct-trim-range:active {
  cursor: grabbing;
}

.online-video-cutter-page .ovct-trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  padding: 0;
  border: none;
  background: var(--ovct-teal);
  border-radius: 3px;
  cursor: ew-resize;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.online-video-cutter-page .ovct-trim-handle--in {
  left: -5px;
  transform: none;
}

.online-video-cutter-page .ovct-trim-handle--out {
  right: -5px;
  left: auto;
  transform: none;
}

.online-video-cutter-page .ovct-trim-handle-grip {
  display: block;
  width: 2px;
  height: 18px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.online-video-cutter-page .ovct-trim-handle:hover {
  background: #06c4ad;
}

.online-video-cutter-page .ovct-trim-track--dragging .ovct-trim-handle {
  background: #06c4ad;
}

.online-video-cutter-page .ovct-trim-track--dragging .ovct-trim-range::before,
.online-video-cutter-page .ovct-trim-track--dragging .ovct-trim-range::after {
  background: #06c4ad;
}

.online-video-cutter-page .ovct-playhead {
  position: absolute;
  top: -14px;
  bottom: -6px;
  left: 0;
  width: 10px;
  margin-left: -5px;
  pointer-events: none;
  z-index: 6;
}

.online-video-cutter-page .ovct-playhead-svg {
  display: block;
  width: 10px;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.online-video-cutter-page .ovct-playhead-knob,
.online-video-cutter-page .ovct-playhead-line {
  fill: #fff;
}

.online-video-cutter-page .ovct-trim-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}

.online-video-cutter-page .ovct-trim-time {
  font-weight: 700;
  color: #e2e8f0;
  min-width: 3.25rem;
}

.online-video-cutter-page .ovct-trim-hint {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-video-cutter-page .ovct-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.online-video-cutter-page .ovct-filename {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-video-cutter-page .ovct-sidebar {
  margin-top: 1rem;
}

.online-video-cutter-page .ovct-sidebar.ovc-settings-locked .ovc-label {
  color: #94a3b8;
}

.online-video-cutter-page .ovct-sidebar.ovc-settings-locked .ovc-select-shell .ovc-select:disabled {
  background-color: #eef2f6;
  color: #64748b;
  cursor: not-allowed;
}

.online-video-cutter-page .ovct-selection {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(7, 210, 184, 0.22);
  background: linear-gradient(135deg, rgba(7, 210, 184, 0.06) 0%, rgba(7, 210, 184, 0.02) 100%);
}

.online-video-cutter-page .ovct-selection-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 0.65rem;
}

.online-video-cutter-page .ovct-selection-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f766e;
  background: rgba(7, 210, 184, 0.14);
  border: 1px solid rgba(7, 210, 184, 0.28);
  white-space: nowrap;
}

.online-video-cutter-page .ovct-selection-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 0.75rem;
}

.online-video-cutter-page .ovct-selection-point {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.online-video-cutter-page .ovct-selection-point--end {
  align-items: flex-end;
  text-align: right;
}

.online-video-cutter-page .ovct-selection-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
}

.online-video-cutter-page .ovct-selection-value {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.2;
}

.online-video-cutter-page .ovct-selection-track {
  position: relative;
  height: 6px;
  margin-top: 0.85rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.online-video-cutter-page .ovct-selection-range {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ovct-teal) 0%, #06bda6 100%);
  box-shadow: 0 0 0 1px rgba(7, 210, 184, 0.35);
  transition: left 0.08s ease, width 0.08s ease;
}

.online-video-cutter-page .ovct-sidebar.ovc-settings-locked .ovct-selection {
  opacity: 0.72;
  pointer-events: none;
}

.online-video-cutter-page .ovct-meta {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0.5rem 0 0;
}

.online-video-cutter-page .ovct-export-bar {
  margin-top: 1rem;
}

.online-video-cutter-page .ovct-export-progress {
  margin-bottom: 0.75rem;
}

.online-video-cutter-page .ovct-export-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

.online-video-cutter-page .ovct-export-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.online-video-cutter-page .ovct-export-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--ovct-teal);
  border-radius: 999px;
  transition: width 0.25s ease;
}

@media (max-width: 575.98px) {
  .online-video-cutter-page .ovct-volume-wrap {
    display: none;
  }

  .online-video-cutter-page .ovct-trim-hint {
    display: none;
  }
}
