.tab-content {
  overflow: hidden;
  display: none;
}
.tab input:checked ~ .tab-content {
  display: block;
}
/* [THE LABEL] */
.tab input {
  display: none;
}
.tab label {
  display: block;
  background: #353535;
  color: #fff;
  font-weight: bold;
  padding: 10px;
  cursor: pointer;
}
.tab input[type=checkbox]:checked + label::after,
.tab input[type=radio]:checked + label::after {
  transform: rotate(90deg);
}

/* [THE CONTENTS] */
.tab-content {
  overflow: hidden;
  background: #a7b0b7;
  /* CSS animation will not work with auto height */
  /* This is why we use max-height */
  transition: max-height 0.4s; 
  max-height: 0;
}
.tab-content p {
  margin: 20px;
}
.tab input:checked ~ .tab-content {
  /* Set the max-height to a large number */
  /* Or 100% viewport height */
  max-height: 100vh;
}
