/* The map page: the map fills the screen; posts in view are listed in a
   bottom sheet on a phone and a side panel on a computer. */
body.map-page { height: 100vh; height: 100dvh; overflow: hidden; }
.map-layout { position: relative; flex: 1; min-height: 0; }
.map { position: absolute; inset: 0; z-index: 0; }

.search { position: absolute; z-index: 500; top: 10px; left: 56px; right: 10px; max-width: 460px; display: flex; gap: 6px; flex-wrap: wrap; }
.search input { flex: 1; min-width: 0; min-height: 44px; box-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.results { list-style: none; margin: 0; padding: 4px; width: 100%; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.results button { width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: 10px; border-radius: 8px; cursor: pointer; min-height: 44px; }
.results button:hover { background: var(--bg); }

.map-buttons { position: absolute; z-index: 500; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.panel {
  position: absolute; z-index: 600; left: 0; right: 0; bottom: 0;
  background: var(--bg); border-top: 3px solid var(--copper);
  border-radius: 16px 16px 0 0; box-shadow: 0 -2px 12px rgba(0, 0, 0, .25);
  max-height: 62%; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.handle { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 56px; padding: 8px 18px; background: none; border: 0; color: var(--text); font: 700 1.1rem/1.2 var(--title-font); cursor: pointer; }
.handle .chev::before { content: "\25B2"; font-size: .8rem; color: var(--muted); }
.panel.open .handle .chev::before { content: "\25BC"; }
.panel-body { overflow-y: auto; padding: 0 14px 14px; display: none; }
.panel.open .panel-body { display: block; }
.panel-body label { margin-top: 0; }
.panel-body h2 { font-size: 1.2rem; margin-top: 1.2em; }
.panel .card { padding: 8px; }
.panel .card .thumb { width: 64px; height: 48px; }

@media (min-width: 900px) {
  .panel { top: 0; bottom: 0; right: auto; width: 380px; max-height: none; border-radius: 0; border-top: 0; border-right: 3px solid var(--copper); }
  .panel .handle { cursor: default; }
  .panel .handle .chev { display: none; }
  .panel-body { display: block; }
  .map { left: 380px; }
  .search { left: 436px; }
  .map-buttons { bottom: 24px; }
  .leaflet-left { left: 0; }
}

/* "Not in Dublin?" card over the map */
.locate-card { position: absolute; z-index: 550; left: 10px; right: 10px; top: 64px; max-width: 26em; background: var(--tag-yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); padding: 8px 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.locate-card[hidden] { display: none; }
.locate-card p { margin: 0; font-weight: 700; }
