/* OLAT Explorer v3 (beta) — styles additive to main.css, scoped to .olat-v3.
   v2 is unaffected. */

.olat-v3 .olat-map { position: relative; }

.olat-v3 .olat-map canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  cursor: crosshair;
}

/* reference layers (rail / map / stations) above the heatmap, below the borough
   SVG; the wrapper's opacity is the "fade" control */
.olat-v3 .olat-map .olat3-ref-layers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.7;
}
.olat-v3 .olat-map .olat3-ref {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.olat-v3 .olat-map .olat3-ref[hidden] { display: none; }   /* beat main.css .olat-map img{display:block} */

.olat-v3 .olat-map svg { z-index: 2; }

/* collapsible panels (Mapping options, Map layers & landmarks) */
.olat3-panel {
  margin-bottom: 1rem;
  border: 1px solid var(--warm-grey);
  border-radius: 6px;
}
.olat3-panel > summary {
  cursor: pointer;
  padding: 0.55rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.olat3-panel > summary::-webkit-details-marker { display: none; }
.olat3-panel > summary::before { content: "\25B8\00a0"; color: var(--mid-grey); }
.olat3-panel[open] > summary::before { content: "\25BE\00a0"; }
.olat3-panel-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0 0.8rem 0.8rem;
}

/* the four exclusive display options behave as radio buttons */
.olat3-views { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.olat3-view {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--warm-grey);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.olat3-view:hover { border-color: var(--blue); color: var(--blue); }
.olat3-view.active { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* isochrone slider — only shown when the Isochrone option is active */
.olat3-iso {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--mid-grey);
}
.olat3-iso[hidden] { display: none; }
.olat3-iso input[type="range"] { width: 160px; accent-color: var(--blue); }
.olat3-iso-val {
  min-width: 3.8em;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

/* map-layer toggles + fade */
.olat-mode-toggle.olat3-dim { opacity: 0.4; cursor: not-allowed; }
.olat3-fade {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--mid-grey);
}
.olat3-fade-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.olat3-fade input[type="range"] { width: 120px; accent-color: var(--blue); }
.olat3-fade input[type="range"]:disabled { opacity: 0.4; }

.olat3-stats {
  font-size: 0.8rem !important;
  color: var(--ink) !important;
  margin: 0.75rem 0 0 !important;
  font-weight: 600;
}

@media (max-width: 640px) {
  .olat3-view { min-height: 40px; }
  .olat3-iso input[type="range"] { width: 120px; }
  .olat3-layer, .olat3-panel > summary { min-height: 44px; }
}

/* Crisp VECTOR borough + London boundary lines on the SVG layer. The baked
   raster lines went faint once the canvas backing was reduced for speed and on
   small screens; these are sharp at any size / DPR (non-scaling-stroke keeps the
   width in CSS pixels regardless of the viewBox stretch). */
.olat-v3 .olat-borough { stroke: #8a8a8a; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.olat-v3 .olat-borough.olat-nodata { stroke: #b4b4b4; }
.olat-v3 .olat-borough:hover,
.olat-v3 .olat-borough:focus-visible {
  fill: rgba(0, 112, 186, 0.30);          /* less transparent than before, so it reads over the dots */
  stroke: var(--blue);
  stroke-width: 2.5px;
}
.olat-v3 .olat-borough.olat-nodata:hover {
  fill: rgba(138, 148, 144, 0.18);
  stroke: var(--mid-grey);
  stroke-width: 1.5px;
}
.olat-v3 .olat-borough.selected { stroke: var(--ink); stroke-width: 2.5px; }
.olat-v3 .olat-boundary {
  fill: none;
  stroke: #333;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
