/*------------------------------------------------------------------
Woo Quick View
-------------------------------------------------------------------*/

// Configuration
@import "../config";

// Mixins
@import "../mixins";

.dpr-quick-view {
	position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    text-align: center;
    @include background-opacity($color-2, 0.8);
    color: $color-1;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0;
    visibility: hidden;
    z-index: 12;
    -webkit-transition: opacity .3s;
    -moz-transition: opacity .3s;
    transition: opacity .3s;


    &:hover {
    	@include background-opacity($color-2, 0.95);
    	color: $color-1;
    }

	i {
		display: inline-block;
	    font-size: 16px;
	    font-weight: 600;
	    margin-right: 6px;
	    line-height: 1;
	    vertical-align: middle;
	    margin-top: -3px;
	}
}

.woocommerce .products .product-inner:hover .image-wrap .dpr-quick-view {
    opacity: 1;
    visibility: visible;
}

.woo-entry-image.loading {
	&:before {
		content: '';
		position: absolute;
	    top: 50%;
	    left: 50%;
	    margin-left: -15px;
	    margin-top: -15px;
	    width: 30px;
	    height: 30px;
	    opacity: .8;
	    border-width: 3px;
	    border-style: solid;
	    border-color: rgba(0,0,0,.1);
	    border-left-color: #fff;
	    z-index: 99;
	    @include border-radius( 50% );
	    @include animation( qv-spin .6s infinite linear );
	}

	&:after {
		content: '';
	    background-color: rgba(0,0,0,.15);
	    position: absolute;
	    top: 0;
	    left: 0;
	    right: 0;
	    bottom: 0;
    	height: 100%;
	    visibility: visible;
	    z-index: 11;
	}
}

@-webkit-keyframes qv-spin {
	0% {
	    -webkit-transform: rotate(0deg);
	}
	100% {
	    -webkit-transform: rotate(360deg);
	}
}

@keyframes qv-spin {
    0% {
	    transform: rotate(0deg);
	}
	100% {
	    transform: rotate(360deg);
	}
}

#dpr-qv-wrap {
	display: none;
	overflow-x: hidden;
    overflow-y: auto;

	&,
	.dpr-qv-overlay {
		position: fixed;
	    top: 0;
	    left: 0;
	    width: 100%;
	    height: 100%;
	    z-index: 999;
	}

	.dpr-qv-image,
	.summary {
		width: 50%;
	}

	.dpr-qv-slides,
	.flex-control-nav,
	.flex-direction-nav {
	    margin: 0;
	    padding: 0;
	    list-style: none;
	}

	.summary {
		padding: 30px;
		margin: 0;
	}

	.flex-viewport {
	    float: none;
	    width: 100%;
	}

	img {
		display: block;
	    width: 100%;
	    height: auto;
	}

	.flex-control-nav {
	    position: absolute;
	    bottom: 10px;
	    width: 100%;
	    text-align: center;

	    li {
		    display: inline-block;
		    position: relative;
	    	margin: 0 5px;
	    	line-height: 1;
	    	z-index: 10;

	    	a {
			    display: inline-block;
			    width: 12px;
			    height: 12px;
			    border: 3px solid #111;
			    opacity: 0.4;
			    text-indent: -9999px;
			    cursor: pointer;
    			@include border-radius( 50% );

    			&:hover {
    				opacity: 0.7;
    			}

    			&.flex-active {
				    background: rgba(0,0,0,.9);
				    cursor: default;
				}
	    	}
	    }
	}

	.flex-direction-nav {
	    a {
		    position: absolute;
		    top: 50%;
		    width: 30px;
		    height: 30px;
		    margin-top: -15px;
		    color: rgba(0,0,0,.8);
		    opacity: 0;
		    overflow: hidden;
		    cursor: pointer;
		    z-index: 10;

		    &:before {
			    display: inline-block;
			    font: normal normal normal 30px/1 dpr-icomoon;
			    text-rendering: auto;
			    -webkit-font-smoothing: antialiased;
			    -moz-osx-font-smoothing: grayscale;
		    }

		    &.flex-prev {
			    left: -50px;
			    text-align: right;

    			&:before {
    				content: '\f104';
    			}
			}

		    &.flex-next {
			    right: -50px;

    			&:before {
    				content: '\f105';
    			}
			}
	    }
	}

	.dpr-qv-image:hover .flex-direction-nav a.flex-prev {
	    opacity: .8;
	    left: 10px;
	}

	.dpr-qv-image:hover .flex-direction-nav a.flex-next {
	    opacity: .8;
	    right: 10px;
	}
}

.dpr-qv-container {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    text-align: center;
    padding: 30px;

    &:before {
    	content: '';
    	display: inline-block;
	    height: 100%;
	    vertical-align: middle;
    }
}

.dpr-qv-open {
	overflow: hidden;
}

.dpr-qv-content-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    text-align: left;
    max-width: 100%;
    min-width: 50vh;
    z-index: 1045;
    opacity: 0;
    @include transform( translateY(-30px) );
    -webkit-transition: transform .5s, opacity .3s;
    -moz-transition: transform .5s, opacity .3s;
    transition: transform .5s, opacity .3s;
}

.is-visible .dpr-qv-content-wrap {
    opacity: 1;
    @include transform( translateY(0) );
}

.dpr-qv-content-inner {
	position: relative;
	background-color: #fff;
    max-width: 875px;
    margin: 0 auto;
    z-index: 1000;
    @include box-shadow( 3px 3px 20px 0 rgba(0,0,0,0.15) );

    .dpr-qv-close {
    	position: absolute;
	    top: 0;
	    right: 0;
	    color: #333;
	    opacity: .5;
	    font-weight: 300;
	    font-size: 40px;
	    width: 40px;
	    height: 40px;
	    line-height: 40px;
	    text-align: center;
	    z-index: 1001;

	    &:hover {
	    	opacity: 1;
	    }
    }

    .product {
    	margin: 0;
    }

    select {
    	padding: 0 12px;
    }
}

.dpr-qv-overlay {
    background-color: rgba(0,0,0,0.5);
    cursor: pointer;
}

@media screen and (max-width: 850px) {
	#dpr-qv-wrap .dpr-qv-image,
	#dpr-qv-wrap .summary {
		width: 100%;
	}

	.dpr-qv-container:before {
		display: none;
	}
}