/**
 * Online Video Crop — editor UI (extends online-video-converter theme)
 * Scope: .online-video-crop-page
 */

.online-video-crop-page {
  --ovcr-teal: #07D2B8;
}

.online-video-crop-page .ovcr-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-crop-page .ovcr-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-crop-page .ovcr-dropzone:hover,
.online-video-crop-page .ovcr-dropzone:focus-visible {
  border-color: rgba(7, 210, 184, 0.65);
  background: #f0fdfa;
}

.online-video-crop-page .ovcr-dropzone.ovcr-dropzone-active {
  border-color: var(--ovcr-teal);
  border-style: solid;
  background: rgba(7, 210, 184, 0.06);
}

.online-video-crop-page .ovcr-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(--ovcr-teal);
  background: rgba(7, 210, 184, 0.12);
}

/* 预览 + 控制条一体，直角不裁切画面 */
.online-video-crop-page .ovcr-media-stage {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0f172a;
  overflow: hidden;
}

.online-video-crop-page .ovcr-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(56vh, 520px);
  background: #0f172a;
  border-radius: 0;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.online-video-crop-page .ovcr-preview-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  border-radius: 0;
  background: #000;
}

.online-video-crop-page .ovcr-preview-wrap.ovcr-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;
  letter-spacing: 0.02em;
  pointer-events: auto;
  cursor: not-allowed;
}

.online-video-crop-page .ovcr-export-shield {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.32);
  cursor: not-allowed;
}

.online-video-crop-page .ovcr-media-stage.ovcr-is-exporting .ovcr-export-shield {
  display: block;
}

.online-video-crop-page .ovcr-media-stage.ovcr-is-exporting .ovcr-player-bar,
.online-video-crop-page .ovcr-media-stage.ovcr-is-exporting .ovcr-crop-box {
  pointer-events: none;
}

.online-video-crop-page .ovcr-preview-wrap.ovcr-is-exporting .ovcr-crop-layer {
  opacity: 0.35;
}

.online-video-crop-page .ovcr-crop-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.online-video-crop-page .ovcr-crop-shade {
  position: absolute;
  background: rgba(15, 23, 42, 0.55);
  pointer-events: none;
}

.online-video-crop-page .ovcr-crop-box {
  position: absolute;
  border: 2px solid var(--ovcr-teal);
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
  cursor: move;
  pointer-events: auto;
  box-sizing: border-box;
}

.online-video-crop-page .ovcr-crop-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.online-video-crop-page .ovcr-crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid var(--ovcr-teal);
  border-radius: 2px;
  pointer-events: auto;
  z-index: 2;
}

.online-video-crop-page .ovcr-crop-handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.online-video-crop-page .ovcr-crop-handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.online-video-crop-page .ovcr-crop-handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.online-video-crop-page .ovcr-crop-handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.online-video-crop-page .ovcr-crop-handle-n { top: -6px; left: 50%; margin-left: -6px; cursor: ns-resize; }
.online-video-crop-page .ovcr-crop-handle-s { bottom: -6px; left: 50%; margin-left: -6px; cursor: ns-resize; }
.online-video-crop-page .ovcr-crop-handle-w { left: -6px; top: 50%; margin-top: -6px; cursor: ew-resize; }
.online-video-crop-page .ovcr-crop-handle-e { right: -6px; top: 50%; margin-top: -6px; cursor: ew-resize; }

.online-video-crop-page .ovcr-player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 0;
  padding: 0.7rem 0.85rem;
  background: #1e293b;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0;
}

.online-video-crop-page .ovcr-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: none;
  background: var(--ovcr-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.15s;
}

.online-video-crop-page .ovcr-play-btn:hover {
  background: #06bda6;
}

.online-video-crop-page .ovcr-play-btn:active {
  opacity: 0.88;
}

.online-video-crop-page .ovcr-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  min-width: 6.75rem;
  flex-shrink: 0;
}

.online-video-crop-page .ovcr-time-sep {
  color: #94a3b8;
  margin: 0 0.2rem;
}

.online-video-crop-page .ovcr-seek-wrap {
  flex: 1 1 160px;
  min-width: 120px;
}

.online-video-crop-page .ovcr-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 108px;
  flex: 0 1 132px;
}

.online-video-crop-page .ovcr-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;
  flex-shrink: 0;
  border-radius: 4px;
  cursor: pointer;
}

.online-video-crop-page .ovcr-volume-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* 自定义 range：进度 / 音量 */
.online-video-crop-page .ovcr-range-track {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
  width: 100%;
}

.online-video-crop-page .ovcr-range-track--volume {
  max-width: 96px;
}

.online-video-crop-page .ovcr-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.online-video-crop-page .ovcr-range:focus {
  outline: none;
}

.online-video-crop-page .ovcr-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(7, 210, 184, 0.45);
}

.online-video-crop-page .ovcr-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--ovcr-teal) 0%,
    var(--ovcr-teal) var(--ovcr-range-pct, 0%),
    rgba(148, 163, 184, 0.45) var(--ovcr-range-pct, 0%),
    rgba(148, 163, 184, 0.45) 100%
  );
}

.online-video-crop-page .ovcr-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ovcr-teal);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.online-video-crop-page .ovcr-range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.45);
}

.online-video-crop-page .ovcr-range::-moz-range-progress {
  height: 4px;
  border-radius: 2px 0 0 2px;
  background: var(--ovcr-teal);
}

.online-video-crop-page .ovcr-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ovcr-teal);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.online-video-crop-page .ovcr-sidebar {
  margin-top: 1rem;
}

.online-video-crop-page .ovcr-sidebar.ovc-settings-locked .ovc-label {
  color: #94a3b8;
}

.online-video-crop-page .ovcr-sidebar.ovc-settings-locked .ovc-select-shell .ovc-select:disabled {
  background-color: #eef2f6;
  color: #64748b;
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
}

.online-video-crop-page .ovcr-export-bar {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.online-video-crop-page .ovcr-export-progress {
  margin-bottom: 0.75rem;
}

.online-video-crop-page .ovcr-export-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.online-video-crop-page .ovcr-export-progress-meta span:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--ovcr-teal);
}

.online-video-crop-page .ovcr-export-progress-bar {
  height: 8px;
  background: rgba(148, 163, 184, 0.28);
  border-radius: 4px;
  overflow: hidden;
}

.online-video-crop-page .ovcr-export-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #07D2B8, #3be0c8);
  border-radius: 4px;
  transition: none;
}

.online-video-crop-page .ovcr-export-progress.is-smooth .ovcr-export-progress-fill {
  transition: width 0.35s ease;
}

.online-video-crop-page .ovcr-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.online-video-crop-page .ovcr-filename {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .online-video-crop-page .ovcr-player-bar {
    gap: 0.55rem 0.65rem;
  }

  .online-video-crop-page .ovcr-seek-wrap {
    flex: 1 1 100%;
    order: 3;
  }

  .online-video-crop-page .ovcr-volume-wrap {
    margin-left: auto;
    order: 2;
  }
}
