/* The choices the Cyto design system leaves to whoever renders it. Its component CSS is written
   for a phone, and the three things below are the ones its own web previews set themselves
   rather than ship as classes. They live here, not in cyto-components.css, because that file is
   a verbatim copy and editing it would make the next copy a merge. */

/* .cy-detail__stats is three columns, which is right on a phone. The design system's web preview
   overrides it to two, and the detail page's figures sit in a narrow column beside the map. */
.cy-scope .cy-page__cols .cy-detail__stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* .cy-map carries no height: 200dp on a phone, 300px on the web, per the consumer. */
.cy-scope .cy-detail-map {
  height: 300px;
}

/* The two columns collapse before the shell's own breakpoint, because a 300px map and a column
   of figures both stop working well before the page runs out of room. */
@media screen and (max-width: 56rem) {
  .cy-scope .cy-page__cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* An activity with no route drops the map, so its figures and details take the whole measure
   rather than sitting in a column beside nothing. */
.cy-scope .cy-page__cols--mapless {
  grid-template-columns: minmax(0, 1fr);
}

/* The type chips sit left and the period chip right, per the design system's web layout. They
   wrap onto two rows before they would ever overlap. */
.cy-scope .cy-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

/* MapLibre renders nothing in a zero-height container, which is the commonest way this looks
   broken rather than merely unstyled. */
.cy-analysis__map {
  block-size: 60vh;
  min-block-size: 20rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.cy-analysis__chart {
  margin-block-start: var(--space-4);
}

.cy-analysis__fallback .cy-map {
  block-size: 40vh;
  min-block-size: 16rem;
}

/* [hidden] is only display:none in the UA stylesheet, so any author rule that sets display beats
   it - .cy-btn declares display:flex, which left the reset button on screen while hidden. */
.cy-analysis [hidden] {
  display: none;
}

.cy-analysis__note {
  margin: var(--space-2) 0 0;
  font: 500 12px/16px var(--ff-body);
  color: var(--color-base-foreground-muted);
}
