/* ---------- Method Type (below the pie) ---------- */
.method-chart-container {
  margin-top: 24px;            /* spacing from the pie */
}

#methodChart {
  width: 100%;
}

/* Optional hover cue for both bar charts */
#barChart .group:hover .bar,
#methodChart .group:hover .bar {
  filter: brightness(0.9);
}

/* Active (selected) state: darker shade for Issue + Method Type bars */
#barChart .group.is-selected .bar,
#methodChart .group.is-selected .bar {
  filter: brightness(0.8);
}

/* Keep label sizing consistent on small screens */
@media (max-width: 500px) {
  #methodChart .label {
    font-size: 14px;
    font-weight: bold;
  }
}

/* If you want a little breathing room under labels for both bar charts */
#barChart .label,
#methodChart .label {
  fill: black;
  font-size: 16px;
  font-weight: bold;
  text-anchor: start;
}

/* Optional: tighten vertical gaps on smaller screens */
@media (max-width: 900px) {
  .method-chart-container {
    margin-top: 16px;
  }
}


#barChart {
  width: 100%;
}

/* Bars styled in sky blue */
.bar {
  fill: skyblue;
}
/* Label style: bold 18px sans-serif, black text */
.bar-label {
  fill: black;
  font-size: 16px;
  font-weight: bold;
  text-anchor: start;
}

.chart-title{
  font-size: 2.8rem;
  font-weight: bold;
}

.chart-sub-title{
  font-size: 1.8rem;
  font-weight: bold;
}

@media (max-width: 500px) {
  .chart-section .u-inner-container{
    padding: 0 8px !important;
  }

  .chart-section .bar-label {
    font-size: 14px;
    font-weight: bold;
  }
}

.chart-container{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0 20px;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}


.bar-chart-container,
.pie-chart-container {
  flex: 1 1 0;
  min-width: 0; /* Prevent overflow */
}

/* Optional: Make sure charts are responsive */
@media (max-width: 900px) {
  .chart-container {
    flex-direction: column;
  }
  .bar-chart-container,
  .pie-chart-container {
    width: 95%;
  }
}

/* Each label and color box */
#labelContainer .label-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

/* Color box style */
.color-box {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

/* Label text style */
.label-text {
  font-size: 16px;
}


/* Tooltip styling */
.tooltipPicChart {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  z-index: 10;
}

.chart-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto;
  width: 100%;
}

.chart-row {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.chart-row--titles > div {
  flex: 1 1 0;
  text-align: left;
  padding-bottom: 10px;
  font-size: 1.8rem;
  font-weight: bold;
}

.chart-row--charts > .bar-chart-container,
.chart-row--charts > .pie-chart-container {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 900px) {
  .chart-row {
    flex-direction: column;
  }
  .chart-row--titles > div,
  .chart-row--charts > .bar-chart-container,
  .chart-row--charts > .pie-chart-container {
    width: 100%;
  }
}

.chart-header{
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  margin-bottom: 20px;
}

/* Desktop: two columns, each with title and chart */
.chart-row--charts {
  display: flex;
  flex-direction: row;
  gap: 32px;
  width: 100%;
}

.chart-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.chart-title {
  text-align: left;
  padding-bottom: 10px;
  font-size: 1.8rem;
  font-weight: bold;
}

@media (max-width: 900px) {
  .chart-row--charts {
    flex-direction: column;
    gap: 0;
  }
  .chart-col {
    width: 100%;
    margin-bottom: 24px;
  }
}

#pieChartWrapper {
  display: flex;
  flex-direction: row;  /* side-by-side */
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: left;     /* labels left-aligned */
}

#labelsColumn {
  display: flex;
  flex-direction: column; /* label list vertical */
  align-items: flex-start;
  justify-content: flex-start;
  width: 30%;             /* was 40% */
  max-height: 100%;
  overflow-y: auto;
}

#pieChart {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 70%;             /* was 60% */
}

#pieChart svg {
  width: 100%;
  max-width: 520px;       /* was 420px */
  height: auto;
}

@media (max-width: 900px) {
  #pieChartWrapper {
    flex-direction: column; /* stack on small screens */
    gap: 12px;
  }
  #labelsColumn,
  #pieChart {
    width: 100%;
  }
  #labelsColumn {
    align-items: center; /* center labels when stacked */
  }
}

.y-grid path { display: none; }    /* hides the Y grid outline */
.y-axis path, .x-axis path { display: none; } /* hides axis domain lines */

.bar.is-selected {
  fill: brightness(0.8);
  filter: brightness(0.8);
}

.bar:hover {
  filter: brightness(0.9);
}

.bar-count {
  font-weight: 600;
}