/* Shared styles for MountainMath visualization pages */

.layer_icon {
  background: url('/images/layers.png') no-repeat center;
  width: 26px;
  height: 26px;
  background-size: contain;
  display: block;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

.map, .census_map, .fullscreen-map {
  width: 100%;
  height: 100vh;
}

/* Leaflet tile opacity */
.map .data-layer .leaflet-tile-container,
.census_map .data-layer .leaflet-tile-container {
  opacity: 0.8;
}

/* Info boxes */
.map div.info,
.census_map div.info {
  max-width: 340px;
  background: rgba(245, 245, 245, 0.8);
  border: 1px solid #272727;
  border-radius: 5px;
  padding: 10px;
}

/* Legend */
.map .legend,
.census_map .legend {
  line-height: 18px;
  color: #555;
}
.map .legend p, .census_map .legend p { margin: 0; }
.map .legend .legend-title, .census_map .legend .legend-title {
  font-weight: bold;
  margin-bottom: 5px;
}
/* Canvas-based maps: SVG overlay should not intercept clicks (canvas handles them) */
.map .leaflet-overlay-pane svg { pointer-events: none; }
/* D3-SVG maps: paths must receive pointer events */
.census_map .leaflet-overlay-pane svg path { pointer-events: all; }
.map .legend i, .census_map .legend i {
  width: 18px;
  height: 18px;
  float: left;
  margin-right: 8px;
}

/* Paths */
.map path, .census_map path { cursor: pointer; }
.map path.assessment:hover, .census_map path.assessment:hover { opacity: 1; }
.map path.assessment, .census_map path.assessment {
  stroke: grey;
  stroke-width: 0.5px;
  opacity: 0.7;
}
path.census:hover { opacity: 1; }
path.census {
  stroke: grey;
  stroke-width: 0.5px;
  opacity: 0.7;
}

/* Dark map background */
.map.leaflet-container { background: rgb(36, 36, 38); }

/* Leaflet 1.x sets font-size: 0.75rem (12px) on .leaflet-container; restore to 14px */
.leaflet-container { font-size: 14px; }

/* Layer menu toggle */
.noshow_hover, .map_menu:hover .show_hover { display: none; }
.map_menu:hover .noshow_hover { display: block; }

/* Property detail popups */
.details_streetview, .details_plain { min-width: 300px; }
.details_streetview h1, .details_streetview h2,
.details_streetview h3, .details_streetview h4,
.details_plain h1, .details_plain h2,
.details_plain h3, .details_plain h4 { text-align: center; }
.details_streetview .streetview_header { display: none; padding: 15px 0; }
@media (min-width: 768px) {
  .details_streetview { min-width: 640px; }
  .details_streetview .leaflet-popup-content { min-width: 620px; }
  .details_streetview .streetview_header { display: inherit; }
}
.details-popup .scrollable-content { max-height: 500px; overflow: scroll; }

/* Tax table */
#tax-roaster { margin-top: 10px; }
#tax-roaster table { border-collapse: collapse; }
#tax-roaster table, #tax-roaster th, #tax-roaster td { border: 1px solid black; }
#tax-roaster tr:hover { background-color: #f5f5f5; }
#tax-roaster tr:nth-child(even) { background-color: #f2f2f2; }

/* Census info box */
div#infobox { position: absolute; top: 55px; left: 6px; }
div#infobox #info { float: left; color: white; opacity: 0.7; padding: 5px; }
div#infobox #title { float: left; color: mediumpurple; opacity: 0.7; padding: 5px; }

/* WebGL fallback */
.no-webgl-message {
  display: none;
  background: #cc0000;
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 16px;
}

/* Feature tooltip for Tangram pages */
.building-label, .feature-info {
  position: fixed;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10000;
  font-family: sans-serif;
}
.building-label h4, .feature-info h4 {
  margin: 2px 0;
  font-size: 14px;
  font-weight: normal;
}

/* Affordability page */
#affordability-container {
  position: relative;
  width: 100%;
  height: 100vh;
}
#affordability-container .info {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  padding: 15px;
  border-radius: 5px;
  max-width: 320px;
  font-family: sans-serif;
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
#affordability-container .info h4 { margin: 0 0 8px; font-size: 14px; }
#affordability-container .slider-wrapper { margin: 10px 0; }
#affordability-container .caption { font-size: 12px; color: #555; margin-top: 6px; }
#legend {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  border-radius: 4px;
  font-family: sans-serif;
  font-size: 13px;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
#legend .swath {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
}
#mountainmath-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  font-family: sans-serif;
  font-size: 13px;
}

/* Fair price / demoprop */
#demoprop-header {
  padding: 8px 15px;
  background: #2c2c2c;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  box-sizing: border-box;
}
#demoprop-header input {
  flex: 1;
  padding: 4px 8px;
  border-radius: 3px;
  border: none;
  font-size: 14px;
}
#demoprop-body {
  display: flex;
  height: calc(100vh - 42px);
}
#demoprop-map { flex: 1; }
#demoprop-details {
  width: 350px;
  overflow-y: auto;
  padding: 15px;
  background: #f8f8f8;
  border-left: 1px solid #ddd;
  font-family: sans-serif;
  font-size: 14px;
}

/* Bike providers */
body.bike-providers-page {
  overflow: auto;
  font-family: sans-serif;
  padding: 30px;
}
.bike-providers-page h1 { font-size: 24px; margin-bottom: 20px; }
.bike-providers-page ul { list-style: none; padding: 0; }
.bike-providers-page li { margin: 8px 0; }
.bike-providers-page a { color: #0066cc; font-size: 18px; }
.provider-graphs { padding: 20px; max-width: 900px; margin: 0 auto; }
.graph-container {
  margin: 10px 5%;
  padding: 2px;
  border: 1px solid black;
  border-radius: 5px;
}
