/* Дефолтные состояния */

.heart {
  transform-origin: center;
}

.sparks {
  opacity: 0;
}

.contour {
  transition: fill 0.1s linear;
}

.core {
  fill: transparent;
  transition: fill 0.3s linear 0.03s;
}

.main-body {
  fill: transparent;
  transition: fill 0.3s linear;
}

/* Hover */

.like-icon:hover .core {
  fill: var(--contour-color);
  transition: fill 0.3s linear;
}

.like-icon:hover .main-body {
  fill: var(--contour-color);
  transition: fill 0.3s linear 0.05s;
}

/* Active */

.like-icon:active .core {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear;
}

.like-icon:active .main-body {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear 0.05s;
}

/* Is-liked */

.like-icon.is-liked .core {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear;
}

.like-icon.is-liked .main-body {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear 0.05s;
}

.like-icon.is-liked .contour {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear 0.06s;
}

.like-icon.is-liked .heart {
  animation: heart-scale 0.3s ease-in 0.1s;
}

.like-icon.is-liked .sparks {
  animation: sparks-opacity 0.3s ease-in 0.3s;
}

/* Keyframes */

@keyframes heart-scale {

  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes sparks-opacity {

  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
