@import './black-background';

$main-animation-delay: 5s;
$building-duration: 0.5s;
$coin-animation-duration: 1s;
$delay-before-last-disapearing: 1s;

@mixin rentMixin {
  .animated.rent {
    @include blackBackgroundMixin;

    #rent_building,
    #rent_buiding_top {
      animation-name: building_animation;
      animation-delay: $main-animation-delay;
      animation-duration: $building-duration;
      animation-timing-function: cubic-bezier(0.84, 1.84, 0.59, 0.72);
      animation-iteration-count: 1;
      animation-fill-mode: forwards;
      scale: 0;
      transform-origin: 4008px 6890px;
    }

    #hand_with_coin {
      animation-name: hand_with_coin_animation;
      animation-delay: $main-animation-delay;
      animation-duration: $building-duration;
      animation-timing-function: cubic-bezier(0.84, 1.84, 0.59, 0.72);
      animation-iteration-count: 1;
      animation-fill-mode: forwards;
      rotate: -70deg;
      transform-origin: -1144px 1601px;
    }

    #coin {
      animation-name: coin_animation;
      animation-delay: $main-animation-delay + $building-duration;
      animation-duration: $coin-animation-duration;
      animation-timing-function: ease-in-out;
      animation-iteration-count: 1;
      animation-fill-mode: forwards;
    }

    #main-container_1_ {
      animation-name: main_container_animation;
      animation-delay: $main-animation-delay + $building-duration + $coin-animation-duration +
        $delay-before-last-disapearing;
      animation-duration: 0.5s;
      animation-iteration-count: 1;
      animation-fill-mode: forwards;
    }

    #finger_1_1_ {
      animation-name: finger_1_animation;
      animation-delay: $main-animation-delay + $building-duration - 0.2s;
      animation-duration: $coin-animation-duration;
      animation-iteration-count: 1;
      animation-fill-mode: forwards;
      transform-origin: 4214px 2931px;
    }

    #finger_2_1_ {
      animation-name: finger_2_animation;
      animation-delay: $main-animation-delay + $building-duration - 0.2s;
      animation-duration: $coin-animation-duration;
      animation-iteration-count: 1;
      animation-fill-mode: forwards;
      transform-origin: 3938px 3016px;
    }

    use.d-none {
      display: block;
    }
  }

  @keyframes building_animation {
    0% {
      scale: 0;
    }
    100% {
      scale: 1;
    }
  }

  @keyframes hand_with_coin_animation {
    0% {
      rotate: -70deg;
    }
    100% {
      rotate: 0deg;
    }
  }

  @keyframes main_container_animation {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  @keyframes coin_animation {
    0% {
      translate: 0 0;
    }
    100% {
      translate: 0 2000px;
    }
  }

  @keyframes finger_1_animation {
    0% {
      rotate: 0;
    }
    100% {
      rotate: -10deg;
    }
  }

  @keyframes finger_2_animation {
    0% {
      rotate: 0;
    }
    100% {
      rotate: 10deg;
    }
  }
}
