/* The video editor (pages/video-editor.js), inside the editors' frame (editors.css).
   The phone draws the same: components/editors/VideoEditor.tsx. */

.ve .ed-stage { display: block; }
.ve-frame { position: absolute; inset: 0; }
.ve-video {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #000; border-radius: 6px; cursor: pointer;
  transition: transform 240ms cubic-bezier(.2, .9, .3, 1.15), width 200ms ease, height 200ms ease;
}
.ve-playbig {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.55); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 2; transition: transform 120ms ease-out;
}
.ve-playbig svg { width: 30px; height: 30px; fill: #fff; stroke: none; margin-left: 4px; }
.ve-playbig:active { transform: scale(0.94); }
.ve-time {
  /* Under the video, in the stage's foot (video-editor.js fit keeps that band clear), never on the picture. */
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 7px; z-index: 2; height: 30px; padding: 0 10px; border-radius: 15px;
  background: rgba(0,0,0,0.6); color: var(--ed-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; pointer-events: none;
}
.ve-msg {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 24px; text-align: center; background: rgba(11,11,12,0.86);
}
.ve-msg-title { font-size: 18px; font-weight: 800; }
.ve-msg-line { color: var(--ed-dim); font-size: 14px; max-width: 320px; }

/* the export, over the video */
.ve-export { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; background: rgba(11,11,12,0.72); }
.ve-export-card {
  width: min(320px, calc(100% - 40px)); display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px; border-radius: 22px; background: var(--ed-raised); border: 1px solid var(--ed-border); box-shadow: 0 5px 0 rgba(255,255,255,0.08);
  animation: ed-pop 220ms cubic-bezier(.2,.9,.3,1.3);
}
.ve-export-words { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.ve-export-track { width: 100%; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.12); overflow: hidden; }
.ve-export-fill { height: 100%; border-radius: 4px; background: var(--ed-c); transition: width 600ms ease; }

/* the panel */
.ve-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding-bottom: 8px; }
.ve-center { justify-content: center; flex-wrap: wrap; }
.ve-play svg { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.ve-words { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.ve-tag { font-size: 13px; font-weight: 700; color: var(--ed-dim); padding: 4px 8px; border-radius: 10px; background: var(--ed-raised); border: 1px solid var(--ed-border); white-space: nowrap; }
.ve-tag.cut { color: #FFD0DB; border-color: rgba(255,79,123,0.5); }
.ve-tag:empty { display: none; }
.ve-len { font-size: 15px; font-weight: 800; color: #CDBBFF; font-variant-numeric: tabular-nums; }
.ve-cutbtn.arc-candy { min-height: 42px; padding: 0 16px; font-size: 15px; margin-bottom: 5px; }
.ve-cutbtn svg { width: 18px; height: 18px; stroke-width: 40; }
.ve-cuts { padding-top: 10px; }
.ve-cutchip { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.ve-cutchip svg { width: 16px; height: 16px; stroke-width: 44; color: var(--ed-dim); }
.ve-speed { min-width: 58px; font-variant-numeric: tabular-nums; }
.ve-mute { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; }
.ve-mute svg { width: 20px; height: 20px; }
.ve-mute.on { background: var(--ed-ink); color: var(--ed-stage); }
.ve-mute:disabled { opacity: 0.45; cursor: default; }

/* the timeline: frames, the part kept, what is cut, the handles, the playhead */
.ve-tl {
  position: relative; height: 56px; margin: 4px 22px 12px; border-radius: 10px; touch-action: none; cursor: pointer;
  user-select: none; -webkit-user-select: none;
}
.ve-strip { position: absolute; inset: 0; border-radius: 10px; background: #222 var(--strip) center / 100% 100% no-repeat; }
.ve-dim { position: absolute; top: 0; bottom: 0; background: rgba(11,11,12,0.72); }
.ve-dim:first-of-type { border-radius: 10px 0 0 10px; }
.ve-keep { position: absolute; top: -3px; bottom: -3px; border: 3px solid var(--ed-c); border-radius: 10px; pointer-events: none; box-sizing: border-box; }
.ve-cutband {
  position: absolute; top: 0; bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255,79,123,0.78) 0 6px, rgba(11,11,12,0.78) 6px 12px);
}
.ve-sel { position: absolute; top: -3px; bottom: -3px; border: 3px solid #FF4F7B; background: rgba(255,79,123,0.22); border-radius: 8px; pointer-events: none; box-sizing: border-box; }
.ve-h {
  position: absolute; top: -8px; bottom: -8px; width: 44px; margin-left: -22px; z-index: 2; cursor: ew-resize;
  display: flex; align-items: center; justify-content: center; outline: none;
}
.ve-grip { width: 16px; height: 100%; border-radius: 8px; background: var(--ed-c); box-shadow: 0 2px 0 rgba(0,0,0,0.35); position: relative; }
.ve-grip::after { content: ''; position: absolute; left: 6px; right: 6px; top: 35%; bottom: 35%; border-radius: 2px; background: rgba(255,255,255,0.85); }
.ve-h.cut .ve-grip { background: #FF4F7B; }
.ve-h:focus-visible .ve-grip { outline: 2px solid #fff; outline-offset: 2px; }
.ve-ph { position: absolute; top: -10px; bottom: -10px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.4); pointer-events: none; z-index: 1; }

@media (min-width: 761px) {
  .ve .ed-panel { padding-left: max(12px, calc(50% - 380px)); padding-right: max(12px, calc(50% - 380px)); }
}
@media (prefers-reduced-motion: reduce) {
  .ve-video, .ve-export-fill { transition: none; }
  .ve-export-card { animation: none; }
}

