.bg-body-tertiary {
  background-color: #1a6183 !important;
}
.navbar-nav .nav-link,
.navbar-nav .nav-link.active {
  color: #fff;
}

.weather-filters .list-group-horizontal>.list-group-item+.list-group-item,
.weather-filters .list-group-horizontal>.list-group-item:first-child:not(:last-child) {
  border: none;
}
.weather-filters .list-group-horizontal {
  align-items: center;
}
.map-container {
  /* width: 100%;
  display: flex;
  align-items: baseline; 
  justify-content: center; */
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 600px;
}
#map {
  flex: 1;
  height: 100% !important;
  width: auto !important;
}

#info-panel {
  /* width: 0;
  height: 100%;
  background-color: #f8f9fa;
  overflow: auto;
  transition: width 0.3s ease;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1); */
  position: relative;
  height: 100%;
  width: 0;
  background-color: #f8f9fa;
  overflow: auto;
  transition: width 0.3s ease;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

#info-panel.active {
  width: 500px;
  height: 100%;
  overflow: hidden;
}

#info-content {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.info-header {
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.info-section {
  margin-bottom: 20px;
}

.info-label {
  font-weight: bold;
  margin-bottom: 5px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

.data-chart {
  width: 100%;
  max-width: 100%;
  height: 300px;
  margin-top: 15px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  box-sizing: border-box;
}

/* Stat card for current reading */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  border-left: 4px solid #1a73e8;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  margin-bottom: 16px;
}
.stat-card.stat-rainfall {
  border-left-color: #0d9488;
}
.stat-card.stat-river {
  border-left-color: #6366f1;
}
.stat-card-label {
  font-size: 11px;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-card-value {
  font-size: 32px;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
}
.stat-card-value .stat-unit {
  font-size: 15px;
  font-weight: 400;
  color: #000;
}
.stat-card-sub {
  font-size: 12px;
  color: #000;
  margin-top: 4px;
}
.reservoir-progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}
.reservoir-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #93c5fd, #1a73e8);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.current-level {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  margin: 10px 0;
}

.timestamp {
  font-size: 12px;
  color: #7f8c8d;
  margin-bottom: 10px;
}

/* FEMA chart legend (below river chart) */
.fema-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  padding: 6px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.fema-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.fema-legend-line {
  display: inline-block;
  width: 16px;
  height: 0;
  border-top: 2px dashed;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .container-fluid.mt-5.mb-5 {
    display: flex;
    flex-direction: column;
  }

  /* Move filter below the map on mobile */
  #map-filter-control {
    order: 2;
    margin-top: 0;
    margin-bottom: 0;
  }

  .map-container {
    flex-direction: column;
    height: auto;
    order: 1;
  }

  /* Info panel comes after filter */
  #info-panel {
    order: 3;
  }

  #map {
    height: 400px !important;
    width: 100% !important;
  }

  #info-panel.active {
    width: 100%;
    height: auto;
    min-height: 400px;
    overflow-y: auto;
  }

  #info-content {
    height: auto;
  }
}