/* The Skydio history sync (web/DESIGN.md 26, "Sync from Skydio"): the sync panel of a Skydio
   connection, an imported flight's path and Skydio's files of a flight, and Skydio's own
   schedules. Redwood tokens only. */

/* The panel: what it does, how it goes now, the counts, how far back and the button. */
.ds-sync { display: grid; gap: var(--rw-space-3x); margin-block-start: var(--rw-space-6x); padding-block-start: var(--rw-space-4x); border-top: 1px solid var(--rw-divider); }
.ds-sync-dialog .ds-sync { margin-block-start: 0; padding-block-start: 0; border-top: 0; }
.ds-sync > h3 { font-size: var(--rw-body-md-size); line-height: var(--rw-body-md-lh); }
.ds-sync-lead { font-size: var(--rw-body-sm-size); max-width: 70ch; }
.ds-sync-now { display: grid; gap: var(--rw-space-1x); padding: var(--rw-space-3x) var(--rw-space-4x); border-radius: var(--rw-radius-md); background: var(--rw-bg-muted); }
.ds-sync-running .ds-sync-now { box-shadow: inset 3px 0 0 var(--rw-text-success); }
.ds-sync-state { display: inline-flex; align-items: center; gap: var(--rw-space-2x); }
.ds-sync-line { overflow-wrap: anywhere; }
.ds-sync-so { display: grid; gap: var(--rw-space-1x); padding-inline: var(--rw-space-4x); }
.ds-sync-last, .ds-sync-why { font-size: var(--rw-body-sm-size); }
.ds-sync-notes { margin: 0; padding-inline-start: var(--rw-space-5x); color: var(--rw-text-secondary); font-size: var(--rw-body-sm-size); }

.ds-sync-counts { width: 100%; max-width: 36rem; border-collapse: collapse; font-size: var(--rw-body-sm-size); }
.ds-sync-counts th, .ds-sync-counts td { padding: var(--rw-space-1x) var(--rw-space-2x); border-bottom: 1px solid var(--rw-divider); text-align: end; }
.ds-sync-counts th[scope="row"], .ds-sync-counts thead th:first-child { text-align: start; font-weight: 400; }
.ds-sync-counts thead th { color: var(--rw-text-secondary); font-weight: 600; }
.ds-sync-matched { font-size: var(--rw-body-xs-size); }

.ds-sync-start { display: grid; gap: var(--rw-space-3x); justify-items: start; }
.ds-sync-window { display: grid; gap: var(--rw-space-1x); margin: 0; padding: 0; border: 0; min-width: 0; }
.ds-sync-window .rw-buttonset { flex-wrap: wrap; }

/* An imported flight's path, drawn as the small map of a request is: north up, the map's ground. */
.ds-imported-path { margin: 0; max-width: 26rem; display: grid; gap: var(--rw-space-2x); }
.ds-imported-path svg { display: block; width: 100%; height: auto; }
.ds-imported-ground { fill: var(--rw-bg-app); stroke: var(--rw-divider); }
.ds-imported-line { fill: none; stroke: var(--rw-text-success); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ds-imported-from { fill: var(--rw-bg-app); stroke: var(--rw-text-secondary); stroke-width: 1.6; }
.ds-imported-north { fill: var(--rw-text-secondary); font-size: 10px; }
.ds-imported-mark { display: grid; gap: var(--rw-space-1x); }

/* Skydio's files of a flight. */
.ds-vendor-file-list { display: grid; gap: var(--rw-space-2x); margin: 0; padding: 0; list-style: none; }
.ds-vendor-file-list > li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--rw-space-3x); padding-block: var(--rw-space-2x); border-bottom: 1px solid var(--rw-divider); }
.ds-vendor-file-text { display: grid; min-width: 0; }
.ds-vendor-file-text .ds-cell-name { overflow-wrap: break-word; }
.ds-vendor-file-text .ds-secondary { font-size: var(--rw-body-sm-size); }
/* A file's thumbnail, read from Skydio through the service, 16:9; its kind where it has none. */
.ds-vendor-file-thumb { position: relative; display: grid; place-items: center; width: 5rem; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--rw-radius-md); background: var(--rw-bg-muted); }
.ds-vendor-file-thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ds-vendor-file-video::after { content: ""; position: absolute; inset-block-end: var(--rw-space-1x); inset-inline-start: var(--rw-space-1x); border-block: 5px solid transparent; border-inline-start: 8px solid var(--rw-text-primary); }
.ds-vendor-file-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rw-space-1x) var(--rw-space-2x); margin-block-start: var(--rw-space-1x); }
.ds-vendor-file-foot > .rw-btn { margin-inline-start: auto; }

/* Skydio's own schedules in Schedules. */
.ds-vendor-schedules { display: grid; gap: var(--rw-space-3x); margin-block-start: var(--rw-space-8x); }
.ds-schedule-vendor { box-shadow: inset 3px 0 0 var(--rw-text-warning); }

/* The marks of what a sync brought in, in lists. */
.ds-flight-mark { margin-inline-start: var(--rw-space-1x); }

@media (max-width: 37.49rem) {
  .ds-sync-counts th, .ds-sync-counts td { padding-inline: var(--rw-space-1x); }
  .ds-vendor-file-thumb { width: 4.5rem; }
}

/* A connection's last sync, under its health in the connections table. */
.ds-fleet-health .ds-fleet-synced { font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); max-width: 30em; }
/* What a Skydio connection's settings do: Remote Flight Deck, the copies. */
.ds-fleet-health .ds-fleet-option-line, .ds-fleet-now .ds-fleet-option-line { font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); max-width: 30em; }
.ds-fleet-now .ds-fleet-option-line { max-width: none; }
/* The alerts a Skydio connection shows in Remote Flight Deck, in its dialog, as its other sections. */
.ds-fleet-markers { display: grid; gap: var(--rw-space-3x); margin-block-start: var(--rw-space-6x); padding-block-start: var(--rw-space-4x); border-top: 1px solid var(--rw-divider); }
.ds-fleet-markers > h3 { font-size: var(--rw-body-md-size); line-height: var(--rw-body-md-lh); }
.ds-fleet-marker-list { display: grid; margin: 0; padding: 0; list-style: none; }
.ds-fleet-marker-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rw-space-1x) var(--rw-space-2x); padding-block: var(--rw-space-2x); }
.ds-fleet-marker-list > li + li { border-top: 1px solid var(--rw-divider); }
.ds-fleet-marker-note { flex-basis: 100%; font-size: var(--rw-body-sm-size); }

/* A mission From Skydio's page: what it is, above its read-only route. */
.ds-route-origin { display: grid; gap: var(--rw-space-2x); justify-items: start; padding: var(--rw-space-3x) var(--rw-space-4x); border-radius: var(--rw-radius-md); background: var(--rw-bg-muted); font-size: var(--rw-body-sm-size); }
.ds-route-origin > p { margin: 0; }
.ds-schedule-vendor .ds-schedule-head { flex-wrap: wrap; align-items: center; }
.ds-schedule-vendor .ds-schedule-head > .rw-badge { flex: none; }
