/* css/frameviewer.css: the full-resolution frame viewer and the Frame menu. Moved verbatim from style.css (UI plan
   step 20d). Its picture is a zoom surface of js/stage/zoom.js (20f): it shows the grab cursor only once zoomed, and
   the scale in its bar is a quiet Fit button. */

/* ---------- full-res frame viewer -------------------------------------- */
.frameviewer {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: var(--z-frameviewer); background: var(--scrim-strong);
  display: grid; grid-template-rows: auto 1fr auto auto;
  outline: none;   /* it holds the focus while open (the keys are its own), and draws no ring for it */
}
.fv-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.fv-meta { font-size: 13px; color: var(--text); }
.fv-spacer { flex: 1; }
.fv-bar .fv-zoom { min-width: 48px; padding: 6px var(--s1); background: none; border: 0; color: var(--muted); font: inherit;
  font-size: var(--fs-sm); text-align: center; font-variant-numeric: tabular-nums; cursor: pointer; }
.fv-bar .fv-zoom:hover { background: none; color: var(--text); }
#frameDownload { text-decoration: none; }
.fv-stage {
  position: relative; overflow: hidden; display: grid; place-items: center;
  touch-action: none; user-select: none;
}
.fv-stage.zoomed { cursor: grab; }
.fv-stage.grabbing { cursor: grabbing; }
#frameImg {
  max-width: 100%; max-height: 100%; transform-origin: 0 0;
  will-change: transform; image-rendering: auto;
}
.fv-status { position: absolute; color: var(--muted); font-size: 13px; }
.fv-hint { padding: 6px 12px; font-size: 11px; color: var(--muted); text-align: center;
           background: var(--panel); border-top: 1px solid var(--line); }
/* The hint names the gestures this device has: a phone has no wheel or keys. */
.fv-hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .fv-hint-mouse, .fv-hint #fvKeys { display: none; }
  .fv-hint-touch { display: inline; }
}
.fv-zbtn { min-width: 34px; padding: 0 8px; font-size: 16px; line-height: 1; }
.fv-bar .fv-zbtn:disabled { opacity: .45; cursor: default; background: var(--panel-2); }   /* − at 100%, + at 800% */
/* Frame-by-frame stepping, under the picture: labelled, so its ◀ ▶ are never
   mistaken for the player's previous / next event. */
.fv-step {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; background: var(--panel); border-top: 1px solid var(--line);
}
.fv-stepinfo { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fv-stepctl { display: flex; align-items: center; gap: 8px; }     /* −10s ◀ ▶ +10s always stay together */
/* ±10 s wear the transport's ±10 s colour (one colour per kind of button). */
.fv-step #fvBack, .fv-step #fvFwd { background: var(--nav-step-bg); border-color: var(--nav-step-line); color: var(--nav-step-fg); }
.fv-step #fvBack:hover, .fv-step #fvFwd:hover { filter: brightness(1.3); }
.fv-steplabel { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fv-step .pill { min-height: 36px; padding: 0 14px; }
/* A slot of its own width: "Loading…" and "In-between frame · 3 of 10 in 23:26:04" take the same room, so the buttons
   beside or under it never move while a frame loads (Wade, 2026-10-31: a quick tap landed on the wrong button). */
.fv-where { display: inline-block; width: 40ch; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: left; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* While the viewer is open its toasts sit under its title bar (--fv-top, frame-viewer.js), never over the step buttons
   at the bottom, where a quick tap on Next landed on a toast instead. */
body.fv-open .toasts { top: var(--fv-top, 64px); bottom: auto; }

/* A small dropdown menu (the Frame button's). */
.ddmenu {
  position: fixed; z-index: 55; min-width: 220px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); display: grid;
}
.ddmenu button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; min-height: 40px;
  background: none; border: 0; border-radius: 6px; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.ddmenu button:hover, .ddmenu button:focus-visible { background: var(--line); outline: none; }
.ddmenu kbd { margin-left: auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }

/* "Identify vehicle" (stage/identify.js): its answer, in a small dialog over the frame viewer or Enhance. */
.idv-name { font-size: 16px; font-weight: 600; margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.idv { min-width: 0; overflow-wrap: anywhere; }
.idv-kv { width: 100%; table-layout: fixed; }
.idv-kv th { width: 5.5em; text-align: left; vertical-align: top; color: var(--muted); font-weight: 500; padding-right: 12px; white-space: nowrap; }
.idv-kv td { white-space: normal; }
.idv-plate { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .08em; }
.idv-details { margin: 8px 0; padding-left: 18px; }
