/* THE EDIT ROOM -- CROP & EDIT ON THE VIEWER ITSELF (js/edit-viewer-crop.js).
   Simon, 4 Nov 2026: "it should have all the crop buttons and different
   settings at the top of the actual viewer panel when in edit view."

   The Edit tool's own room (#cvmod, js/cropvid.js) marked .ev-inviewer has
   no box of its own here (display: contents) and three of its pieces are
   placed by js/edit-viewer-crop.js, position: fixed, over this room's own
   boxes: its head over the bar along the top of the viewer (#ev-vbar), its
   picture over the viewer's picture (.nle-stage), its crops-and-edits column
   over the always-on panel's body (#ev-body). Everything else of it -- its
   transport, its lanes, its gallery dock, its close, full screen and recent
   sessions -- is put away: the clip's time is the main timeline's. Outside
   the Edit room none of this applies and the room is exactly as it was. */

#ev-vbar { display: none; }
html.desktop.nle-on.ev-on #ev-vbar {
  display: flex; flex: none; align-items: stretch;
  height: 34px; box-sizing: border-box; position: relative; z-index: 2;
  background: #0a0a0c; border-bottom: 1px solid rgba(255, 255, 255, .05);
}
#ev-vbar .ev-vbar-slot { flex: 1 1 auto; min-width: 0; }
#ev-vbar .ev-vbar-r {
  flex: 0 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 42%;
  padding: 0 8px 0 10px; border-left: 1px solid rgba(255, 255, 255, .05);
}
#ev-vbar .ev-vbar-clip {
  min-width: 0; font-size: 11px; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#ev-vbar .ev-vbar-go {
  flex: none; height: 24px; padding: 0 10px; border-radius: 5px; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--border); background: transparent; color: var(--text);
}
#ev-vbar .ev-vbar-go:hover:not(:disabled) { border-color: var(--tool-edit, #4fd1c5); color: var(--tool-edit, #4fd1c5); }
#ev-vbar .ev-vbar-go.on { border-color: var(--tool-edit, #4fd1c5); color: var(--tool-edit, #4fd1c5); }
#ev-vbar .ev-vbar-go:disabled { opacity: .45; cursor: default; }

/* ---------- the Edit tool, in pieces ---------- */
html.ev-on #cvmod.ev-inviewer:not(.hidden) { display: contents !important; }
html.ev-on #cvmod.ev-inviewer .cv-body,
html.ev-on #cvmod.ev-inviewer .cv-viewcol { display: contents !important; }
html.ev-on #cvmod.ev-inviewer .cv-time,
html.ev-on #cvmod.ev-inviewer .cv-lanesrz,
html.ev-on #cvmod.ev-inviewer .cv-lanes,
html.ev-on #cvmod.ev-inviewer .cv-foot,
html.ev-on #cvmod.ev-inviewer #cv-galdock,
html.ev-on #cvmod.ev-inviewer #cv-galbtn,
html.ev-on #cvmod.ev-inviewer #cv-close,
html.ev-on #cvmod.ev-inviewer #cv-fs,
html.ev-on #cvmod.ev-inviewer #cv-recent,
html.ev-on #cvmod.ev-inviewer #cv-rowsrz,
html.ev-on #cvmod.ev-inviewer #cv-empty { display: none !important; }

/* The head: the bar's tools. */
html.ev-on #cvmod.ev-inviewer .cv-head {
  position: fixed; z-index: 30; margin: 0; box-sizing: border-box; min-height: 34px;
  border-bottom: 0; background: transparent;
}
/* The picture: over the viewer's own, only while the crop is up on the clip under the playhead and the cut is not
   playing (html.ev-cvon). Hidden by visibility, not display, so it keeps its size and its picture between times. */
html.ev-on #cvmod.ev-inviewer #cv-stage { position: fixed; z-index: 29; visibility: hidden; pointer-events: none; min-width: 0; }
html.ev-on.ev-cvon #cvmod.ev-inviewer #cv-stage { visibility: visible; pointer-events: auto; }
/* The column: in the panel while the panel's view is the crop's (html.ev-cvrows), and there is something to list. */
html.ev-on #cvmod.ev-inviewer #cv-rows { position: fixed; z-index: 41; display: none !important; min-width: 0; border-left: 0; animation: none; }
html.ev-on.ev-cvrows #cvmod.ev-inviewer:not(.cv-nopanel) #cv-rows:not(.hidden) { display: flex !important; }
