/* Public Explore page. The map fills the viewport behind these grid items. */
body.discovery-page #main {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: .7rem;
  padding: 5.75rem 1.35rem 4.75rem;
  box-sizing: border-box;
}
body.discovery-page #main > #workspace-status:not(:empty) {
  position: absolute;
  inset: auto 1rem .4rem;
  z-index: 850;
  width: fit-content;
  max-width: calc(100% - 2rem);
  background: var(--surface);
}
body.discovery-page #main > .discovery-rail {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 1 / 3;
  place-self: start;
  display: grid;
  grid-template-columns: max-content;
  width: max-content;
  max-height: 100%;
  overflow-y: auto;
  padding: .375rem;
  gap: .25rem;
}
body.discovery-page #main > .discovery-rail a {
  display: grid;
  place-content: center;
  justify-items: center;
  justify-self: stretch;
  box-sizing: border-box;
  min-height: 2.75rem;
  margin: 0;
  padding: .375rem;
  font-size: .6875rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
body.discovery-page #main > .map-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  position: static;
  grid-area: 1 / 2;
  min-width: 0;
  gap: .5rem;
  pointer-events: none;
}
body.discovery-page #main #place-filters {
  position: static;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
}
body.discovery-page #main .explore-search-row {
  position: absolute;
  z-index: 810;
  top: 1.2rem;
  left: 18rem;
  width: min(26rem, calc(100% - 38rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .375rem;
  box-sizing: border-box;
  padding: .2rem .3rem .2rem .7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
body.discovery-page #main #place-filters .explore-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
body.discovery-page #main #place-query,
body.discovery-page #main #place-filters button[type="submit"] {
  align-self: center;
  box-sizing: border-box;
  min-height: 2.75rem;
  height: auto;
  margin: 0;
  padding-block: .45rem;
  font-size: 1rem;
  line-height: 1.25;
}
body.discovery-page #main #place-query {
  min-width: 0;
  width: 100%;
  padding-inline: .25rem;
}
body.discovery-page #main .explore-filter-row,
body.discovery-page #main > .map-tools > .runtime-controls {
  position: relative;
  inset: auto;
  z-index: 800;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
  gap: .45rem;
  margin: 0;
  pointer-events: none;
}
body.discovery-page #main #place-filters select {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  field-sizing: content;
  box-sizing: border-box;
  margin: 0;
  padding: .35rem .75rem;
  font-size: .875rem;
  line-height: 1.25;
  appearance: auto;
  background-image: none;
  pointer-events: auto;
}
body.discovery-page #main > .map-tools button { pointer-events: auto; }
body.discovery-page #main > .map-panel {
  position: relative;
  inset: auto;
  grid-area: 2 / 2;
  place-self: end start;
  width: min(100%, 22rem);
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  box-sizing: border-box;
  margin: 0;
  overflow: auto;
}
body.discovery-page #main > .map-panel[hidden],
body.discovery-page #main #market-intro[hidden],
body.discovery-page.map-enhanced:not(.places-open) .map-panel > :not(#market-intro),
html.explore-intro-seen body.discovery-page #market-intro,
html.explore-intro-seen body.discovery-page:not(.map-enhanced):not(.explore-map-fallback) .map-panel,
html.explore-map-js body.discovery-page:not(.map-enhanced):not(.explore-map-fallback) .map-panel > :not(#market-intro) {
  display: none !important;
}
body.discovery-page .explore-map-notice {
  position: absolute;
  z-index: 820;
  right: 1rem;
  bottom: 3rem;
  max-width: min(25rem, calc(100% - 2rem));
  padding: .5rem .75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .65rem;
  font-size: .875rem;
}
body.discovery-page .explore-map-notice button { margin-inline-start: .5rem; }
body.discovery-page .explore-map-notice[hidden] { display: none; }
@media (max-width: 60rem) {
  body.discovery-page #main { padding: 4.35rem .75rem 2.7rem; gap: .55rem; }
  body.discovery-page #main > .map-tools {
    grid-area: 1 / 1 / 2 / -1;
    flex-direction: column;
    align-items: stretch;
  }
  body.discovery-page #main #place-filters {
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(0, 1fr);
  }
  body.discovery-page #main .explore-search-row {
    position: relative;
    inset: auto;
    width: 100%;
  }
  body.discovery-page #main > .discovery-rail { grid-area: 2 / 1; }
  body.discovery-page #main > .map-panel,
  body.discovery-page #main > #selected-place {
    grid-area: 2 / 2;
    place-self: end start;
    position: relative;
    inset: auto;
    width: min(100%, 30rem);
    max-width: 100%;
    max-height: min(46dvh, 100%);
    overflow: auto;
  }
}
body.discovery-page.map-only #main { display: block; padding: 0; }
body.discovery-page.map-only #main > .discovery-rail,
body.discovery-page.map-only #main > .map-panel,
body.discovery-page.map-only #main #place-filters { display: none; }
body.discovery-page.map-only #main > .map-tools {
  position: absolute;
  inset: .75rem .75rem auto auto;
}
@media (max-width: 60rem) and (max-height: 34rem) {
  body.discovery-page #main { padding-bottom: 1.5rem; gap: .3rem; }
  body.discovery-page #main > .map-tools { gap: .25rem; }
  body.discovery-page #main #place-filters { gap: .25rem; }
}
