#whishlist-cards.loading:after {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  content: "";
  background: #000000;
  opacity: 0.5;
  z-index: 5;
}

#whishlist-cards.loading:before {
  display: block;
  width: 24px;
  height: 24px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -12px;
  margin-left: -12px;
  content: "";
  background-image: url("../images/loading.svg");
  background-repeat: no-repeat;
  background-size: 100%;
  z-index: 6;
}

.wishlist-toggle {
  outline: none;
  border: none;
}

.wishlist-toggle:is(:hover, :active, :focus) svg {
  outline: none;
  border: none;
}

.wishlist-toggle svg .loading,
.wishlist-toggle svg .check {
  opacity: 0;
}

.wishlist-toggle.active svg .check {
  opacity: 1;
}

.wishlist-toggle.active svg .heart {
  opacity: 0;
}

.wishlist-toggle.loading svg .loading,
#whishlist-cards.loading:before {
  animation: loading 500ms 0ms infinite normal linear;
  transform-origin: center;
  opacity: 1;
}

.wishlist-toggle.loading svg .heart {
  opacity: 0;
}

@keyframes loading {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
