/* ::structure: Max's open viewer showing one scene file, read-only (open-viewer.js, scene mode). Loads after
   gv-viewer.css, which styles the stage, text box, legend and buttons. This is the part of his dev-mode.css an edited
   viewer needs with developer mode off (his editing chrome is not on the wiki), on the wiki's tokens and, like
   gv-viewer.css here, laid out by the viewer's own width. */
.gvv-tool[hidden], .gvv-chips[hidden], .pv-note[hidden], .gvv .gvv-card[hidden], .gvv .gvv-legend[hidden] { display: none; }

/* a box moved or resized in the scene: dev-mode.js sets --pv-x/y/w/h in % of its offset parent. Not in the
   narrow layout, where the text box sits under the scene */
@container (min-width: 480px) {
  .gvv .pv-placed {
    position: absolute; left: var(--pv-x, 0); top: var(--pv-y, 0); right: auto; bottom: auto;
    box-sizing: border-box;
    width: var(--pv-w, auto); max-width: none; height: var(--pv-h, auto);
    overflow: hidden;
  }
}

/* notes tied to a residue: under the canvas, unless in front of the protein (.is-front); the lines to them above it */
.pv-notes { position: absolute; inset: 0; pointer-events: none; }
.pv-note.is-front { z-index: 2; }
.pv-note {
  position: absolute;
  display: flex; flex-direction: column; gap: var(--space-1);
  box-sizing: border-box;
  width: max-content; max-width: 16rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--clr-body) 90%, transparent);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.pv-leaders { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.pv-leaders line { stroke: var(--gv-pine); stroke-width: 1.5; }
.pv-leaders circle { fill: var(--gv-pine); }
.pv-panel, .pv-frames, .pv-seq { display: none; }
.gvv-card .gvv-key, .pv-note .gvv-key { font-size: calc(var(--fs-body) * .72); line-height: var(--lh-snug); }

/* the poster is the figure's picture slot: it takes the pointer, so the preview's upload dialog reaches it */
.ov--scene .pv-poster { pointer-events: auto; }
/* the text box and legend are the scene's: nothing to say until it is in */
.ov--scene:not(.is-ready) :is(.gvv-card, .gvv-legend) { visibility: hidden; }
