.bar-chart {
  border: 1px black solid;
  display: flex;
  flex-direction: column;
  padding: min(15%, 10px);
  user-select: none;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

.bar-chart * {
  box-sizing: border-box;
}

.middle {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
}

.chart-title {
  text-align: center;
  padding: min(5%, 15px);
}

.y-tick {
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  width: 10px;
}

.tick {
  background-color: grey;
  height: 0.5px;
  width: 10px;
}

.y-axis-label {
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  text-align: right;
  padding-right: 0.2em;
  min-height: 100%;
}

.y-axis {
  height: 100%;
  display: flex;
}

.y-axis-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  transform: rotate(180deg);
  font-weight: bold;
  padding-left: 0.2em;
}

@keyframes height-change {
  0% {
    max-height: 0%;
  }
  100% {
    max-height: 100%;
  }
}

.bars {
  display: flex;
  height: 100%;
}

.pos-bars {
  border-bottom: 2px black solid;
  align-items: flex-end;
}

.bar {
  display: flex;
  justify-content: center;
}

.bar-animation {
  animation-name: height-change;
  animation-duration: 1s;
  animation-timing-function: linear;
}

.stacked-bar {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.x-axis {
  display: flex;
  width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.x-axis-title {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  padding-top: 0.2em;
}

.sup {
  vertical-align: super;
}

.chart-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  border-right: 1px black solid;
  border-left: 1px black solid;
  border-top: 1px grey solid;
}

.stacked-label {
  text-align: center;
  position: absolute;
  width: 100%;
}

.legend{
  display: flex;
  flex-direction: column;
  padding: 0 1em;
  justify-content: center;
}

.legend > div {
  display: flex;
  align-items: center;
}

.legend > div > div {
  width: 1em;
  height: 1em;
  margin-right: 0.2em;
}