[data-formset].formset-active > fieldset {
  margin: 0;
  padding: 0.25rem 1rem;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #aaa;
  position: relative;
  padding-right: 0.25rem 1rem50px10px;
}
[data-formset].formset-active > fieldset:nth-child(odd) {
  background: #eee;
}
[data-formset].formset-active > fieldset:nth-child(even) {
  background: #ddd;
}
[data-formset].formset-active > fieldset .formset-delete {
  transition: width 0.25s ease-in-out;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50px;
  margin: 0;
  list-style: none;
}
[data-formset].formset-active > fieldset .formset-delete label {
  background-color: transparent;
}
[data-formset].formset-active > fieldset .formset-delete label, [data-formset].formset-active > fieldset .formset-delete label::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-indent: -999rem;
}
[data-formset].formset-active > fieldset .formset-delete label::before {
  content: " ";
  background-color: #aaa;
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgyNHYyNEgweiIvPjxwYXRoIGQ9Ik03IDRWMmgxMHYyaDV2MmgtMnYxNWExIDEgMCAwIDEtMSAxSDVhMSAxIDAgMCAxLTEtMVY2SDJWNGg1ek02IDZ2MTRoMTJWNkg2em0zIDNoMnY4SDlWOXptNCAwaDJ2OGgtMlY5eiIvPjwvc3ZnPg==");
  mask-position: center;
  mask-repeat: no-repeat;
}
[data-formset].formset-active > fieldset .formset-delete label:hover {
  background: #a22;
  cursor: pointer;
}
[data-formset].formset-active > fieldset .formset-delete label:hover::before {
  background-color: #fff;
}
[data-formset].formset-active > fieldset .formset-delete input[name$=-DELETE] {
  display: none;
}
[data-formset].formset-active > fieldset.deleted .formset-delete {
  width: 100%;
}
[data-formset].formset-active > fieldset.deleted .formset-delete label {
  background: #822;
}
[data-formset].formset-active > fieldset.deleted .formset-delete label::before {
  background-color: #eee;
}
[data-formset].formset-active > fieldset.deleted .formset-delete label:hover {
  background: #a22;
}
[data-formset].formset-active > fieldset.deleted .formset-delete label:hover::before {
  background-color: #fff;
}
[data-formset].formset-active > fieldset.added {
  animation: add-new 0.5s ease-in-out;
}
@keyframes add-new {
  0% {
    max-height: 0;
  }
  99% {
    max-height: 2000px;
  }
  100% {
    max-height: auto;
  }
}
[data-formset].formset-active button.formset-add {
  border: 0;
  width: 100%;
  padding: 1rem;
  margin: 0 0 1rem 0;
  background: #ccc;
  position: relative;
  overflow: hidden;
  text-indent: -999rem;
}
[data-formset].formset-active button.formset-add::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #444;
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgyNHYyNEgweiIvPjxwYXRoIGQ9Ik0xMiAyMkM2LjQ3NyAyMiAyIDE3LjUyMyAyIDEyUzYuNDc3IDIgMTIgMnMxMCA0LjQ3NyAxMCAxMC00LjQ3NyAxMC0xMCAxMHptLTEtMTFIN3YyaDR2NGgydi00aDR2LTJoLTRWN2gtMnY0eiIvPjwvc3ZnPg==");
  mask-position: center;
  mask-repeat: no-repeat;
}
[data-formset].formset-active button.formset-add:hover {
  background: #2a2;
  cursor: pointer;
}
[data-formset].formset-active button.formset-add:hover::before {
  background-color: #fff;
}
[data-formset].formset-active.formset-at-min > fieldset:not(.deleted) label[for$=-DELETE],
[data-formset].formset-active.formset-at-min > fieldset:not(.deleted) input[type=checkbox][name$=-DELETE] {
  display: none;
}
[data-formset].formset-active.formset-at-max button.formset-add {
  display: none;
}
