/*
Header
-------------------------------------------- */
// Logo
.refru-animations .site-title {
    @include refru-animation-top-to-bottom(200ms);
}
// Navigation
.refru-animations .refru-main-nav-wrap {
    @include refru-animation-top-to-bottom(400ms);
}
// Nav Icons
.refru-animations .refru-icons-nav-wrap {
    @include refru-animation-top-to-bottom(600ms);
}

/*
Welcome Box
-------------------------------------------- */
.refru-animations .refru-welcome-box-title {
    @include refru-animation-top-to-bottom(600ms);
}
.refru-animations .refru-welcome-box-desc {
    @include refru-animation-top-to-bottom(700ms, -40px, 900ms, 0.6);
}

/*
Simple Banners
-------------------------------------------- */
.refru-animations .refru-simple-banner {
    @include refru-animation-top-to-bottom(900ms, 50px);
}

/*
Shop
-------------------------------------------- */
.refru-animations .products .product .refru-product-animation-wrap {
    @include refru-animation-top-to-bottom(1000ms, 50px, 600ms);
}
@for $i from 1 through 25 {
    .refru-animations
        .products
        .product:nth-child(#{$i})
        .refru-product-animation-wrap {
        transition-delay: (($i * 50ms) + 1000ms);
    }
}

// Product Loading Content Animation
.refru-product-loading-content {
    display: none;
}
.refru-animations .refru-product-loading-content {
    background: #f3f4f5;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 20% 20% 50%;
    overflow: hidden;
    border-radius: 4px;
    display: block;
    transition: opacity 200ms;
    transition-delay: 1000ms;
    opacity: 1;

    @at-root .pace-done#{&} {
        opacity: 0;
        //z-index: -1;
        pointer-events: none;
        //display: none;
    }

    &::after {
        content: "";
        display: block;
        background-color: #eeeeef;
        position: absolute;
        top: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        transform: translateX(0);
        animation: 1s loading-placeholder ease-in-out infinite;
    }
}

@keyframes loading-placeholder {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/*
Sidebar Shop
-------------------------------------------- */
.refru-animations .woocommerce-sidebar .widget {
    @include refru-animation-top-to-bottom(1200ms, 50px, 600ms);
}
@for $i from 1 through 25 {
    .refru-animations .woocommerce-sidebar .widget:nth-child(#{$i}) {
        transition-delay: (($i * 70ms) + 1200ms);
    }
}

/*
Shop Single Product
-------------------------------------------- */
.refru-animations .woocommerce-product-gallery {
    opacity: 0 !important;
    transition: transform 700ms cubic-bezier(0.075, 0.82, 0.165, 1),
        opacity 700ms !important;
    transform: translate(-70px, 0);
    transition-delay: 400ms;

    @at-root .pace-done#{&} {
        opacity: 1 !important;
        transform: translate(0, 0);
    }
}

.refru-animations.single-product .woocommerce-product-rating {
    @include refru-animation-right-to-left(500ms, 40px, 700ms);
}

.refru-animations.single-product .entry-title {
    @include refru-animation-right-to-left(600ms, 40px, 700ms);
}

.refru-animations.single-product
    .woocommerce-product-details__short-description {
    @include refru-animation-right-to-left(700ms, 40px, 700ms);
}

.refru-animations.single-product .price {
    @include refru-animation-right-to-left(800ms, 40px, 700ms);
}

.refru-animations.single-product .stock {
    @include refru-animation-right-to-left(900ms, 40px, 700ms);
}

.refru-animations.single-product .cart {
    @include refru-animation-right-to-left(900ms, 40px, 700ms);
}

.refru-animations.single-product .woocommerce-tabs {
    @include refru-animation-bottom-to-top(1000ms);
}

.refru-animations.single-product .refru-product-metadata {
    @include refru-animation-bottom-to-top(1100ms);
}

.refru-animations.single-product .related.products {
    @include refru-animation-bottom-to-top(1200ms);
}

/*
Blog
-------------------------------------------- */
// Title
.refru-animations .post .entry-title {
    @include refru-animation-right-to-left(200ms);
}
// Image
.refru-animations .post .post-image {
    @include refru-animation-right-to-left(400ms);
}
// Content
.refru-animations .post .entry-content {
    @include refru-animation-right-to-left(600ms);
}
// Metadata
.refru-animations .post .entry-footer {
    @include refru-animation-right-to-left(700ms);
}
// Comments
.refru-animations .post .comments-area {
    @include refru-animation-right-to-left(900ms);
}

/*
Cart
-------------------------------------------- */
// Cart
.refru-animations.woocommerce-cart .page-header {
    @include refru-animation-right-to-left(200ms);
}
// Cart
.refru-animations.woocommerce-cart .cart {
    @include refru-animation-bottom-to-top(200ms, 80px);
}
// Cart Items
.refru-animations.woocommerce-cart .cart .cart_item {
    @include refru-animation-bottom-to-top(400ms, 80px);
}
@for $i from 1 through 10 {
    .refru-animations.woocommerce-cart .cart .cart_item:nth-child(#{$i}) {
        transition-delay: (($i * 50ms) + 400ms);
    }
}
// Cart Actions
.refru-animations.woocommerce-cart .actions {
    @include refru-animation-bottom-to-top(600ms, 80px);
}
// Cart Collaterals
.refru-animations.woocommerce-cart .cart-collaterals {
    @include refru-animation-bottom-to-top(800ms, 80px);
}
