#simulator-result {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  height: 100%;
}

/* Apply flex ONLY when showing loading */
.simulator-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 16px;
  color: #272B5C;
  height: 100%;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #ccc;
  border-top: 3px solid #272B5C;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Pie Charts CSS*/
.simulator-charts-wrapper {
  display: flex;
  justify-content: center; /* Center the charts */
  gap: 30px;
  flex-wrap: wrap; /* Stack on smaller screens */
  margin-bottom: 2rem;
  width: 100%;
}

.chart-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 45%; /* Allow two boxes side by side */
  max-width: 45%;
  box-sizing: border-box;
}

.chart-canvas {
  width: 100%;
  height: 300px;
  position: relative;
  flex-shrink: 0;
}

.chart-values{
  margin-top: 8px;
}

#chart-row-1 .chart-box {
  flex: 1 1 100%;
  max-width: 100%;
}

#chart-row-2 .chart-box {
  flex: 0 1 45%;
  max-width: 45%;
}

.doughnutSummary {
  position: absolute;
  top: 50%;
  left: 50%;
  text-align: center;
  cursor: default;
}

.doughnutSummaryTitle {
  position: absolute;
  top: 50%;
  width: 100%;
  margin-top: -27%;
  font-size: 15px;
  letter-spacing: .06em;
}

.doughnutSummaryNumber {
  position: absolute;
  top: 50%;
  width: 100%;
  margin-top: -8.15%;
  color: #1d165f;
  font-weight: 500;
  line-height: 1.2;
  font-size: 1.25rem;
}

.chart-legend-color-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 2px;
}

/* Simulator CTA starts hidden */
#simulator-cta {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .chart-box {
    flex: 1 1 100%;
    max-width: 100%;
  }
  #chart-row-2 .chart-box {
    flex: 1 1 100%;
    max-width: 100%;
  }
}