/* Loaded in workspace.html; active only when ?shell=1 (iframe inside page overlay). */
html.cutgo-inpage-shell,
html.cutgo-inpage-shell body {
  height: 100%;
  overflow: hidden;
}

html.cutgo-inpage-shell .title-bar {
  padding-left: 12px;
  padding-right: 12px;
}

html.cutgo-inpage-shell #btnImport,
html.cutgo-inpage-shell #emptyImport,
html.cutgo-inpage-shell #dropOverlay {
  display: none !important;
}

html:not(.cutgo-inpage-shell) .inpage-shell-meta,
html:not(.cutgo-inpage-shell) .inpage-shell-close {
  display: none !important;
}

html.cutgo-inpage-shell .inpage-shell-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 0;
}

html.cutgo-inpage-shell .inpage-shell-meta b {
  color: rgba(245, 245, 247, 0.92);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

html.cutgo-inpage-shell .inpage-shell-meta span {
  color: rgba(245, 245, 247, 0.52);
  font-size: 11px;
  white-space: nowrap;
}

/* Close lives in the title-bar export cluster — not a floating corner island. */
html.cutgo-inpage-shell .inpage-shell-close {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #3a3a3c;
  background: #2c2c2e;
  color: #d1d1d6;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  flex: 0 0 auto;
}

html.cutgo-inpage-shell .inpage-shell-close:hover {
  background: #3a3a3c;
  border-color: #48484a;
  color: #f5f5f7;
}

html.cutgo-inpage-shell .main-app-wrapper {
  height: calc(100% - 44px);
  padding: 10px 12px 12px;
}

/* Cross-origin iframe blocks showDirectoryPicker — hide dead「更改」controls. */
html.cutgo-inpage-shell #exportPickFolder,
html.cutgo-inpage-shell #btnSetBrowse,
html.cutgo-inpage-shell #btnBrowseFolder {
  display: none !important;
}

/* Tier-B media/audio caching is a background upgrade. Keep playback, timeline
   scrubbing, I/O marking, and shot editing interactive while it runs. */
html.cutgo-inpage-shell .loading.is-nonblocking {
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
}

html.cutgo-inpage-shell .loading.is-nonblocking > div {
  display: none;
}

/*
 * Tier A remote: keep program mirror height stable (no tip-hover inset).
 * Dashboard tips open BELOW the control bar so they are not covered by the
 * parent-page video mirror sitting over the program surface. Raise this strip
 * above .workspace-transport-stack (z-index 48) so those tips paint over the
 * timeline instead of being clipped underneath it.
 */
/*
 * Parent video mirror covers the program surface. Menus/tips that open upward
 * are painted under that mirror and look "blocked". Open downward, and let the
 * left column escape overflow:hidden so ::after tips are not clipped.
 */
html.cutgo-inpage-shell.cutgo-inpage-remote .workspace-left {
  overflow: visible !important;
}

html.cutgo-inpage-shell.cutgo-inpage-remote .workspace-left-stage-tail,
html.cutgo-inpage-shell.cutgo-inpage-remote .workspace-left-stage-tail > .dashboard,
html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .control-console,
html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .icon-group-capsule,
html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .ws-quick-export-wrap {
  overflow: visible !important;
  position: relative;
  z-index: 60;
}

html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .icon-btn[data-tooltip]::after,
html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .premium-btn[data-tooltip]::after,
html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .ws-timeline-zoom-wrap[data-tooltip]::after,
html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .ws-focus-capsule [data-tooltip]::after,
html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .ws-scopes-wrap [data-tooltip]::after,
html.cutgo-inpage-shell.cutgo-inpage-remote .dashboard .ws-quick-export-wrap [data-tooltip]::after,
html.cutgo-inpage-shell.cutgo-inpage-remote .timeline-header [data-tooltip]::after {
  top: calc(100% + 6px) !important;
  bottom: auto !important;
  z-index: 9200 !important;
}

#scoutBtn.is-restricted-entry,
#modeDesk.is-restricted-entry {
  opacity: 0.45;
  cursor: pointer;
}

#scoutBtn.is-restricted-entry:hover,
#scoutBtn.is-restricted-entry:focus-visible,
#modeDesk.is-restricted-entry:hover,
#modeDesk.is-restricted-entry:focus-visible {
  opacity: 0.62;
}

/* The remote mirror sits outside the iframe stacking context. JS ports the
   active tip to body and punches the matching mirror rectangle; hide the old
   pseudo-element so only the top-layer copy is visible. */
html.cutgo-inpage-shell.cutgo-inpage-remote [data-cutgo-tooltip-ported='1']::after {
  display: none !important;
}

/* Scopes / quick-export: never open up into the parent video mirror */
html.cutgo-inpage-shell.cutgo-inpage-remote .color-scope-menu.ws-scopes-menu:not(.is-fixed-open),
html.cutgo-inpage-shell.cutgo-inpage-remote .ws-quick-export-menu:not(.is-fixed-open) {
  top: calc(100% + 6px) !important;
  bottom: auto !important;
  z-index: 9200 !important;
}

html.cutgo-inpage-shell.cutgo-inpage-remote .ws-quick-export-menu.is-fixed-open {
  /* JS owns top/left. Do not reset top — that sent the menu back upward. */
  bottom: auto !important;
}

/*
 * Tier A: parent mirror owns volume / 适合 / speed over the program video.
 * Hide the iframe #videoUiLayer clones so they don't peek below the mirror
 * and look like a second control strip.
 */
html.cutgo-inpage-shell.cutgo-inpage-remote #videoUiLayer .player-speed-ctrl,
html.cutgo-inpage-shell.cutgo-inpage-remote #videoUiLayer .player-audio-ctrl {
  visibility: hidden !important;
  pointer-events: none !important;
}
