/* Map view: a career fair's venue on OpenStreetMap, and the venue name
   button that opens it. */

/* ---------- Map view (a career fair's venue on OpenStreetMap) ---------- */
.map-view-card { max-width: 720px; }
.map-view-sub { margin: calc(-1 * var(--sp-2)) 0 var(--sp-3); }
/* The map is a stack of absolutely-positioned tile images inside a clipped
   viewport — see openMap() in js/app-viewers.js. Dark ground, because satellite tiles
   load in over it and a light gap between them reads as a seam. */
.map-view-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: min(56vh, 460px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #23272b;
  cursor: grab;
  touch-action: none;      /* the drag handler owns the gesture */
  user-select: none;
}
.map-view-frame.dragging { cursor: grabbing; }

.map-tiles { position: absolute; inset: 0; }
.map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  pointer-events: none;    /* the viewport handles the drag, not each tile */
}

/* A ring rather than a filled pin: it marks the building without hiding it. */
.map-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 3px solid var(--on-accent);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.map-ctls {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 2 * var(--sp-2));
}
.map-ctl { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.map-ctl:disabled { opacity: 0.5; cursor: default; }
.map-view-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-3);
}

/* A venue name that opens the map. Not a link and not underlined — it reads as
   part of the meta line until you point at it, then it thickens to say it is
   live. (Same treatment the blog headlines use.) */
.fair-where {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.fair-where:hover { font-weight: 700; color: var(--text); }
.fair-where:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Layout fixes (issue #16 item 5): on a short viewport the frame gives up
   height (down to 200px) so the footer stays inside the card instead of
   under its fold. */
.map-view-card { display: flex; flex-direction: column; }
.map-view-card > * { flex-shrink: 0; }
.map-view-card > .map-view-frame { flex-shrink: 1; min-height: 200px; }
/* The document viewer's height, not the shared 80vh: at 200% zoom (390x400)
   the pinned head, sub line, 140px frame and footer need 326px, and 80vh left
   the card scrolling 8px inside itself (issue #16 F-47). */
.map-view-card { max-height: 88vh; }
@media (max-height: 480px) {
  .map-view-card > .map-view-frame { min-height: 140px; }
}
