/* Seeing with the fleet (console/fleet-video.js, web/DESIGN.md 26 "Video, camera and media"):
   the live video of a device and of a flight, the camera controls on a flight's card, and the
   photos and videos kept. Redwood tokens only; the video's ground is the app's own. */

/* ── The live video ───────────────────────────────────────────────────────── */

.ds-video { display: grid; gap: var(--rw-space-1x); margin: var(--rw-space-3x) 0 0; }
.ds-video-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--rw-divider);
  border-radius: var(--rw-radius-md);
  background: var(--rw-bg-app);
}
.ds-video-el { display: block; grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; background: var(--rw-bg-app); }
/* The second picture: a renewed address plays here, unseen, until it shows its picture; then
   the two change places, with no gap. It stays laid out (not display: none) so it decodes. */
.ds-video-standby { opacity: 0; pointer-events: none; }
/* What the viewer waits for sits on a scrim at the foot of the picture, never over its middle. */
.ds-video-wait {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  margin: 0;
  padding: var(--rw-space-2x) var(--rw-space-3x);
  background: rgba(22, 21, 19, .72);
  color: var(--rw-neutral-10); /* light on the dark scrim in either theme */
  font-size: var(--rw-body-sm-size);
  line-height: var(--rw-body-sm-lh);
}
.ds-video-end {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--rw-space-3x);
  padding: var(--rw-space-4x);
  background: var(--rw-bg-muted);
  text-align: center;
}
.ds-video-end > p { max-width: 28rem; margin: 0; font-size: var(--rw-body-md-size); line-height: var(--rw-body-md-lh); }
.ds-video-end .ds-mono { white-space: nowrap; } /* a reference to quote stays whole: V-3F9A2C */
.ds-video-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rw-space-1x) var(--rw-space-3x);
  font-size: var(--rw-body-sm-size);
  line-height: var(--rw-body-sm-lh);
}
.ds-video-title { font-weight: 600; }
.ds-video-live { display: inline-flex; align-items: center; gap: var(--rw-space-2x); color: var(--rw-text-success); font-weight: 600; }
.ds-video-latency { color: var(--rw-text-secondary); font-family: var(--font-oracle-mono); }
.ds-video-until { order: 2; flex-basis: 100%; font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); }
/* Close video ends the first line; when the link ends is the line under it. */
.ds-video-bar > .rw-btn { margin-inline-start: auto; margin-inline-end: calc(-1 * var(--rw-space-2x)); }
/* Which way the picture plays: WebRTC (about 0.3 s behind) or HLS (about 3 s), a quiet chip. */
.ds-video-via {
  padding: 0 var(--rw-space-2x);
  border: 1px solid var(--rw-border-enabled);
  border-radius: var(--rw-radius-md);
  color: var(--rw-text-secondary);
  font-size: var(--rw-body-xs-size);
  line-height: var(--rw-body-sm-lh);
  font-weight: 600;
}
.ds-video-via-webrtc { border-color: var(--rw-text-success); color: var(--rw-text-success); }
/* Why HLS plays: one line under the bar. */
.ds-video-why { margin: 0; font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); }
/* "Still watching?" after two hours: under the picture, with Keep watching at its end. */
.ds-video-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--rw-space-2x) var(--rw-space-3x);
  padding: var(--rw-space-2x) var(--rw-space-3x);
  border: 1px solid var(--rw-border-selected);
  border-inline-start-width: 3px;
  border-radius: var(--rw-radius-md);
  background: var(--rw-bg-muted);
}
.ds-video-ask > p { margin: 0; font-size: var(--rw-body-sm-size); line-height: var(--rw-body-sm-lh); }
.ds-video-ask span { color: var(--rw-text-secondary); }
/* The pilot's warning while the picture is HLS: plainly, under the picture, never over it. */
.ds-video-warn {
  display: flex;
  align-items: flex-start;
  gap: var(--rw-space-2x);
  padding: var(--rw-space-2x) var(--rw-space-3x);
  border: 1px solid var(--rw-text-warning);
  border-inline-start-width: 3px;
  border-radius: var(--rw-radius-md);
  background: var(--rw-bg-muted);
}
.ds-video-warn > .ds-ico-svg { width: var(--rw-space-5x); height: var(--rw-space-5x); }
.ds-video-warn > .ds-ico-svg, .ds-video-warn > .ds-ico-font { flex: none; color: var(--rw-text-warning); }
.ds-video-warn > p { margin: 0; font-size: var(--rw-body-sm-size); line-height: var(--rw-body-sm-lh); }
.ds-video-warn strong { color: var(--rw-text-warning); font-weight: 600; }
.ds-video-warn span { color: var(--rw-text-secondary); }
.ds-video-behind .ds-video-frame { border-color: var(--rw-text-warning); }
.ds-video-off { display: grid; justify-items: start; gap: var(--rw-space-1x); margin: var(--rw-space-3x) 0 0; }
.ds-video-hint { margin: 0; font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); }

/* ── The camera on a flight's card ───────────────────────────────────────── */

.ds-flight-camera { display: grid; gap: var(--rw-space-1x); margin-top: var(--rw-space-3x); }
.ds-flight-zoom { display: inline-flex; align-items: center; gap: var(--rw-space-1x); }
.ds-flight-zoom > select { width: auto; min-width: 4.5rem; }
.ds-flight-camera .rw-btn[aria-pressed="true"] { border-color: var(--rw-border-selected); background-color: var(--rw-bg-selected); }

/* ── Photos and videos ───────────────────────────────────────────────────── */

.ds-media-video { position: relative; display: grid; place-items: center; cursor: pointer; }
/* A video copied from Skydio shows Skydio's thumbnail under its play mark. */
.ds-media-video > img { position: absolute; inset: 0; }
.ds-media-play {
  display: grid;
  place-items: center;
  width: var(--rw-space-9x);
  height: var(--rw-space-9x);
  border: 1px solid var(--rw-border-enabled);
  border-radius: 50%;
  background: rgba(22, 21, 19, .72);
  color: var(--rw-neutral-10); /* light on the dark scrim in either theme */
}
.ds-media-play > .ds-ico, .ds-media-play > svg { width: var(--rw-space-4x); height: var(--rw-space-4x); }
.ds-media-length {
  position: absolute;
  inset-inline-end: var(--rw-space-1x);
  inset-block-end: var(--rw-space-1x);
  padding: 0 var(--rw-space-1x);
  border-radius: var(--rw-radius-sm);
  background: rgba(22, 21, 19, .72);
  color: var(--rw-neutral-10); /* light on the dark scrim in either theme */
  font-size: var(--rw-body-xs-size);
  line-height: var(--rw-body-xs-lh);
}
.ds-media-flag { margin-top: var(--rw-space-1x); }
.ds-media-note { margin: 0 0 var(--rw-space-3x); }
.ds-media-line { margin: var(--rw-space-1x) 0 0; font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); }
.ds-flight-media > .ds-media-strip { margin-top: var(--rw-space-1x); }
.ds-case-sec .ds-media-strip { margin-inline: 0; padding-inline: 0; }

