/* wedi downloads */

.wedi-downloads-container h2 {
  margin-block-end: 0.4em;
}

.wedi-downloads-category-filter {
  margin-bottom: 3.2rem;
}

.wedi-downloads-searchbar {
  margin-bottom: 3.2rem;
}

.wedi-downloads-subfilter > div {
  margin-top: 2.4rem;
}

.wedi-downloads-subfilter > div:first-child {
  margin-top: 0;
}

.wedi-downloads-resultlist-header {
  display: flex;
  margin-bottom: 2.4rem;
}

.wedi-downloads-resultlist-header .btn-download-all {
  display: none;
}

.wedi-downloads-resultlist-header .btn-download-all.active {
  display: block;
}

.wedi-downloads-subfilter label:hover {
  cursor: pointer;
}

.wedi-downloads-subfilter .disabled label {
  opacity: 0.5;
  cursor: not-allowed;
}

.wedi-downloads-resultlist-results .image-wrapper {
  cursor: pointer;
}

.frame--type-wedidownloads_filter
  button:not(
    .btn-download-all,
    .wedi-downloads-pagination__button,
    .wedi-downloads-pagination__number
  ) {
  width: 100%;
}

.wedi-downloads-subfilter input[type='checkbox'],
input[type='checkbox'].add-all-to-basket {
  top: 0;
}

.download-list-item {
  margin-bottom: 1.6rem;
  padding: 1.6rem;

  .button,
  .form-check {
    margin-top: 1.6rem;
  }
}

.btn-download-all {
  margin-top: 1.6rem;

  @media (max-width: 768px) {
    width: 100%;
  }
}

.checkbox-wrapper {
  cursor: pointer;
}

.wedi-downloads-results-sorting {
  @media (min-width: 768px) {
    display: flex;

    span {
      display: block;
      margin-inline-end: 0.8rem;
    }
  }
}

.wedi-downloads-pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 1.6rem;

  @media (min-width: 768px) {
    gap: 2.4rem;
    margin-top: 3.2rem;
  }
}

.wedi-downloads-pagination__list {
  display: flex;
  justify-content: space-around;
  width: 100%;

  @media (min-width: 384px) {
    gap: 0.4rem;
    width: unset;
  }

  @media (min-width: 768px) {
    gap: 1.6rem;
    justify-content: center;
    width: unset;
  }

  span {
    display: flex;
    align-items: flex-end;
    font-weight: bold;
  }
}

.wedi-downloads-pagination__number {
  width: 3.2rem;
  height: 3.2rem;
  border: 0.1rem solid #009ee0;
  transition:
    background-color 0.3s ease-in-out,
    color 0.3s ease-in-out;

  @media (min-width: 576px) {
    width: 4rem;
    height: 4rem;
  }

  @media (min-width: 768px) {
    width: 4.8rem;
    height: 4.8rem;
  }

  &:hover,
  &.active {
    background-color: #009ee0;
    color: white;
  }
}

.wedi-downloads-pagination__button {
  position: relative;
  width: 3.2rem;
  height: 3.2rem;
  background-color: #009ee0;
  transition: background-color 0.3s ease-in-out;

  @media (min-width: 576px) {
    width: 4rem;
    height: 4rem;
  }

  @media (min-width: 768px) {
    width: 4.8rem;
    height: 4.8rem;
  }

  &:hover {
    background-color: #0170a3;
  }

  &:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 53%;
    width: 2.4rem;
    height: 2.4rem;
    background-color: white;
    transform: translate(-50%, -50%);
    mask-image: url('https://www.wedi.net/_assets/f05f9c1daa1805f65085e93659ed01c9/Icons/chevron.svg');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;

    @media (min-width: 576px) {
      width: 4rem;
      height: 4rem;
    }
  }
}

.wedi-downloads-pagination__button--prev {
  &:after {
    transform: translate(-55%, -50%) rotate(180deg);
  }
}

.image-wrapper {
  width: 100%;
  max-width: 140px; /* matches your f:image width */
  aspect-ratio: 140 / 190; /* maintains the same proportions as your image */
}

.wedi-downloads-icon {
  width: 90%;
  height: 90%;
  background-color: #009ee0;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.wedi-downloads-icon--dxf {
  mask-image: url('https://www.wedi.net/_assets/f05f9c1daa1805f65085e93659ed01c9/Icons/dxf.svg');
}

.wedi-downloads-icon--dwg {
  mask-image: url('https://www.wedi.net/_assets/f05f9c1daa1805f65085e93659ed01c9/Icons/dwg.svg');
}

.wedi-downloads-icon--mp4 {
  mask-image: url('https://www.wedi.net/_assets/f05f9c1daa1805f65085e93659ed01c9/Icons/mp4.svg');
}
