.graphs-card {
  max-width: 1200px;
}

.graphs-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) 320px;
  gap: 28px;
}

.pollution-graph-box,
.co2-graph-box {
  padding: 24px;
  border-radius: 14px;
  background: #fff;
  color: #151515;
}

.pollution-graph-box h3,
.co2-graph-box h3 {
  margin-bottom: 18px;
  text-align: center;
}

.graph-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
}

.graph-filters label {
  padding: 6px 9px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #f7f8f9;
  cursor: pointer;
}

.svg-chart-wrapper {
  position: relative;
  width: 100%;
  height: 430px;
  overflow: hidden;
  background: #fff;
}

#pollutantsSvg {
  width: 100%;
  height: 430px;
  display: block;
}

.chart-legend {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
}

.legend-color {
  width: 18px;
  height: 4px;
  border-radius: 99px;
}

.data-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 3px dashed #9b0000;
  background: rgba(255, 255, 255, 0.96);
  color: #9b0000;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.hidden {
  display: none;
}

.co2-graph-box {
  text-align: center;
}

.co2-graph-box h3 {
  letter-spacing: 0.14em;
}

.co2-info p {
  margin: 8px 0;
}

.co2-info strong {
  color: #0b4c7c;
  font-size: 1.5rem;
}

.co2-bar-graph {
  margin-top: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}

.co2-max-bar {
  position: relative;
  width: 145px;
  height: 320px;
  padding-top: 14px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  background: #8fa4b7;
  color: #fff;
  font-size: 1.35rem;
}

.co2-current-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 12px;
  background: #005b85;
  color: #fff;
}

.co2-current-label {
  margin-bottom: 42px;
  color: #0b4c7c;
  text-align: left;
}

@media (max-width: 950px) {
  .graphs-layout {
    grid-template-columns: 1fr;
  }

  .svg-chart-wrapper,
  #pollutantsSvg {
    height: 360px;
  }
}

@media (max-width: 620px) {
  .pollution-graph-box,
  .co2-graph-box {
    padding: 14px;
  }

  .svg-chart-wrapper,
  #pollutantsSvg {
    height: 310px;
  }
}
