.accordion {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  color: var(--colour-text-9);
  max-width: 700px;
  margin: auto;
}

.tab input {
  position: absolute;
  opacity: 0;
  z-index: -1;
}

.tab {
  border-radius: var(--border-radius);
  border: 1px solid var(--colour-blue-8);
}

.tab__content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s;
  max-width: 600px;
  margin: auto;
}

.tab input:checked ~ .tab__content {
  max-height: 20rem;
  padding: 0 1rem;
}

.tab__label {
  position: relative;
  display: flex;
  /* justify-content: space-between; */
  color: var(--colour-blue-9);
  font-size: 1.1em;
  font-weight: bold;
  padding: 1em 3em 1em 1em;
  background: rgba(0, 0, 0, 0.07);
  cursor: pointer;
  border-radius: 0.35em;
}

.tab__label::after {
  content: "\276F";
  position: absolute;
  right: 0.7em;
  top: 1.2em;
  width: 1em;
  height: 1em;
  text-align: center;
  transform: rotate(90deg);
  transition: all 0.35s;
}

.tab__label:hover {
  color: white;
  background-color: var(--colour-blue-8);
}

.tab input:checked + .tab__label {
  color: white;
  background-color: var(--colour-blue-8);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.tab input:not(:checked) + .tab__label {
  transition: border-radius 1s;
}

.tab__close {
  justify-content: flex-end;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

/* Arrow animation */
.tab input:not(:checked) + .tab__label:hover::after {
  animation: bounce 0.5s infinite;
}

@keyframes bounce {
  25% {
    transform: rotate(90deg) translate(0.25rem);
  }
  75% {
    transform: rotate(90deg) translate(-0.25rem);
  }
}
