/* Map container */
#map {
  /* Taller map? Adjust this clamp or use calc(100vh - Xpx) */
  height: clamp(600px, 95vh, 1080px);
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
  width: 100%;
}

/* Leaflet legend/info (if used elsewhere) */
.info {
  padding: 6px 8px;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  border-radius: 5px;
}

.legend-line {
  display: inline-block;
  width: 30px;
  height: 0;
  border-top: 3px solid;
  margin-right: 8px;
}

/* Chart rows inside modal */
.site-row {
  display: flex;
  /*justify-content: flex-start;*/
  width: 100%;
  gap: 5px;
  flex-wrap: wrap;
}

#chartsContainer {
  width: 100%;
  display: flex;
  flex-direction: column;
  /*align-items: flex-start;*/
}

/* Chart containers (modal charts) */
.canvas-container {
  flex: 1;
  max-width: 100%;
  height: 180px;
  position: relative;
  background: #fff;
}

canvas {
  width: 100% !important;
  height: 100% !important;
}

/* The click-to-zoom icon */
.chart-zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

/* Optional hover feel */
.chart-zoom-btn:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-1px);
}

/* If you want the whole chart to feel clickable too */
.canvas-container canvas {
  cursor: zoom-in;
}

/* Modal look & feel */
#timeSeriesModal .modal-content {
  padding: 5px;
  background: white;
}

#chartZoomModal .modal-content,
#chartZoomModal .modal-body {
  background: #fff !important;
}

#chartZoomModal .modal-title {
  width: 100%;
  text-align: center;
}


/* Bootstrap 5 uses CSS vars for backdrop */
.modal-backdrop {
  --bs-backdrop-opacity: 1 !important;   /* fully opaque */
  --bs-backdrop-bg: #fff !important;     /* white backdrop */
}

/* extra safety (in case vars don’t apply) */
.modal-backdrop.show {
  opacity: 1 !important;
  background-color: #fff !important;
}

/* Make the zoom modal itself an opaque white “sheet” */
#chartZoomModal.modal {
  background: #fff !important;     /* covers what’s behind */
}

#chartZoomModal .modal-dialog,
#chartZoomModal .modal-content,
#chartZoomModal .modal-body {
  background: #fff !important;
  opacity: 1 !important;
}


/* Responsive helpers */
@media (max-width: 991.98px) {
  /* Stack sidebar and content vertically for tablet/phone if needed
     (depends on your base grid; usually Bootstrap handles this) */
  .site-row { gap: 5px; }
  .canvas-container { height: 200px; }
}
@media (max-width: 575.98px) {
  #map { height: 65vh; }
  .canvas-container { height: 220px; }
}

