.filter__bar {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  padding: 60px 0;
}

.filter__bar-items > div,
.filter__bar-items .fieldset-wrapper > div {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 60px;
}

.filter__bar-items .form-item {
  margin: 0;
}

.filter__bar-items .form-item > input:checked + label {
  padding-bottom: 5px;
  border-bottom: 3px solid #fff;
}

.filter .form-checkbox+.option,
.filter .form-radio+.option {
  padding-left: 0;
}

.filter .form-checkbox+.option:after,
.filter .form-checkbox:checked+.option:after,
.filter .form-radio+.option:after,
.filter .form-radio:checked+.option:before {
  display: none;
}

.filter__bar-items .form-item > label {
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
}

.filter__lip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  overflow: hidden;
  /* because of a nasty YouTube play button */
  z-index: 3;
  background-color: var(--neutral);
  transition: all .25s ease-in-out;
}

.filter__lip--hidden {
  max-height: 0 !important;
}

.filter__lip-trigger {
  display: flex;
  font: var(--tall);
  font-weight: 700;
  /* See comment on line 29 (in the day of writing this) for more information */
  z-index: 4;
  cursor: pointer;
  text-transform: uppercase;
}

.filter__lip-trigger > span {
  margin-left: 5px;
  transform: rotate(0);
  transition: all .25s ease-in-out;
}

.filter__lip-trigger--open > span {
  display: block;
  width: fit-content;
  height: fit-content;
  transform: rotate(45deg);
}

.filter__lip-wrapper {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 1440px;
  padding: 60px var(--offset-x);
  box-sizing: border-box;
}

.filter__lip-headline {
  font-weight: 700;
}

.filter--events .filter__lip-items {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter__lip-items .form-checkboxes,
.filter__lip-items > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 0;
}

.filter--events .filter__lip-items .form-checkboxes,
.filter--events .filter__lip-items > div {
  justify-content: flex-start;
}

.filter--events .form-item-year {
  position: relative;
}

.filter--events .form-item-year > label {
  display: none;
}

.filter--events .form-item-year > select {
  position: relative;
  font-size: var(--short);
  font-weight: 700;
  text-transform: uppercase;
  padding: 15px 100px 15px 20px;
  box-sizing: border-box;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 4px;
  background-color: transparent;
  
  /* Hide select arrow */
  -moz-appearance: none; /* Firefox */
  -webkit-appearance: none; /* Safari and Chrome */
  appearance: none;
}

.filter--events .form-item-year:after {
  content: '';
  position: absolute;
  top: 35%;
  right: 25px;
  width: 15px;
  height: 15px;
  transform: rotate(90deg) translateY(-50%);
  background-repeat: no-repeat;
  background-image: url('/themes/custom/cake/res/icons/arrow_right.svg');
}

.filter__lip-items .form-checkboxes .form-item {
  /* Overwriting the all.css */
  margin-bottom: 0 !important;
}

.filter__lip-items .form-item {
  /* Overwriting the all.css */
  margin: 0;
}

.filter__lip-items .form-checkbox:checked + label {
  position: relative;
  color: var(--pen);
}

.filter__lip-items .form-checkbox:checked + label:after {
  content: 'x';
  position: absolute;
  top: 2px;
  right: -20px;
  margin: 0;
  color: currentColor;
  font-weight: 700;
  font: var(--short);
}

.filter__lip-wrapper label {
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}

.filter__lip-items label > svg {
  position: relative;
  top: 75%;
  margin-right: 5px;
  max-width: 35px;
  max-height: 35px;
  object-fit: cover;
}

.filter__lip-items label > svg > path {
  fill: currentColor;
}

.filter__bar-bottom {
  display: flex;
  justify-content: space-between;
  padding-bottom: 40px;
}

.filter__bar-info {
  font: var(--venti);
  text-transform: uppercase;
}

@media (max-width: 650px) {
  .filter__bar-info {
    font-size: 26px;
  }
}

.filter__bar-search input {
  padding: 15px 20px;
  box-sizing: border-box;
  font: var(--short);
  line-height: 25px;
  font-weight: 700;
  color: #fff;
  border: 2px solid #fff;
  background-color: transparent;
  font-family: Brandon, iconfont, sans-serif;
}

.filter__bar-search input::placeholder {
  color: #fff;
  font-family: Brandon, iconfont, sans-serif;
}

.filter__bar-search .form-item-search {
  position: relative;
}

.filter__bar-search .form-item-search:after {
  content: '';
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 21px;
  height: 23px;
  background-repeat: no-repeat;
  background-image: url('/themes/custom/cake/res/icons/search.svg');
}

@media (max-width: 650px) {
  .filter__lip-headline {
    font-size: 23px;
    line-height: 33px;
  }

  .filter__lip-wrapper {
    gap: 25px 0;
  }

  .filter__lip-items .form-checkboxes,
  .filter__lip-items > div {
    gap: 20px;
  }

  .filter__lip-wrapper label {
    font: var(--demi);
  } 
}

@media (min-width: 651px) and (max-width: 1024px) {
  .filter__lip-headline {
    font-size: 25px;
    line-height: 35px;
  }
  
  .filter__lip-wrapper {
    gap: 25px 0;
  }

  .filter__lip-wrapper label {
    font: var(--tall);
  }
}

@media (max-width: 1024px) {
  .filter--events .filter__lip-items {
    flex-wrap: wrap;
    gap: 25px 0;
  }

  .filter--events .filter__lip-items .form-checkboxes,
  .filter--events .filter__lip-items > div {
    gap: 20px;
  } 

  .filter__bar {
    gap: 25px;
    padding: 25px 0;
    flex-direction: column-reverse;
  }

  .filter__bar-search input {
    width: 100%;
  }

  .filter__bar-bottom {
    flex-direction: column;
    gap: 25px;
  }

  .filter__lip-wrapper {
    padding-top: 80px;
  }

  .filter__lip-wrapper label {
    font-weight: 700;
  }
  
  .filter__lip-trigger {
    font: var(--tall);
    font-weight: 700;
  }
}

@media (min-width: 1025px) {
  .filter__bar {
    align-items: center;
  }

  .filter__lip-headline {
    font-size: 27px;
    line-height: 37px;
  }

  .filter__lip-wrapper {
    gap: 65px 0;
  }
}

.filter__bar-items .form-item input[type="radio"]:focus-visible + label,
.form-checkboxes .form-item input[type="checkbox"]:focus-visible + label {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}
