.total {
  background-color: var(--dark-blue-shade-10);
  border-bottom: 1px solid var(--dark-blue-shade-10);
  align-items: center;
  display: grid;
  font-weight: 400;
  grid-template-columns: auto auto;
  margin: 1rem -1rem 1rem -1rem;
}
.total:first-child {
  margin-top: -1rem;
}
.total dt {
  background-color: var(--dark-blue-shade-5);
  font-size: 100%;
  padding: 1rem;
  position: relative;
}
.total dt:after {
  background-color: var(--dark-blue-shade-5);
  content: "";
  position: absolute;
  display: block;
  right: -24px;
  top: 0;
  bottom: 0;
  width: 25px;
  height: 100%;
  -webkit-clip-path: polygon(0 0, 100% 50%, 0 100%);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.total dt strong {
  display: flex;
}
.total dd {
  font-size: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: end;
  margin-left: auto;
  gap: 0.5rem;
  padding: 0 1rem;
  position: relative;
}
.total dd .quiet {
  margin-bottom: -0.5rem;
}
.total dd strong {
  font-size: 200%;
  line-height: normal;
}
.total dd strong.changed {
  animation: total-changed 0.5s linear;
  animation-fill-mode: forwards;
}

@keyframes total-changed {
  0% {
    color: var(--yellow);
    transform: scale(1.2);
  }
  100% {
    color: var(--white);
    transform: scale(1);
  }
}

/* Animation for Turbo Stream updates */
#total-amount.total-updated {
  animation: total-changed 0.5s linear;
  animation-fill-mode: forwards;
}
