/* * Game modal */
#gameSpinning .__game-modal[item-visible="true"] > .__section-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  animation: none;
}

#gameSpinning .__game-modal-content {
  width: 100%;
  background-color: #fff;
  max-width: 500px;
  height: auto;
  margin: auto;
  padding: 25px 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  /* transform: translateY(-20%); */
  animation: fadeIn 1s ease-in-out;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(1deg);
  }
  20% {
    transform: rotate(3deg);
  }
  30% {
    transform: rotate(5deg);
  }
  40% {
    transform: rotate(7deg);
  }
  50% {
    transform: rotate(6deg);
  }
  60% {
    transform: rotate(4deg);
  }
  70% {
    transform: rotate(2deg);
  }
  80% {
    transform: rotate(-2deg);
  }
  90% {
    transform: rotate(-4deg);
  }
  100% {
    transform: rotate(-1deg);
  }
}

#gameSpinning .__game-modal-content > * {
  align-self: center;
}

#gameSpinning .__game-modal-content > img[item-animate="rotate"] {
  animation: rotate 1s linear forwards;
  animation-iteration-count: infinite;
}

#gameSpinning .__game-modal-content > h2 {
  font-size: 1.5625rem;
  line-height: 1.875rem;
  font-weight: 700;
  letter-spacing: 0em;
  text-align: center;
  margin-bottom: 1.3125rem;
}

#gameSpinning .__game-modal-content > p {
  font-size: 16px;
  padding: 1px 0;
  text-align: center;
}

#gameSpinning .__game-modal .__game-modal-button {
  text-decoration: none;
  background-color: #e4002b;
  color: #fff;
  padding: 9px 100px;
  font-size: 18px;
  border-radius: 15px;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  text-align: center;
  margin-top: 35px;
  font-weight: bold;
  position: relative;
}

#gameSpinning .__game-modal .__game-modal-button::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  transition: all 2s ease;
}

#gameSpinning .__game-modal .__game-modal-button:hover::before {
  width: 100%;
}

#gameSpinning .__game-modal-content--loader {
  position: relative;
  margin: 0 0 1.875rem 0.625rem;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-left-color: #5cb85c;
  animation: loader-spin 1.2s infinite linear;
  display: inline-block;
  vertical-align: top;
  box-sizing: content-box;
  border-radius: 50%;
  width: 8em;
  height: 8em;
}

#gameSpinning .__game-modal-content--loader[item-complete="true"] {
  animation: none;
  border-color: rgb(207, 0, 15);
  transition: border 800ms ease-out;
}

#gameSpinning .__game-modal-content--loader-checkmark {
  display: none;
  box-sizing: content-box;
}

#gameSpinning .__game-modal-content--loader-checkmark[item-error="true"] {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2em;
  height: 4em;
  display: block;
}

#gameSpinning .__game-modal-content--loader-checkmark[item-error="true"]:before,
#gameSpinning .__game-modal-content--loader-checkmark[item-error="true"]:after {
  position: absolute;
  content: "";
  height: 4em;
  width: 2px;
  background-color: rgb(207, 0, 15);
  left: 50%;
  top: 50%;
}

#gameSpinning
  .__game-modal-content--loader-checkmark[item-error="true"]:before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#gameSpinning .__game-modal-content--loader-checkmark[item-error="true"]:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes loader-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes checkmark {
  0% {
    height: 0;
    width: 0;
    opacity: 1;
  }
  20% {
    height: 0;
    width: 2em;
    opacity: 1;
  }
  40% {
    height: 4em;
    width: 2em;
    opacity: 1;
  }
  100% {
    height: 4em;
    width: 2em;
    opacity: 1;
  }
}

@keyframes modal-animate {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
  }
  10% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }
  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }
  30% {
    transform: translate(3px, 2px) rotate(0deg);
  }
  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }
  50% {
    transform: translate(-1px, 2px) rotate(-1deg);
  }
  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }
  70% {
    transform: translate(3px, 1px) rotate(-1deg);
  }
  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }
  90% {
    transform: translate(1px, 2px) rotate(0deg);
  }
  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}

#gameSpinning .__game-modal-content {
  width: 100%;
  background-color: #fff;
  max-width: 500px;
  height: auto;
  margin: auto;
  padding: 25px 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  animation: fadeIn 1s ease-in-out;
  align-items: center;
}

/* _______________________________________________________________________________________________________________ */

section #gameSpinning {
  width: 100%;
  height: 100%;
}

section #gameSpinning[item-visible="false"] {
  display: none;
}

section #gameSpinning[item-visible="true"] {
  display: flex;
  justify-content: center;
  align-items: start;
  padding-top: 40px;
}

#gameSpinning > .__section-content {
  padding: 15px;
}

#gameSpinning .__game-wrapper {
  display: grid;
  justify-content: center;
  margin-top: 2.1875rem;
  opacity: 1;
  transition: all 1s ease 0s;
  pointer-events: auto;
  margin: auto;
  grid-template-columns: repeat(3, 19.5625rem);
}

#gameSpinning .__game-wrapper-box {
  position: relative;
  transition-duration: 0.2s;
  cursor: pointer;
  height: 19.375rem;
}

#gameSpinning .__game-wrapper-box:hover {
  animation: tremor 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

#gameSpinning .__game-wrapper-box-inner,
#gameSpinning .__game-wrapper-box-front {
  right: 0;
  margin: 0 auto;
}

/* #gameCarton .__game-wrapper-box-inner {
  position: absolute;
  top: 0%;
  left: 0%;
  opacity: 0;
  transform: translate(-13%, -16%) scale3d(1, 0.87, 1);
  width: 19.5625rem;
  height: 19.375rem;
  background: url(../photos/m-gamecarton-box-inn_6367_31.png) no-repeat center/contain;
  transition: transform 1s;
} */

#gameSpinning .__game-wrapper-box-front {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 100%;
  height: 19.375rem;
  background: url(../photos/m-gamespinning-box_0ba2_29.png) no-repeat center/contain;
  transition: opacity 0.5s;
}

#gameSpinning
  .__game-wrapper-box[item-active="true"]
  > .__game-wrapper-box-inner {
  animation: inner-move-desc 1s forwards;
}

#gameSpinning
  .__game-wrapper-box[item-active="true"]
  > .__game-wrapper-box-inner[item-active="true"] {
  background: url(../photos/m-gamespinning-box-e_4b13_27.png) no-repeat
    center/contain;
}

#gameSpinning
  .__game-wrapper-box[item-active="true"]
  > .__game-wrapper-box-front {
  background: url(../photos/m-gamespinning-box-e_4b13_27.png) no-repeat
    center/contain;
}

@media screen and (max-width: 768px) {
  #gameSpinning .__game-wrapper {
    grid-template-columns: repeat(2, minmax(10.8125rem, 19.375rem));
  }

  #gameSpinning
    .__game-wrapper-box[item-active="true"]
    > .__game-wrapper-box-inner {
    animation: inner-move-mobile 1s forwards;
  }
}

@media (max-width: 20em) {
  #gameSpinning .__game-wrapper-box {
    height: 10.8125rem;
  }

  #gameSpinning .__game-wrapper-box-inner,
  #gameSpinning .__game-wrapper-box-front {
    height: 10.8125rem;
  }

  #gameSpinning .__game-wrapper-box-inner {
    width: 10.4375rem;
  }
}

@media (min-width: 20em) and (max-width: 76.5625em) {
  #gameSpinning .__game-wrapper-box {
    height: clamp(10.8125rem, 7.7848756906rem + 15.138121547vw, 19.375rem);
  }

  #gameSpinning .__game-wrapper-box-inner,
  #gameSpinning .__game-wrapper-box-front {
    height: clamp(10.8125rem, 7.7848756906rem + 15.138121547vw, 19.375rem);
  }

  #gameSpinning .__game-wrapper-box-inner {
    width: clamp(10.4375rem, 7.210980663rem + 16.1325966851vw, 19.5625rem);
  }
}

@keyframes tremor {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

@keyframes rotate_box {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(720deg);
  }
}

@keyframes inner-move-desc {
  0% {
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1.2);
    opacity: 1;
  }
}

@keyframes inner-move-mobile {
  0% {
    opacity: 1;
  }
  100% {
    transform: translate3d(-1%, -1%, 0) scale3d(1, 1, 1);
    opacity: 1;
  }
}

@supports (-webkit-touch-callout: none) {
  @keyframes inner-move-mobile {
    0% {
      opacity: 1;
    }
    100% {
      transform: translate3d(-1%, -1%, 0) scale3d(1.1, 1, 1);
      opacity: 1;
    }
  }
}
/* old lend */
#gameSpinning .__game-wrapper-box__back {
  background: url(../photos/m-gamespinning-box-e_4b13_27.png) no-repeat
    center/contain;
  top: unset !important;
  left: unset !important;
}

#gameSpinning .__game-wrapper-box {
  perspective: 1000px;
}

#gameSpinning .__game-wrapper-box > .__game-wrapper-box-front,
#gameSpinning .__game-wrapper-box-back {
  backface-visibility: hidden;
  transition: 1.2s;
}

#gameSpinning .__game-wrapper-box > .__game-wrapper-box-back {
  transform: rotateY(180deg);
  display: none;
}

#gameSpinning .__game-wrapper-box.active > .__game-wrapper-box-front {
  transform: rotateY(720deg);
  background: url(../photos/m-gamespinning-box-e_4b13_27.png) no-repeat
    center/contain;
}

#gameSpinning .__game-wrapper-box.active > .__game-wrapper-box-back {
  transform: rotateY(720deg);
  display: none;
}

/* Крутящийся подарок */

@keyframes gift_rotate {
  0% {
    transform: rotate(-180deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

#gameSpinning .__game-rotating-gift[item-visible="true"] {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: unset;
}

#gameSpinning .__game-rotating-gift img[item-animate="gift_rotate"] {
  animation: gift_rotate 1s linear forwards;
  max-width: 300px;
}

@keyframes flip_box {
  0% {
    transform: rotatey(0deg);
  }
  100% {
    transform: rotateY(720deg);
  }
}

#gameSpinning .__game-wrapper-box[item-animate="flip"] {
  animation: flip_box 1s ease-in-out forwards;
}
