@import "../../../../assets/sass/vars";
@import "../../../../assets/sass/mixins";

@keyframes c_spinner {
	to {
		transform: rotate(360deg);
	}
}

.wc-product-media {
	overflow: hidden;
}

.p-media {
	&-top {
		position: absolute;
		left: 0px;
		right: 0px;
		top: 0px;
		z-index: 5;
	}

	&-center {
		position: absolute;
		left: 0px;
		right: 0px;
		top: 50%;
		transform: translateY(-50%);
		z-index: 5;
	}

	&-bottom {
		position: absolute;
		left: 0px;
		right: 0px;
		bottom: 0px;
		z-index: 5;
	}
}

.p-media-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	span.onsale {
		position: relative;
		top: auto;
		left: auto;
		display: inline-block;
	}
	.col-left {
		order: 1;
		padding-left: 0.5em;
		padding-top: 0.5em;
		text-align: left;
	}
	.col-center {
		order: 2;
		margin: 0 auto;
		text-align: center;
	}
	.col-right {
		order: 3;
		margin-right: 0px;
		margin-left: auto;
		padding-right: 0.5em;
		padding-top: 0.5em;
		text-align: right;
		// flex: 1 1 auto;
	}

	&.p-col-1:not(.p-media-center) {
		.col-center {
			width: 100%;
		}
	}

	.tophive-wc-quick-view {
		display: block;
	}

	.pm-item {
		transition: all 0.3s linear;
	}

	.show-when_hover {
		&.pm-item {
			opacity: 0;
			@include for_touch() {
				opacity: 0;
			}
		}
		.wc-product-inner:hover & {
			&.pm-item {
				opacity: 1;
				transform: translate(0);
			}
		}
	}
	// Animations
	.col-right {
		.show-when_hover {
			&.pm-item {
				transform: translateX(100%);
				@include for_touch() {
					transform: translateX(0);
				}
			}
		}
	}

	.col-left {
		.show-when_hover {
			&.pm-item {
				transform: translateX(-100%);
				@include for_touch() {
					transform: translateX(0);
				}
			}
		}
	}

	.p-media-center-center {
		.show-when_hover {
			&.pm-item {
				opacity: 0;
				@include for_touch() {
					opacity: 0;
				}
			}
		}
	}

	.p-media-bottom-center {
		.show-when_hover {
			&.pm-item {
				transform: translateY(100%);
				@include for_touch() {
					transform: translateX(0);
				}
			}
		}
	}
}

.tophive-wc-wishlist,
.tophive-wc-compare,
.button.add_to_cart_button,
.quick-view-btn {
	white-space: nowrap;
	text-transform: uppercase;
	display: inline-block;
	transition: all 0.3s linear;
}

.p-media-center-center.col-horizontal {
	justify-content: center;
}

.p-media-bottom-center {
	&.col-horizontal {
		justify-content: center;
		align-items: flex-end;
	}
	.pm-item:first-child:last-child {
		// for only 1 column
		flex-basis: 100%;
		a {
			&:first-child:last-child,
			&.add_to_cart_button {
				// if has only one item inside
				&:not(.display-icon) {
					width: 100%;
				}
			}
		}
	}

	.quick-view-btn {
		background: rgba(0, 0, 0, 0.5);
		color: rgba(255, 255, 255, 0.8);
	}
}

// For default loading animation
.wc-product-inner {
	.cd-btn:not( .cd-not-apply ),
	.button.add_to_cart_button:not( .out-media ),
	.tinvwl_add_to_wishlist_button // 3rd plugin
	 {
		background: rgba(255, 255, 255, 0.5);
		color: #888888;
		opacity: 0.6;
		box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16),
			0 0 0 1px rgba(0, 0, 0, 0.08);
		&:hover {
			background: rgba(255, 255, 255, 0.99);
			opacity: 1;
			outline: none;
		}
	}

	.cd-btn,
	.tinvwl_add_to_wishlist_button // 3rd plugin
	 {
		font-size: 12px;
		transition: all 0.3s linear;
	}
}

.wc-product-inner {
	// For buttons that have loading animation.
	.col-vertical {
		.pm-item {
			margin-bottom: 0.5em;
			&:last-child {
				margin-bottom: 0px;
			}
		}
	}
}

// In media item style
.wc-product-inner {
	.display-icon,
	.tophive-wc-wishlist,
	.tophive-wc-compare,
	.button.add_to_cart_button,
	.quick-view-btn {
		&.display-icon {
			line-height: 1px;
			min-width  : 35px;
			min-height : 35px;
			padding    : 7px;
			display    : inline-flex;
			&.loading {
				padding: 7px;
			}
		}
		align-items: center;
		justify-content: center;
	}

	.display-icon,
	.tophive-wc-wishlist,
	.tophive-wc-compare,
	.button.add_to_cart_button,
	.quick-view-btn {
		&.display-icon {
			border-radius: 100px;
		}
	}

	.tinvwl_add_to_wishlist_button {
		&.tinvwl-product-in-list {
			i {
				&:before {
					content: "\f004";
				}
			}
		}
		&.display-icon {
			i,
			svg {
				margin-right: 0px !important;
			}
		}
		&:before {
			margin-right: 0px !important;
		}
	}

	a {
		font-size: 1em;
	}

	a:not(.button.add_to_cart_button) {
		background: #fff;
		color: $color_text;
	}
}

// added to cart
.wc-product-media {
	.added_to_cart {
		display: none !important;
	}
}

.col-horizontal {
	display: flex;
	justify-content: space-between;
	.wc-product__part,
	.pm-item {
		margin-top: 0px;
		margin-right: 0.5em;
		> * {
			display: inline-block;
		}
		&:last-child {
			margin-right: 0px;
		}
	}
	.display-icon {
		line-height: 1px;
	}
}

/* More Styling for elemenets */
.wc-product-inner {
	.display-inline {
		display: inline-block;
		margin-right: 1em;
		&:last-child {
			margin-right: 0px;
		}
	}
	.display-icon {
		// line-height: 1px;
		.icon-label {
			display: none;
		}
	}
	.display-text {
		i,
		svg {
			display: none;
		}
	}
	.display-both {
		i,
		svg {
			margin-right: 0.6em;
		}
	}
	.wc-product__part {
		transition: all 0.3s linear;
	}
	.show_when_hover {
		opacity: 0;
	}
	&:hover {
		.hide_when_hover {
			opacity: 0;
		}
		.show_when_hover {
			opacity: 1;
		}
	}
}

.wc-product-contents {
	.b-row-main {
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		// flex-wrap: wrap;
		//flex-flow: row wrap;
	}
	.col-right {
		margin-left: auto;
		margin-right: 0px;
		margin-top: 0px;
		text-align: right;
		order: 5;
	}
	.b-col.col-bottom {
		flex: 1 1 100%;
		flex-shrink: 0;
		width: 100%;
		order: 1;
	}
}

.b-col {
	flex-shrink: 1;
	flex-basis: auto;
	* {
		margin-top: 0.7em;
		&:first-child {
			margin-top: 0px;
		}
	}
}

/**
3rd
 */
.wc-product-inner {
	.yith-wcwl-add-button > a i,
	.yith-wcwl-add-to-wishlist {
		margin-right: 0px;
	}

	.wooscp-btn.wooscp-btn-adding:after {
		display: none;
	}
}

ul.products li.product .wc-product-inner .tinvwl_add_to_wishlist_button {
	margin-top: 0;
}

/* Wish list builder item */

.wishlist_products_counter {
	display: flex;
	align-items: center;
	font-weight: 600;
	font-size: 0.85em;
	> span {
		margin: 0 2px;
		&:first-child {
			margin-left: 0px;
		}
		&:last-child {
			margin-right: 0px;
		}
	}
}

.wishlist-icon {
	display: inline-block;
	position: relative;
	font-size: 1.3em;
	i {
		width: 1.3em;
		height: 1.3em;
		display: block;
		position: relative;
		top: -1px;
		&:before {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
		}
	}
}

.wishlist_products_counter_number {
	position: absolute;
	top: -4px;
	right: 2px;
	left: auto;
	transform: translate(50%, 0%);
	font-size: 11px;
	min-width: 16px;
	min-height: 16px;
	line-height: 16px;
	display: block;
	text-align: center;
	color: #ffffff;
	background: $color_secondary;
	border-radius: 20px;
}

.item--wc_wishlist {
	position: relative;
	

	@include for_device(mobile) {
		.wc_wishlist-mobile-hide {
			display: none !important;
		}
		.wc-cart-mobile-show {
			display: inline-block !important;
		}
	}

	@include for_device(tablet) {
		.wc_wishlist-tablet-hide {
			display: none;
		}
		.wc_wishlist-tablet-show {
			display: inline-block;
		}
	}

	@include for_device(desktop) {
		.wc_wishlist-desktop-hide {
			display: none;
		}
		.wc_wishlist-desktop-show {
			display: inline-block;
		}
	}
}

/**
 * Tooltip Styles
 */

/* Add this attribute to the element that needs a tooltip */
[data-tooltip] {
	position: relative;
	z-index : 2;
	cursor  : pointer;
}

/* Hide the tooltip content by default */
[data-tooltip]:before,
[data-tooltip]:after {
	visibility    : hidden;
	opacity       : 0;
	pointer-events: none;
}

/* Position tooltip above the element */
[data-tooltip]:before {
	position             : absolute;
	bottom               : 110%;
	left                 : 50%;
	margin-bottom        : 5px;
	transform            : translateX(-50%);
	padding              : 7px;
	max-width            : 160px;
	min-width            : 120px;
	-webkit-border-radius: 3px;
	-moz-border-radius   : 3px;
	border-radius        : 3px;
	background-color     : #000;
	background-color     : hsla(0, 0%, 20%, 0.9);
	color                : #fff;
	content              : attr(data-tooltip);
	text-align           : center;
	font-size            : 11px;
	text-transform       : none;
	line-height          : 1.2;
	word-break           : break-word;
	white-space          : normal;
}

/* Triangle hack to make tooltip look like a speech bubble */
[data-tooltip]:after {
	position    : absolute;
	bottom      : 110%;
	left        : 50%;
	margin-left : -5px;
	width       : 0;
	border-top  : 5px solid #000;
	border-top  : 5px solid hsla(0, 0%, 20%, 0.9);
	border-right: 5px solid transparent;
	border-left : 5px solid transparent;
	content     : " ";
	font-size   : 0;
	line-height : 0;
}

/* Show tooltip content on hover */
[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
	visibility: visible;
	opacity   : 1;
}
.woocommerce-pagination{
	.tophive-infinity-loader{
		.tophive-infinity-button.button{
			&.loading{
				&::after{
					content: none!important;
				}
			}
		}
	}
}
.builder-item--woo_search_box123 {
	display: block;
	width: 100%;
	.has_cats_select{
		color: #282828;
		border: 1px solid #e5e5e5;
		background: #fff;
		box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) inset;
		border-radius: 2px;

		.search_product_cats{
			display: block;
			width: 160px;
			float: left;
			height: 2.4em;
			border: 0;
			border-radius: 0;
			background-color: transparent;
			color:#6d6d6d;
			position: relative;
			border-right: 1px solid #eee;
		}
		input.search-field{
			display: block;
			width: calc(100% - 160px);
			overflow:hidden;
			border: 0;
			box-shadow:none;
			border-radius:0;
			background-color: transparent;
		}
	}
}
