/* --------------------
   LEFT PANEL: MAP
--------------------- */
#site-map{
  width:100%;
  height:clamp(300px, 52vh, 530px);
  min-height:300px;
  max-height:530px;
  border-radius:.75rem;
  border:1px solid #dee2e6;
  overflow:hidden;
}

@media (max-width: 575.98px){
  #site-map{
    height:clamp(240px, 42vh, 320px);
    min-height:240px;
    max-height:320px;
  }
}

@media (min-width: 768px){
  #site-map{
    height:clamp(320px, 46vh, 540px);
    min-height:320px;
    max-height:540px;
  }
}

@media (min-width: 992px){
  #site-map{
    height:clamp(340px, 40vh, 580px);
    min-height:340px;
    max-height:580px;
  }
}
/* --------------------
   RIGHT PANEL: TEXT & SUMMARY
--------------------- */

#welcome-instructions {
  min-height: 50vh;
  font-size: 0.95rem;
}

/* Slightly reduce padding on smaller screens */
@media (max-width: 768px) {
  #welcome-instructions {
    min-height: auto;
    margin-top: 1rem;
    font-size: 0.9rem;
  }
}

/* No-data message */
#no-data-message {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Summary box */
#summary-container {
  /* visibility controlled by Bootstrap classes (d-none / d-flex) */
  background-color: #e3f2fd;
  border-radius: 0.5rem;
  border: 1px solid #bbdefb;
  gap: 0.75rem;
}

#dv-summary {
  font-size: 0.9rem;
}

#downloadCSV {
  white-space: nowrap;
}

/* Stack summary/CSV vertically on small screens */
@media (max-width: 768px) {
  #summary-container {
    flex-direction: column;
    align-items: flex-start;
  }

  #downloadCSV {
    align-self: flex-start;
  }
}

/* --------------------
   CALENDAR PLOTS
--------------------- */

/* Let the plots scroll horizontally on small screens */
#plots {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

/* Canvas fills width on larger screens, but is scrollable on small ones */
#plots canvas {
  display: block;
  max-width: 100%;
  height: auto;
  /* ensure canvas is not too narrow on phones: */
  min-width: 600px;
}

#dvTabs .nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  transition: background-color 0.2s, color 0.2s;
}

#dvTabs .nav-link:hover {
  background-color: #f5f9ff;
  color: #0d6efd;
}

#dvTabs .nav-link.active {
  background-color: #eaf3ff !important;
  color: #0d6efd !important;
  border-bottom-color: transparent;
}


/* On very large screens, don't let canvas get too huge visually */
@media (min-width: 1200px) {
  #plots canvas {
    max-width: 100%;
  }
}

/* --------------------
   BAR CHART
--------------------- */

#bar-chart-container h6 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

#barChart {
  max-width: 100%;
}

/* --------------------
   FORM TWEAKS
--------------------- */

#criteriaForm .form-label {
  font-size: 0.85rem;
}

#criteriaForm input,
#criteriaForm select {
  font-size: 0.85rem;
}

/* Add a little breathing room below the left panel on small screens */
@media (max-width: 768px) {
  .col-md-4 {
    margin-bottom: 1.5rem;
  }
}

