$submit-btns-bg-color: $brand-ctr !default;

// @import "@css[shared]/page/product/_product-submit-block";

.btn-favorites,
.btn-fav {
   background: $submit-btns-bg-color;
   color: $white;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
   margin-left: 2px;
   width: 58px;

   .text {
      display: none;
   }

   @include haf {
      color: $white;
   }
}

.btn-favorites {
   height: 100%;
   cursor: pointer;
}

@mixin btn-insert-overlay {
   $btn-border-width: 2px !default;

   position: absolute;
   left: -$btn-border-width;
   right: -$btn-border-width;
   top: -$btn-border-width;
   bottom: -$btn-border-width;
   z-index: 1;
}

.btn-insert {
   background-color: $submit-btns-bg-color;
   color: $white;
   flex: 1 1 auto;
   position: relative;
   width: 306px;

   /* check po vlozeni do kosiku */
   &::before {
      @include btn-insert-overlay;
      @include fonticon;

      background-color: $submit-btns-bg-color;
      content: $icons_check;
      display: block;
      font-size: 30px;
      line-height: 60px;
      opacity: 0;
   }

   /* varovani ze neni vybrana varianta po hoveru */
   .non-variation {
      @include btn-insert-overlay;

      background-color: #a0a0a0;
      color: $white;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity $transition-speed;
   }

   /* tocici se kolecko */
   .add-to-cart-loader {
      @include btn-insert-overlay;

      background-color: $submit-btns-bg-color;

      &::before {
         animation: add-to-cart-loader 1.25s infinite linear;
         border: 3px solid $white;
         border-radius: 50%;
         border-right-color: transparent;
         content: '';
         display: block;
         position: absolute;
         left: calc(50% - 15px);
         top: calc(50% - 15px);
         width: 30px;
         height: 30px;
      }
   }

   &.btn-product-added::before {
      opacity: 1;
      z-index: 1;
   }

   &:hover .non-variation {
      cursor: not-allowed;
      opacity: 1;
   }
}

.no-js .btn-insert .non-variation {
   display: none;
}

.submit-block {
   display: flex;
   margin-bottom: $spacer-lg;
}


@keyframes add-to-cart-loader {
   0% {
      transform: rotate(0);
   }

   100% {
      transform: rotate(360deg);
   }
}
