/* -------------------------------------------
    Hotspot
---------------------------------------------- */
@if use_component(hotspot) {
	.hotspot-wrapper {
		font-size: 1rem;

		&:hover {
			.hotspot-box {
				visibility: visible;
				opacity: 1;
				pointer-events: all;
			}

			.hotspot {
				color: #fff;
				background: var(--wolmart-dark-color, $dark-color);
			}

			.hotspot-box-top {
				transform: translateY(-1rem);
			}

			.hotspot-box-bottom {
				transform: translateY(1rem);
			}

			.hotspot-box-left {
				transform: translateX(-1rem);
			}

			.hotspot-box-right {
				transform: translateX(1rem);
			}
		}

		.hotspot:before {
			content: '';
			position: absolute;
			left: -1rem;
			right: -1rem;
			top: -1rem;
			bottom: -1rem;
		}
	}

	.hotspot-type1:not(:hover) {
		&::before {
			content: '';
			display: block;
			position: absolute;
			left: 0;
			width: 100%;
			height: 100%;
			background: #fff;
			border-radius: 50%;
			animation: zooming 2s infinite;
		}
	}

	.hotspot-type2:not(:hover) {
		.hotspot {
			animation: zooming2 2s infinite;
		}
	}

	@keyframes zooming {
		0% {
			opacity: 1;
			transform: scale(1);
		}

		100% {
			opacity: 0;
			transform: scale(2.5);
		}
	}

	@keyframes zooming2 {
		0% {
			opacity: 1;
		}

		50% {
			opacity: .5;
		}

		100% {
			opacity: 1;
		}
	}

	.hotspot {
		display: block;
		text-align: center;
		color: inherit;
		transition: .3s;
		width: 3rem;
		height: 3rem;
		line-height: 3rem;
		border-radius: 50%;
		color: var(--wolmart-dark-color, $dark-color);
		background: #fff;

		&:hover {
			text-decoration: none;
		}

		i {
			font-size: 1.2rem;
			line-height: 0;
			vertical-align: middle;
		}
	}

	.hotspot-box {
		position: absolute;
		width: 20rem;
		padding: 1rem;
		background: #fff;
		box-shadow: 0 0 30px rgba(0, 0, 0, 0.06);
		visibility: hidden;
		opacity: 0;
		z-index: 1;
		transition: opacity .3s, transform .3s, visibility .3s;
		pointer-events: none;
	}

	.hotspot-product {
		.product-body {
			padding: 1.5rem 0 0;
			text-align: center;
		}

		.product-action-vertical {
			opacity: 1;
			visibility: inherit;
			transition: none;
		}

		.product-title {
			font-size: 1.3rem;
		}

		.price {
			margin-bottom: 0;
		}
	}

	.hotspot-box-top {
		bottom: 100%;
		left: -40px;
	}

	.hotspot-box-left {
		right: 100%;
		top: -60px;
	}

	.hotspot-box-right {
		left: 100%;
		top: -60px;
	}

	.hotspot-box-bottom {
		top: 100%;
		left: -40px;
	}
}