/* The map page: the map fills the screen; wells 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); }
.search .button { box-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.results { list-style: none; margin: 0; padding: 4px; width: 100%; background: var(--surface); border: 1px 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; }
.button.solid { background: var(--surface); box-shadow: 0 1px 6px rgba(0, 0, 0, .3); }
.map-buttons .gold { box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }

.panel {
  position: absolute; z-index: 600; left: 0; right: 0; bottom: 0;
  background: var(--surface); border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0; box-shadow: 0 -2px 12px rgba(0, 0, 0, .2);
  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: 600 1rem/1.2 inherit; cursor: pointer; }
.handle .chev::before { content: "▲"; font-size: .8rem; color: var(--muted); }
.panel.open .handle .chev::before { content: "▼"; }
.panel-body { overflow-y: auto; padding: 0 14px 14px; display: none; }
.panel.open .panel-body { display: block; }
.panel-body label { margin-top: 0; }

.well-list { list-style: none; margin: 10px 0 0; padding: 0; }
.well-list li a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; text-decoration: none; color: inherit; min-height: 56px; }
.well-list li a:hover { background: var(--bg); }
.well-list img, .well-list .dot { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; background: var(--well-dark); }
.well-list strong { display: block; color: var(--link); }

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