/* Known drones, a drone's history, notification settings, personal keys, Analytics and
   Location details. Tokens only; the charts take their colours from the classes below. */

/* ── Pages in the Console workspace ─────────────────────────────────────────── */

.ds-page > .ds-admin { margin-inline: auto; }
.ds-admin-tools { justify-content: flex-start; }
.ds-admin-search { width: min(100%, 22rem); }
.ds-admin-note { max-width: 46rem; line-height: var(--rw-body-lg-lh); }
.ds-airframe-panel { overflow-y: auto; }
.ds-airframe-head { align-items: center; padding-bottom: var(--rw-space-3x); }
.ds-airframe-head > h2 { min-width: 0; font-size: var(--rw-body-lg-size); line-height: var(--rw-body-lg-lh); overflow-wrap: anywhere; }
.ds-airframe-panel > .ds-history-results { flex: none; overflow: visible; }
.ds-airframe-mini { flex: none; height: 18rem; border: 1px solid var(--rw-divider); border-radius: var(--rw-radius-md); }
/* Maps inside a page have no bottom sheet under them: their controls sit at their own foot. */
.ds-airframe-mini .maplibregl-ctrl-bottom-left, .ds-airframe-mini .maplibregl-ctrl-bottom-right,
.ds-heat-stage .maplibregl-ctrl-bottom-left, .ds-heat-stage .maplibregl-ctrl-bottom-right { bottom: 0; }
.ds-heat-stage .ds-mapctl { inset-block-end: max(var(--rw-space-8x), calc(var(--ds-foot-end, 0px) + var(--rw-space-2x))); }
.ds-sec-actions, .ds-replay-actions { display: flex; flex-wrap: wrap; gap: var(--rw-space-2x); }

/* ── Notification settings and keys ─────────────────────────────────────────── */

.ds-rule-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: var(--rw-space-4x); margin: 0; padding: 0; list-style: none; }
.ds-rule { display: grid; align-content: start; gap: var(--rw-space-3x); padding: var(--rw-space-4x); }
.ds-rule-top { display: flex; align-items: center; justify-content: space-between; gap: var(--rw-space-3x); }
.ds-rule-top > h3 { min-width: 0; font-size: var(--rw-body-md-size); line-height: var(--rw-body-md-lh); overflow-wrap: anywhere; }
.ds-rule > p { line-height: var(--rw-body-lg-lh); overflow-wrap: anywhere; }
.ds-quiet-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rw-space-2x); }
.ds-quiet-row > .rw-input { width: 8rem; }
.ds-examples { display: grid; gap: var(--rw-space-4x); max-width: 46rem; }
/* A key's actions sit side by side, and one above the other where the row is narrow. */
.ds-key-actions { display: flex; justify-content: flex-end; gap: var(--rw-space-1x); white-space: nowrap; }
@media (max-width: 47.99rem) { .ds-key-actions { flex-direction: column; align-items: flex-end; } }

/* ── Analytics ──────────────────────────────────────────────────────────────── */

/* One hue for magnitude, checked against the light and the dark surface. The status tones are
   used only where the series is a status, always beside its word. */
:root { --ds-mark: var(--rw-brand-110); --ds-mark-quiet: var(--rw-neutral-100); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ds-mark-quiet: var(--rw-neutral-80); }
}
:root[data-theme="dark"], :root[data-theme="clinical"] { --ds-mark-quiet: var(--rw-neutral-80); }
.ds-fill-brand { fill: var(--ds-mark); background-color: var(--ds-mark); }
.ds-fill-danger { fill: var(--rw-text-danger); background-color: var(--rw-text-danger); }
.ds-fill-warning { fill: var(--rw-text-warning); background-color: var(--rw-text-warning); }
.ds-fill-success { fill: var(--rw-text-success); background-color: var(--rw-text-success); }
.ds-fill-quiet { fill: var(--ds-mark-quiet); background-color: var(--ds-mark-quiet); }

.ds-analytics > * { width: 100%; max-width: 88rem; margin-inline: auto; }
.ds-analytics-tools { align-items: flex-end; gap: var(--rw-space-4x); margin-bottom: var(--rw-space-4x); }
.ds-range-fields { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rw-space-2x); }
.ds-range-fields > .rw-input { width: auto; min-width: 0; }
.ds-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rw-space-4x); padding-bottom: var(--rw-space-8x); }
.ds-chart-block { display: grid; align-content: start; gap: var(--rw-space-3x); min-width: 0; padding: var(--rw-space-5x); border: 1px solid var(--rw-divider); border-radius: var(--rw-radius-lg); background: var(--rw-bg-content); }
.ds-chart-wide { grid-column: 1 / -1; }
.ds-chart-busy > :not(.ds-chart-head) { opacity: .55; }
.ds-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--rw-space-2x) var(--rw-space-4x); }
.ds-chart-head > h2 { font-size: var(--rw-body-lg-size); line-height: var(--rw-body-lg-lh); }
.ds-chart-tools { gap: var(--rw-space-2x); }
.ds-chart-lead { max-width: 60rem; line-height: var(--rw-body-lg-lh); }
.ds-chart-empty, .ds-chart-note { color: var(--rw-text-secondary); font-size: var(--rw-body-sm-size); line-height: var(--rw-body-md-lh); }
.ds-chart-empty { padding-block: var(--rw-space-6x); }
.ds-chart-sub { margin-top: var(--rw-space-3x); font-size: var(--rw-body-sm-size); line-height: var(--rw-body-sm-lh); color: var(--rw-text-secondary); font-weight: 600; }
.ds-chart-table { max-height: 24rem; overflow: auto; }

.ds-chart { position: relative; display: grid; gap: var(--rw-space-1x); border-radius: var(--rw-radius-md); }
.ds-chart:focus-visible { outline: 2px solid var(--rw-focus-ring); outline-offset: var(--rw-space-1x); }
.ds-chart-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); align-items: end; column-gap: var(--rw-space-4x); }
.ds-chart-solo > .ds-chart-row { grid-template-columns: minmax(0, 1fr); }
.ds-chart-rowlabel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--rw-space-2x); padding-bottom: var(--rw-space-1x); font-size: var(--rw-body-sm-size); line-height: var(--rw-body-md-lh); }
.ds-chart-name { min-width: 0; overflow-wrap: anywhere; }
.ds-chart-key { width: .625rem; height: .625rem; border-radius: var(--rw-radius-sm); }
.ds-chart-plot { min-width: 0; }
.ds-chart-plot > svg { display: block; touch-action: pan-y; }
.ds-chart-axis { stroke: var(--rw-divider); stroke-width: 1; }
.ds-chart-band { fill: var(--rw-bg-hover); }
.ds-chart-dim { opacity: .5; }
.ds-chart-text { fill: var(--rw-text-secondary); font-size: var(--rw-body-xs-size); font-variant-numeric: tabular-nums; }
.ds-chart-tip { position: absolute; top: var(--rw-space-1x); left: var(--ds-tip-x, 0); z-index: 3; display: grid; gap: var(--rw-space-1x); min-width: 9rem; max-width: 16rem; padding: var(--rw-space-2x); transform: translateX(var(--rw-space-3x)); border-radius: var(--rw-radius-md); background: var(--rw-neutral-170); color: var(--rw-neutral-0); font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); box-shadow: var(--rw-shadow-sm); pointer-events: none; }
.ds-chart-tip-flip { transform: translateX(calc(-100% - var(--rw-space-3x))); }
.ds-chart-tip-title { font-weight: 600; }
.ds-chart-tip-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--rw-space-2x); }
.ds-chart-tip-row > .ds-num { font-weight: 600; }

.ds-rank { display: grid; gap: var(--rw-space-2x); margin: 0; padding: 0; list-style: none; }
.ds-rank-row { display: grid; grid-template-columns: minmax(0, 13rem) minmax(3rem, 1fr) auto; align-items: center; gap: var(--rw-space-3x); min-height: var(--rw-space-8x); font-size: var(--rw-body-sm-size); line-height: var(--rw-body-md-lh); }
.ds-rank-label { display: grid; min-width: 0; overflow-wrap: anywhere; }
.ds-rank-detail { font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); }
.ds-rank-bar { display: block; min-width: 0; }
.ds-rank-value { min-width: 5.5rem; text-align: end; }

.ds-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--rw-space-4x); margin: 0; }
.ds-stat { display: grid; align-content: start; gap: var(--rw-space-1x); min-width: 0; }
.ds-stat > dt { color: var(--rw-text-secondary); font-size: var(--rw-body-sm-size); line-height: var(--rw-body-md-lh); }
.ds-stat > dd { display: grid; gap: var(--rw-space-1x); margin: 0; font-size: var(--rw-body-sm-size); line-height: var(--rw-body-md-lh); }
.ds-stat-value { font-size: var(--rw-heading-sm-size); line-height: var(--rw-heading-sm-lh); font-weight: 700; }

.ds-heat-stage { position: relative; height: 28rem; overflow: hidden; border: 1px solid var(--rw-divider); border-radius: var(--rw-radius-md); background: var(--rw-bg-app); }
.ds-heat-legend { display: flex; flex-wrap: wrap; gap: var(--rw-space-2x) var(--rw-space-4x); margin: 0; padding: 0; list-style: none; color: var(--rw-text-secondary); font-size: var(--rw-body-sm-size); }
.ds-heat-legend > li { display: flex; align-items: center; gap: var(--rw-space-2x); }
.ds-heat-swatch { width: 1rem; height: 1rem; border-radius: var(--rw-radius-sm); }
/* The same steps and strengths as the map's cells (map.js, heat-fill). */
.ds-heat-0 { background: var(--rw-brand-130); opacity: .8; }
.ds-heat-1 { background: var(--rw-brand-110); opacity: .84; }
.ds-heat-2 { background: var(--rw-brand-90); opacity: .88; }
.ds-heat-3 { background: var(--rw-brand-70); opacity: .92; }
.ds-heat-4 { background: var(--rw-brand-50); opacity: .96; }

/* ── Location details ───────────────────────────────────────────────────────── */

.ds-location-in { display: grid; gap: var(--rw-space-4x); max-width: 80rem; margin-inline: auto; }
.ds-back { display: inline-flex; align-items: center; gap: var(--rw-space-2x); }
.ds-location-at { display: flex; align-items: center; gap: var(--rw-space-1x); }
.ds-location-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: var(--rw-space-4x); padding-bottom: var(--rw-space-8x); }
.ds-location-grid > .ds-location-side:only-child { grid-column: 1 / -1; max-width: 40rem; }
.ds-location-side { display: grid; gap: var(--rw-space-4x); min-width: 0; }
.ds-location-card { display: grid; align-content: start; gap: var(--rw-space-3x); min-width: 0; padding: var(--rw-space-5x); border: 1px solid var(--rw-divider); border-radius: var(--rw-radius-lg); background: var(--rw-bg-content); }
.ds-location-card > h2 { font-size: var(--rw-body-lg-size); line-height: var(--rw-body-lg-lh); }
.ds-location-tools { justify-content: space-between; gap: var(--rw-space-3x); }
.ds-location-img { display: block; width: 100%; height: auto; border-radius: var(--rw-radius-md); background: var(--rw-bg-subtle); }
.ds-location-none { padding-block: var(--rw-space-8x); color: var(--rw-text-secondary); }
.ds-location-source { color: var(--rw-text-secondary); font-size: var(--rw-body-sm-size); line-height: var(--rw-body-md-lh); }
.ds-location-address { font-size: var(--rw-body-lg-size); line-height: var(--rw-body-lg-lh); font-weight: 600; overflow-wrap: anywhere; }
.ds-location-links { display: flex; flex-wrap: wrap; gap: var(--rw-space-2x) var(--rw-space-5x); }
.ds-location-results { display: grid; margin: 0; padding: 0; list-style: none; }
.ds-location-results > li + li { border-top: 1px solid var(--rw-divider); }
/* Beside a Google base map: the pilot's address and picture, and the drone's address. */
.ds-place { display: grid; gap: var(--rw-space-2x); margin-bottom: var(--rw-space-4x); }
.ds-place-address { font-size: var(--rw-body-lg-size); line-height: var(--rw-body-lg-lh); font-weight: 600; overflow-wrap: anywhere; }
.ds-place-value { display: grid; gap: var(--rw-space-1x); }
.ds-place-source { color: var(--rw-text-secondary); font-size: var(--rw-body-xs-size); line-height: var(--rw-body-xs-lh); }
.ds-place-picture { display: grid; gap: var(--rw-space-1x); margin: var(--rw-space-1x) 0 0; }
.ds-location-letter { display: grid; place-items: center; flex: none; width: var(--rw-space-6x); height: var(--rw-space-6x); border: 1px solid var(--rw-border-enabled); border-radius: 50%; font-size: var(--rw-body-xs-size); font-weight: 700; }

@media (max-width: 63.99rem) {
  .ds-chart-grid, .ds-location-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 47.99rem) {
  .ds-chart-block, .ds-location-card { padding: var(--rw-space-4x); }
  .ds-chart-row { grid-template-columns: minmax(0, 1fr); }
  .ds-chart-ticks > div:empty { display: none; }
  .ds-rank-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ds-rank-bar { grid-column: 1 / -1; order: 3; }
  .ds-heat-stage { height: 20rem; }
  .ds-location-tools { justify-content: flex-start; }
}

/* ── The API reference (API keys) ──────────────────────────────────────────── */

.ds-apiref { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: var(--rw-space-6x); align-items: start; }
.ds-apiref-nav { position: sticky; top: 0; display: grid; gap: var(--rw-space-2x); }
.ds-apiref-nav > ul { display: grid; gap: var(--rw-space-1x); margin: 0; padding: 0; list-style: none; }
.ds-apiref-nav a { color: var(--rw-text-primary); text-decoration: none; }
.ds-apiref-nav a:hover, .ds-apiref-nav a:focus-visible { text-decoration: underline; }
.ds-apiref-main { display: grid; gap: var(--rw-space-4x); min-width: 0; }
.ds-apiref-intro { display: grid; gap: var(--rw-space-3x); max-width: 46rem; line-height: var(--rw-body-lg-lh); }
.ds-apiref-group { display: grid; gap: var(--rw-space-2x); scroll-margin-top: var(--rw-space-4x); }
.ds-apiref-group > .ds-admin-sub { margin-top: var(--rw-space-2x); }
.ds-apiref-op { border: 1px solid var(--rw-divider); border-radius: var(--rw-radius-md); background: var(--rw-bg-content); scroll-margin-top: var(--rw-space-4x); }
.ds-apiref-op > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--rw-space-1x) var(--rw-space-3x); min-block-size: 2.25rem; padding: var(--rw-space-2x) var(--rw-space-3x); cursor: pointer; }
.ds-apiref-method { min-width: 3.75rem; color: var(--rw-text-secondary); font-family: var(--font-oracle-mono); font-size: var(--rw-body-xs-size); font-weight: 700; }
.ds-apiref-path { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ds-apiref-summary { flex: 1 1 12rem; min-width: 0; color: var(--rw-text-secondary); }
.ds-apiref-body { display: grid; gap: var(--rw-space-2x); padding: var(--rw-space-3x); border-top: 1px solid var(--rw-divider); }
.ds-apiref-body > p { max-width: 52rem; line-height: var(--rw-body-lg-lh); overflow-wrap: anywhere; }
.ds-apiref-body > h4 { margin-top: var(--rw-space-2x); font-size: var(--rw-body-sm-size); font-weight: 600; }
.ds-apiref-meta { font-size: var(--rw-body-sm-size); }
.ds-apiref-type { font-family: var(--font-oracle-mono); font-size: var(--rw-body-sm-size); overflow-wrap: break-word; }
.ds-apiref-link { padding: 0; border: 0; background: none; color: var(--rw-text-brand); font: inherit; text-decoration: underline; cursor: pointer; }
.ds-apiref-desc { display: block; min-width: 10rem; overflow-wrap: break-word; }
@media (max-width: 60rem) {
  .ds-apiref { grid-template-columns: minmax(0, 1fr); gap: var(--rw-space-4x); }
  .ds-apiref-nav { position: static; }
  .ds-apiref-nav > ul { display: flex; flex-wrap: wrap; gap: var(--rw-space-1x) var(--rw-space-3x); }
}
