/* App-level layout primitives. Most layout now comes from Bootstrap; only
   keep what the map page needs that Bootstrap doesn't cover. */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-main {
  flex: 1 1 auto;
  min-height: 0;
}

.app-header {
  background: var(--color-bg);
}

/* Map page: the map fills the remaining viewport below the navbar. */
.map-page {
  height: calc(100vh - 64px);
  min-height: 480px;
}

.map-page__sidebar {
  flex-shrink: 0;
  overflow-y: auto;
}

@media (max-width: 767.98px) {
  .map-page__sidebar {
    width: 320px;
  }
}

.map-page__canvas {
  min-height: 480px;
  height: 100%;
}

/* The map, everywhere. One rule, because there is one component.

   In flow by default, filling the height the page asked for. It used to be
   absolutely positioned — right for Explore, where the map is the page, and
   contradicted by an inline height on every other page that used it. Two
   answers for one element is how a map ends up behaving differently
   depending on which page it is on. */
.map-container {
  position: relative;
  width: 100%;
}

/* Explore, and anything else where the map *is* the page. */
.map-container--full {
  position: absolute;
  inset: 0;
  height: 100%;
}
